E. Future Extensions

I am still investigating the possibility of LL(2) and higher lookahead. However, it looks like the resulting parsers will be somewhat ugly.

It would be nice to control choices with user-defined predicates.

The most likely future extension is backtracking. A grammar pattern like (VAR ':=' expr)? {{ return Assign(VAR,expr) }} : expr {{ return expr }} would turn into code that attempted to match VAR ':=' expr. If it succeeded, it would run {{ return ... }}. If it failed, it would match expr {{ return expr }}. Backtracking may make it less necessary to write LL(2) grammars.



Amit J Patel, amitp@cs.stanford.edu