ae89f5e469
Before this commit, whitespace was handled at the lexical level by making tokens consume any whitespace coming after them. This was accomplished by appending |__| to every token rule. This commit changes whitespace handling to be more explicit. Tokens no longer consume whitespace coming after them and syntactic rules have to cope with it. While this slightly complicates the syntactic grammar, I think it's a cleaner way. Moreover, it is what JavaScript example grammar does. One small side-effect of thich change is that the grammar is now stand-alone (it doesn't require utils.js anymore). |
||
---|---|---|
.. | ||
compiler | ||
compiler.js | ||
grammar-error.js | ||
parser.js | ||
peg.js | ||
utils.js |