Any difference between import and tokenVocab?

24 views
Skip to first unread message

Roger Costello

unread,
Mar 4, 2015, 7:09:44 AM3/4/15
to antlr-di...@googlegroups.com

The import statement or the tokenVocab option can be put in a parser grammar to reuse a lexer grammar.

Sam Harwell advises to always use tokenVocab rather than import [1].

Is there any difference between import and tokenVocab? If there's no difference (and Sam says to use tokenVocab), then why have the import statement?

[1] I actually recommend avoiding the import statement altogether in ANTLR. Use the tokenVocab feature instead. [Sam Harwell] 
Reply all
Reply to author
Forward
0 new messages