Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> - add expressions, proper infix support for arithmetic

I'd suggest ignoring precedence rules completely here. It generally simplifies the grammar and parser considerably. It doesn't make the language unworkable, either, as long as you allow for grouping with parentheses - Smalltalk does this and it work rather well.

I'd also try working with libraries like PyParsing first before attempting to use mammoth size parser generators. In my experience, especially for simple grammars, this way you can be done with parsing stage with minimum effort and concentrate on the "features" side.



I should have mentioned that precedence rules are pretty wacky.

I wish that in the languages I have worked on that I could just ignore precedence and use parens, but operator precedence is expected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: