amained / kapuc

[in development] General programming language compiled with LLVM.
0 stars 2 forks source link

Language spec & Grammar #5

Closed bencinn closed 7 months ago

bencinn commented 7 months ago

This is really not that done but enough to start writing parser and analyzer.

Kapu is meant to be explicit for speed, mean there should be not that magic happening?

Grammar:

Lexer + Parser:

bencinn commented 7 months ago

We should write the grammar in EBNF i think.

bencinn commented 7 months ago

https://github.com/amained/kapuc/blob/b1e94e0d2c90ea014450c413b857f3de2d0b3165/src/kapuc/lex.c#L41 It seems that the lexer is different from the grammar. Remove let, change grammar to have const.