Table of Contents

About

The grammar file of the parser contains the parser rule.

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

Syntax

parser grammar myGrammar;

If you have two differents file and your lexer grammar is defined in another file, you need to define it with the tokenVocab option.

parser grammar MarkupParser;

options { tokenVocab=MarkupLexer; }