diku-dk / alpacc

MIT License
6 stars 0 forks source link

Better formatting for the parsers. #11

Open WilliamDue opened 9 months ago

WilliamDue commented 9 months ago

Currently the parsers have huge tables that are unreadable that makes my emacs lag so some line limit should be made. The generated code should also be better formatted such that the indentation and spacing is more uniform. Also ideally if futharks algebraic data types could be used instead of unsigned integers then the parsers would be more human readable.

athas commented 9 months ago

I caution against using sum types. The type checker is not well tuned when there are many constructors, and the type errors would be unreadable.

WilliamDue commented 9 months ago

Hm maybe the solution is to just make a comment in the resulting parser with what terminals and nonterminals correspond to.