Package org.antlr.v4.parse
Class TokenVocabParser
- java.lang.Object
-
- org.antlr.v4.parse.TokenVocabParser
-
public class TokenVocabParser extends Object
-
-
Constructor Summary
Constructors Constructor Description TokenVocabParser(Grammar g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getImportedVocabFile()
Return a File descriptor for vocab file.Map<String,Integer>
load()
Load a vocab file<vocabName>.tokens
and return mapping.
-
-
-
Field Detail
-
g
protected final Grammar g
-
-
Constructor Detail
-
TokenVocabParser
public TokenVocabParser(Grammar g)
-
-
Method Detail
-
getImportedVocabFile
public File getImportedVocabFile()
Return a File descriptor for vocab file. Look in library or in -o output path. antlr -o foo T.g4 U.g4 where U needs T.tokens won't work unless we look in foo too. If we do not find the file in the lib directory then must assume that the .tokens file is going to be generated as part of this build and we have defined .tokens files so that they ALWAYS are generated in the base output directory, which means the current directory for the command line tool if there was no output directory specified.
-
-