]> www.git.momoyon.org Git - lang.git/log
lang.git
10 days ago[main.c] Bump Compiler Version
momoyon [Sat, 10 May 2025 05:55:45 +0000 (10:55 +0500)]
[main.c] Bump Compiler Version

10 days ago[Makefile] Add debug target
momoyon [Sat, 10 May 2025 05:54:40 +0000 (10:54 +0500)]
[Makefile] Add debug target

10 days ago[main.c] Actually implement parse_suffixes()!
momoyon [Sat, 10 May 2025 05:54:18 +0000 (10:54 +0500)]
[main.c] Actually implement parse_suffixes()!

11 days ago[main.c] Remove non-ascii characters.
momoyon [Sat, 10 May 2025 05:50:58 +0000 (10:50 +0500)]
[main.c] Remove non-ascii characters.

11 days ago[main.c] Implement parser_peek_by(p, by);
momoyon [Sat, 10 May 2025 05:33:24 +0000 (10:33 +0500)]
[main.c] Implement parser_peek_by(p, by);

3 weeks ago[main.c] Early exit if failed to parse on all parse_<func>
momoyon [Mon, 28 Apr 2025 13:00:38 +0000 (18:00 +0500)]
[main.c] Early exit if failed to parse on all parse_<func>

3 weeks ago[main.c] Implement parse_suffixes()...
momoyon [Sun, 27 Apr 2025 16:17:36 +0000 (21:17 +0500)]
[main.c] Implement parse_suffixes()...

- TODO: Does not early exit on error.

3 weeks ago[main.c] Able to use identifiers before declaring them.
momoyon [Sun, 27 Apr 2025 16:02:43 +0000 (21:02 +0500)]
[main.c] Able to use identifiers before declaring them.

3 weeks ago[main.c] prefix parsing functions with parse_
momoyon [Sun, 27 Apr 2025 15:09:14 +0000 (20:09 +0500)]
[main.c] prefix parsing functions with parse_

3 weeks ago[main.c] Can parse multiple Statements*...
ahmedsamyh [Sun, 27 Apr 2025 13:57:29 +0000 (18:57 +0500)]
[main.c] Can parse multiple Statements*...

- Statement is not yet defined but its basically one or more expressions
ending in a semicolon.

3 weeks ago[README.md] Decide on final name of language.
momoyon [Fri, 25 Apr 2025 11:08:17 +0000 (16:08 +0500)]
[README.md] Decide on final name of language.

3 weeks agoIgnore *.exe
momoyon [Thu, 24 Apr 2025 12:04:02 +0000 (17:04 +0500)]
Ignore *.exe

3 weeks ago[main.c] Catch errors like (1 0)...
momoyon [Thu, 24 Apr 2025 12:00:04 +0000 (17:00 +0500)]
[main.c] Catch errors like (1 0)...

- (1 0), Here we say that 0 is unexpected and we expect )

3 weeks ago[main.c] Return NULL on binary parsing if failed to parse primary.
momoyon [Thu, 24 Apr 2025 11:49:03 +0000 (16:49 +0500)]
[main.c] Return NULL on binary parsing if failed to parse primary.

3 weeks ago[main.c] Fix Column of EOF, and Update tests.
momoyon [Thu, 24 Apr 2025 11:30:49 +0000 (16:30 +0500)]
[main.c] Fix Column of EOF, and Update tests.

3 weeks ago[main.c] Fix parsing error on primary...
momoyon [Wed, 23 Apr 2025 14:33:12 +0000 (19:33 +0500)]
[main.c] Fix parsing error on primary...

- Still doesn't return NULL on unexpected token.

3 weeks agoLocate problem
momoyon [Wed, 23 Apr 2025 14:15:44 +0000 (19:15 +0500)]
Locate problem

4 weeks ago[main.c] error_pretty done...
momoyon [Thu, 17 Apr 2025 09:51:12 +0000 (14:51 +0500)]
[main.c] error_pretty done...

- TODO: expression() not returning NULL on failure of parsing primary!.

4 weeks ago[main.c] Store lines info in Lexer.
momoyon [Thu, 17 Apr 2025 09:19:30 +0000 (14:19 +0500)]
[main.c] Store lines info in Lexer.

5 weeks ago[main.c] WIP: error_pretty()
momoyon [Sun, 13 Apr 2025 12:59:00 +0000 (17:59 +0500)]
[main.c] WIP: error_pretty()

5 weeks ago[commonlib.h] Update
momoyon [Sun, 13 Apr 2025 12:58:27 +0000 (17:58 +0500)]
[commonlib.h] Update

5 weeks ago[test.py] Update
momoyon [Sun, 13 Apr 2025 12:40:17 +0000 (17:40 +0500)]
[test.py] Update

5 weeks ago[main.c] Use a hashmap for identifiers...
momoyon [Sun, 13 Apr 2025 11:19:30 +0000 (16:19 +0500)]
[main.c] Use a hashmap for identifiers...

- TODO Done: TODO: I guess we should check if the identifier has any value set here?

5 weeks ago[main.c] WIP: parse identifiers
ahmedsamyh [Sat, 12 Apr 2025 21:32:57 +0000 (02:32 +0500)]
[main.c] WIP: parse identifiers

5 weeks agoUpdate precedence table
momoyon [Sat, 12 Apr 2025 16:43:54 +0000 (21:43 +0500)]
Update precedence table

5 weeks agoBump compiler version
momoyon [Sat, 12 Apr 2025 15:34:53 +0000 (20:34 +0500)]
Bump compiler version

5 weeks ago[tests] Update tests.
momoyon [Sat, 12 Apr 2025 15:33:26 +0000 (20:33 +0500)]
[tests] Update tests.

5 weeks ago[main.c] Refactor handling of flags...
momoyon [Sat, 12 Apr 2025 15:32:20 +0000 (20:32 +0500)]
[main.c] Refactor handling of flags...

- Add subcommand `dump_tokens`.
- Remove -d flag.

5 weeks agoAdd TODO
momoyon [Sat, 12 Apr 2025 12:02:12 +0000 (17:02 +0500)]
Add TODO

5 weeks ago[main.c] Can actually lex characters...
momoyon [Sat, 12 Apr 2025 11:51:01 +0000 (16:51 +0500)]
[main.c] Can actually lex characters...

- Handle every primary_expression parsing.

5 weeks ago[main.c] Can parse the grammar of Clox...
momoyon [Sat, 12 Apr 2025 11:25:12 +0000 (16:25 +0500)]
[main.c] Can parse the grammar of Clox...

Still has many operations to be parsed.

5 weeks ago[main.c] Can parse Grouping in primary()
momoyon [Sat, 12 Apr 2025 11:06:21 +0000 (16:06 +0500)]
[main.c] Can parse Grouping in primary()

5 weeks agoWIP: Refactor factor(); now can parse consecutive factor expressions
ahmedsamyh [Fri, 11 Apr 2025 20:44:48 +0000 (01:44 +0500)]
WIP: Refactor factor(); now can parse consecutive factor expressions

5 weeks agoWIP: Refactor code structure.
ahmedsamyh [Fri, 11 Apr 2025 15:20:27 +0000 (20:20 +0500)]
WIP: Refactor code structure.

5 weeks ago[commonlib.h] Update
ahmedsamyh [Fri, 11 Apr 2025 15:20:03 +0000 (20:20 +0500)]
[commonlib.h] Update

5 weeks agobump compiler version
ahmedsamyh [Fri, 11 Apr 2025 14:28:34 +0000 (19:28 +0500)]
bump compiler version

5 weeks ago[main.c] Can parse Factor expressions!
ahmedsamyh [Fri, 11 Apr 2025 14:16:12 +0000 (19:16 +0500)]
[main.c] Can parse Factor expressions!

5 weeks ago[commonlib.h] Update
ahmedsamyh [Fri, 11 Apr 2025 14:15:50 +0000 (19:15 +0500)]
[commonlib.h] Update

5 weeks ago[test.py] Update
ahmedsamyh [Fri, 11 Apr 2025 12:39:49 +0000 (17:39 +0500)]
[test.py] Update

6 weeks ago[main.c] WIP: Expression parsing.
ahmedsamyh [Tue, 8 Apr 2025 23:52:08 +0000 (04:52 +0500)]
[main.c] WIP: Expression parsing.

6 weeks ago[main.c] Lex null.
ahmedsamyh [Tue, 8 Apr 2025 22:46:54 +0000 (03:46 +0500)]
[main.c] Lex null.

6 weeks ago[test] Add bool.momo
ahmedsamyh [Tue, 8 Apr 2025 22:44:06 +0000 (03:44 +0500)]
[test] Add bool.momo

6 weeks ago[test.py] Update
ahmedsamyh [Tue, 8 Apr 2025 22:42:26 +0000 (03:42 +0500)]
[test.py] Update

6 weeks ago[main.c] Lex bools.
ahmedsamyh [Tue, 8 Apr 2025 22:41:40 +0000 (03:41 +0500)]
[main.c] Lex bools.

7 weeks ago[test.py] Update
ahmedsamyh [Tue, 1 Apr 2025 14:41:47 +0000 (19:41 +0500)]
[test.py] Update

7 weeks agoUpdate test.py
momoyon [Sun, 30 Mar 2025 15:51:53 +0000 (20:51 +0500)]
Update test.py

7 weeks ago[test.bat] Add test script for windows.
momoyon [Sun, 30 Mar 2025 15:51:08 +0000 (20:51 +0500)]
[test.bat] Add test script for windows.

7 weeks ago[main.c] WIP: Reimplement parsing.
ahmedsamyh [Sat, 29 Mar 2025 14:26:45 +0000 (19:26 +0500)]
[main.c] WIP: Reimplement parsing.

7 weeks ago[grammar.txt] Add test grammar for Lox.
ahmedsamyh [Sat, 29 Mar 2025 14:26:28 +0000 (19:26 +0500)]
[grammar.txt] Add test grammar for Lox.

7 weeks ago[test.py] Use newer test.py.
ahmedsamyh [Fri, 28 Mar 2025 15:42:03 +0000 (20:42 +0500)]
[test.py] Use newer test.py.

7 weeks ago[main.c] Remove unnecessary logging.
ahmedsamyh [Fri, 28 Mar 2025 15:41:47 +0000 (20:41 +0500)]
[main.c] Remove unnecessary logging.

7 weeks agoMake parsing more modular...
momoyon [Thu, 27 Mar 2025 17:03:53 +0000 (22:03 +0500)]
Make parsing more modular...

- Can parse Floats.

7 weeks agoAdded Ast_Node_Type.
momoyon [Thu, 27 Mar 2025 16:22:51 +0000 (21:22 +0500)]
Added Ast_Node_Type.

7 weeks agoWIP: parsing.
ahmedsamyh [Wed, 26 Mar 2025 22:34:10 +0000 (03:34 +0500)]
WIP: parsing.

7 weeks ago[commonlib.h] Update
ahmedsamyh [Wed, 26 Mar 2025 21:55:16 +0000 (02:55 +0500)]
[commonlib.h] Update

7 weeks ago[main.c] Fix freeing non-malloced ptr in free_parser().
ahmedsamyh [Wed, 26 Mar 2025 21:20:39 +0000 (02:20 +0500)]
[main.c] Fix freeing non-malloced ptr in free_parser().

2 months ago[main.c] WIP: Parser.
ahmedsamyh [Tue, 4 Mar 2025 18:54:27 +0000 (23:54 +0500)]
[main.c] WIP: Parser.

2 months ago[main.c] Bump version.patch.
ahmedsamyh [Tue, 4 Mar 2025 18:25:17 +0000 (23:25 +0500)]
[main.c] Bump version.patch.

2 months ago[testing] Now can pass input for tests.
ahmedsamyh [Tue, 4 Mar 2025 18:23:49 +0000 (23:23 +0500)]
[testing] Now can pass input for tests.

2 months ago[main.c] Bring debug printing under a variable (can change via a flag).
ahmedsamyh [Tue, 4 Mar 2025 18:02:36 +0000 (23:02 +0500)]
[main.c] Bring debug printing under a variable (can change via a flag).

2 months agoTODO Done: Care about window's \r\n...
ahmedsamyh [Tue, 4 Mar 2025 17:56:12 +0000 (22:56 +0500)]
TODO Done: Care about window's \r\n...

2 months ago[main.c] Bump version.patch
ahmedsamyh [Tue, 4 Mar 2025 14:04:42 +0000 (19:04 +0500)]
[main.c] Bump version.patch

2 months ago[main.c] Fix stupid include and return keyword bug...
ahmedsamyh [Tue, 4 Mar 2025 14:01:58 +0000 (19:01 +0500)]
[main.c] Fix stupid include and return keyword bug...

- Add keywords.momo as test.

2 months agoTODO done: Has a bug where 'int8' Gets parsed as 'int' and '8'
ahmedsamyh [Tue, 4 Mar 2025 05:10:20 +0000 (10:10 +0500)]
TODO done: Has a bug where 'int8' Gets parsed as 'int' and '8'

2 months ago[main.c] Add TODO.
ahmedsamyh [Mon, 3 Mar 2025 13:14:01 +0000 (18:14 +0500)]
[main.c] Add TODO.

2 months agoParse [] and remove debug "OK" logging.
ahmedsamyh [Mon, 3 Mar 2025 13:06:55 +0000 (18:06 +0500)]
Parse [] and remove debug "OK" logging.

2 months agoCan parse <<, <=, < and >>, >=, >
ahmedsamyh [Mon, 3 Mar 2025 13:03:54 +0000 (18:03 +0500)]
Can parse <<, <=, < and >>, >=, >

2 months ago[test.py] "build" subcmd only outputs stdout on verbose output.
ahmedsamyh [Mon, 3 Mar 2025 12:48:44 +0000 (17:48 +0500)]
[test.py] "build" subcmd only outputs stdout on verbose output.

2 months ago[test.py] Change verbose flag: -v -> -V
ahmedsamyh [Mon, 3 Mar 2025 12:46:56 +0000 (17:46 +0500)]
[test.py] Change verbose flag: -v -> -V

2 months ago[testing] Prefix expected outputs with . (make it hidden)
ahmedsamyh [Mon, 3 Mar 2025 12:45:13 +0000 (17:45 +0500)]
[testing] Prefix expected outputs with . (make it hidden)

2 months ago[main.c] Can parse most* operators.
ahmedsamyh [Mon, 3 Mar 2025 12:37:37 +0000 (17:37 +0500)]
[main.c] Can parse most* operators.

2 months ago[testing] Make testing functional...
ahmedsamyh [Mon, 3 Mar 2025 12:37:11 +0000 (17:37 +0500)]
[testing] Make testing functional...

- Can record compilation behaviour.

2 months ago[main.c] Accept flags (WIP)
ahmedsamyh [Sat, 1 Mar 2025 12:03:43 +0000 (17:03 +0500)]
[main.c] Accept flags (WIP)

2 months ago[main.c] Can lex numbers, comments, some singlechar tokens...
ahmedsamyh [Fri, 28 Feb 2025 06:08:50 +0000 (11:08 +0500)]
[main.c] Can lex numbers, comments, some singlechar tokens...

- WIP: Lex operators.

2 months ago[main.c] Can lex strings and keywords.
ahmedsamyh [Fri, 28 Feb 2025 03:58:06 +0000 (08:58 +0500)]
[main.c] Can lex strings and keywords.

2 months ago[Makefile] -Wswitch-enum
ahmedsamyh [Fri, 28 Feb 2025 03:57:41 +0000 (08:57 +0500)]
[Makefile] -Wswitch-enum

2 months ago[test.py] WIP
ahmedsamyh [Fri, 28 Feb 2025 03:57:27 +0000 (08:57 +0500)]
[test.py] WIP

2 months ago[main.c] Added Token types.
ahmedsamyh [Wed, 26 Feb 2025 18:14:17 +0000 (23:14 +0500)]
[main.c] Added Token types.

2 months ago[main.c] Fix memory issues.
ahmedsamyh [Wed, 26 Feb 2025 18:02:23 +0000 (23:02 +0500)]
[main.c] Fix memory issues.

2 months ago[main.c] Can parse identifiers*
ahmedsamyh [Wed, 26 Feb 2025 17:53:51 +0000 (22:53 +0500)]
[main.c] Can parse identifiers*

2 months ago[main.c] Use String_view for Lexer.src.
ahmedsamyh [Wed, 26 Feb 2025 17:27:27 +0000 (22:27 +0500)]
[main.c] Use String_view for Lexer.src.

2 months ago[Makefile] use Address Sanitization (ASAN)
ahmedsamyh [Wed, 26 Feb 2025 17:27:06 +0000 (22:27 +0500)]
[Makefile] use Address Sanitization (ASAN)

2 months agoWIP: Trying to port python -> c.
ahmedsamyh [Tue, 25 Feb 2025 10:56:08 +0000 (15:56 +0500)]
WIP: Trying to port python -> c.

5 months agoWIP: Improve parseStatement()
ahmedsamyh [Thu, 28 Nov 2024 17:02:26 +0000 (22:02 +0500)]
WIP: Improve parseStatement()

5 months agoChange logging of AstNodes.
ahmedsamyh [Wed, 27 Nov 2024 18:47:57 +0000 (23:47 +0500)]
Change logging of AstNodes.

5 months agoparseStatement() done.
ahmedsamyh [Wed, 27 Nov 2024 18:46:49 +0000 (23:46 +0500)]
parseStatement() done.

5 months agoMerge pull request #3 from momoyonwork/work
momoyo [Wed, 27 Nov 2024 17:48:47 +0000 (22:48 +0500)]
Merge pull request #3 from momoyonwork/work

work

5 months agoMake ParseUnexpectedType accept variadic amount of expected_types.
ahmedsamyh [Sat, 23 Nov 2024 04:07:08 +0000 (09:07 +0500)]
Make ParseUnexpectedType accept variadic amount of expected_types.

5 months agoTODO DONE: Make version of ParseEOF that excepts an variadic number of arguments
ahmedsamyh [Sat, 23 Nov 2024 04:01:01 +0000 (09:01 +0500)]
TODO DONE: Make version of ParseEOF that excepts an variadic number of arguments

5 months agoWIP: Reimplementing parseStatement()...
ahmedsamyh [Fri, 22 Nov 2024 16:30:33 +0000 (21:30 +0500)]
WIP: Reimplementing parseStatement()...

- [AstNode] Print type of AstNode.
- [ParseException] split to ParseEOF and ParseUnexpectedType

5 months agoUse ParseException instead of ParseError
ahmedsamyh [Fri, 22 Nov 2024 15:51:45 +0000 (20:51 +0500)]
Use ParseException instead of ParseError

5 months agoWIP: TODO: using exceptions for ParseError...
ahmedsamyh [Wed, 20 Nov 2024 18:25:10 +0000 (23:25 +0500)]
WIP: TODO: using exceptions for ParseError...

- More type checking stuff.
- ignore tags file.

5 months agoWIP: Parsing Whole Grammer edge cases.
ahmedsamyh [Wed, 20 Nov 2024 12:09:05 +0000 (17:09 +0500)]
WIP: Parsing Whole Grammer edge cases.

- Use proper typing info.

5 months agoCan Parse Binary and Logical Comparisions.
ahmedsamyh [Wed, 20 Nov 2024 11:24:44 +0000 (16:24 +0500)]
Can Parse Binary and Logical Comparisions.

5 months agoAble to parse 'foo: int = 34 + 35'
ahmedsamyh [Wed, 20 Nov 2024 11:09:43 +0000 (16:09 +0500)]
Able to parse 'foo: int = 34 + 35'

5 months agoparseIdentifier() and don't use pprint for logging.
ahmedsamyh [Wed, 20 Nov 2024 10:22:16 +0000 (15:22 +0500)]
parseIdentifier() and don't use pprint for logging.

5 months agoMerge pull request #2 from momoyonwork/work
momoyo [Wed, 20 Nov 2024 08:50:40 +0000 (13:50 +0500)]
Merge pull request #2 from momoyonwork/work

work

5 months agoWIP: parsing Statements.
ahmedsamyh [Wed, 20 Nov 2024 08:49:03 +0000 (13:49 +0500)]
WIP: parsing Statements.

5 months agoWIP: Working on Ast Parsing.
ahmedsamyh [Wed, 20 Nov 2024 06:08:36 +0000 (11:08 +0500)]
WIP: Working on Ast Parsing.

5 months agoTokenType.NUMBER splitted to TokenType.{INT, FLOAT}
ahmedsamyh [Wed, 20 Nov 2024 06:04:09 +0000 (11:04 +0500)]
TokenType.NUMBER splitted to TokenType.{INT, FLOAT}