-
hallo, the grammar is: grammar TextBlock; This is the input: And here is the response: The following modification did not help: sentence: word+ FullStop {getText().length() > 1}; Please give advice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Make sure you click on the lexer source code tab and erase everything in that textbox. You have a 'combined grammar' so you only put the combined grammar in 'Parser' textbox. The lab.antlr.org website uses an interpreter of the grammar, so actions |
Beta Was this translation helpful? Give feedback.
Make sure you click on the lexer source code tab and erase everything in that textbox. You have a 'combined grammar' so you only put the combined grammar in 'Parser' textbox. The lab.antlr.org website uses an interpreter of the grammar, so actions
{getText().length() > 1}
don't work. By the way that action won't work for a generated parser because the code won't compile...missing semicolon.