koka-lang / koka

Koka language compiler and interpreter

Home Page:http://koka-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spec grammar is out of sync

mingodad opened this issue · comments

Adding the grammar in https://github.com/koka-lang/koka/blob/master/doc/spec/grammar/parser.y to https://mingodad.github.io/parsertl-playground/playground/ (a Yacc/Lex editor/tester) and trying the samples in samples/* I've noticed that they fail due to the grammar been out of sync.

It looks like you might be missing the layout algorithm that should be run between lexing and parsing. It should insert a bunch of artificial braces based on indentation level.

Thank you for pointing it out !
I've update the parser and example with a note explaining that it doesn't automatically add {, } and ;.