Dashboard > ANTLR 3 > Browse Space > Labels > faq_actions
  ANTLR 3 Log In | Sign Up   View a printable version of the current page.  
  Label: faq_actions

Content with label faq_actions in ANTLR 3 (See content from all spaces)

Why doesn't my header show up in the lexer as well as the parser?
Actions are specific to one grammar. When using a combined parser/lexer grammar, use // applies only to the parser: @header // applies only to the lexer: @lexer::header not just the @header. When using a separate (noncombined) parser, @header applies to the parser ...
Action execution during backtracking
ANTLR must parse ahead to see if something matches. If it fails, then ANTLR tries the next viable alt. Upon failure, it's pretty hard to undo actions in general so ANTLR gates actions out with something like this: if ( backtracking==0 ) Labels ...
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators