keosariel / gabby-lang

A simple programming language using llvmlite in python3
43 stars 9 forks source link

How to resolve shift/reduce warning conflicts? #4

Open crazydude123 opened 2 years ago

crazydude123 commented 2 years ago

Hi, When executing "python3 run.py test/loops.test", say, the terminal warns with the message "WARNING: 30 shift/reduce conflicts". How to resolve this Warning?

Thanks!

keosariel commented 2 years ago

Hi @crazydude123 ,

It's probably from the parser, I'd check again and if you can provide anymore info, that'd would be great.

crazydude123 commented 1 year ago

Hey,

Thanks for your reply. Are we using o-0 clang optimization here? (Default)

keosariel commented 1 year ago

There isn't any optimisation set atm. But the llvm-docs stated that it has an option for that, with optimisation levels 0-3. So you can customize that

keosariel commented 1 year ago

Also, concerning the lexer/parser warnings; I intend on changing to a lark parser instead. Hopefully, time permits me.

crazydude123 commented 1 year ago

Thanks again for responding. "There isn't any optimisation set atm" This implies that the optimization level is o-0 right? Is that the default in llvmlite?

keosariel commented 1 year ago

I don't think so, essetially the optimization is False. Zero (0) itself applies some form of optimization and since the optimization is false by default i don't think even the 0 level optimization is applied.