This looks like ANTLR 2 code ("protected" instead of "fragment".) I apologise for not seeing it earlier. The default for ANTLR 2 is to not look ahead unless you ask it to. If you're using ANTLR 2, try adding "k=2;" (without the quotes) in your options. ...Richard