> Not clear how that works! For LL(1) this requires the > head token of the stream pattern to be unique?
For NekoML stream parsers, it works the following : - if it's a pattern, we check the matching and increment the readed tokens counter - if we fail the token pattern matching, reset the counter to 0 and go to next rule - if it's a sub-rule (in fact a function call), then we junk the readed tokens before entering it - if no rule match an expression is raised - if we catch an exception in a rule set, it is an error only if some tokens were junked, else it just mean the rule didn't match For more clear explanations you might have a look at the generated Neko code by using : /src> nekoml -n neko/Parser.nml (that will keep the .neko generated files) > I'm curious because Felix has a user defined grammar > system using an standard Recursive Descent implementation. > This is LL(inf). The problem is "Syntax Error". Its the > only possible diagnostic you can get. I'm not using LL(1) tips right now, although I don't see why it would not be possible. Nicolas -- Neko : One VM to run them all (http://nekovm.org)
