Antlr - Lexer Grammar

About

The grammar file of the lexer is composed of lexer rule, optionally broken into multiple lexical modes

The most common approach is to combine combined in in one grammar file, the lexer and parser grammar.

Characteristics

Only lexer grammars can contain:

  • mode specifications.
  • custom channels specifications

Syntax

lexer grammar Name;
...

Powered by ComboStrap