Identifying problems in your grammar

In this section, you will review the different indicators for identifying problems in your code

Build problems are displayed in the Problems View, Console View and annotated in the vertical ruler of your grammar. The problems are reported when you save the file.

  1. Double click in Expr.g file to open it with the ANTLR editor
  2. Add a syntax error by calling an invalid rule. For example replace "stat" for "stat1" in the program rule and save the file
  3. Idetifying problems in an ANTLR grammar

  4. You can hover over the problem markers in the vertical ruler to view a description of the problem. You can also hover over the problem markers overview ruler
  5. In the Problems View, select a problem in the list. Open its context menu and select Go To. The file is opened in the editor at the location of the problem
  6. Idetifying problems in an ANTLR grammar

  7. In the Problems Console, select the link (error(1006)). The file is opened in the editor at the location of the problem
  8. Revert the change, click the Save button and all the indicators will be disappear
SourceForge.net Logo