Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixing broken comment syntax

...

You can use a few techniques to make your grammar more readable:

  1. Include Add comments including single-line //, and multi-line /* ... / and Javadoc-style /* ... */
  2. Gather your simple token definitions (single characters, single words, etc.) into a tokens section at the top of the file.
  3. Consider defining sub-parts of tokens with fragment rules. A fragment will never generate a token by itself but can be used as part of the rule defining another token.

...