public class GrammarSpelunker extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GrammarSpelunker.Scanner
Strip comments and then return stream of words and
tokens {';', ':', '{', '}'}
|
Modifier and Type | Field and Description |
---|---|
protected String |
grammarFileName |
protected String |
grammarModifier |
protected String |
grammarName |
protected List<String> |
importedGrammars |
protected String |
inputDirectory |
protected String |
language |
protected GrammarSpelunker.Scanner |
scanner |
protected String |
token |
protected String |
tokenVocab |
Constructor and Description |
---|
GrammarSpelunker(String inputDirectory,
String grammarFileName) |
Modifier and Type | Method and Description |
---|---|
String |
getGrammarModifier() |
String |
getGrammarName() |
List<String> |
getImportedGrammars() |
String |
getLanguage() |
String |
getTokenVocab() |
protected void |
grammarHeader() |
protected void |
imports() |
static void |
main(String[] args)
Tester; Give grammar filename as arg
|
protected void |
match(String expecting) |
protected void |
options() |
void |
parse() |
protected String grammarFileName
protected String token
protected GrammarSpelunker.Scanner scanner
protected String grammarModifier
protected String grammarName
protected String tokenVocab
protected String language
protected String inputDirectory
protected void match(String expecting) throws IOException
IOException
public void parse() throws IOException
IOException
protected void grammarHeader() throws IOException
IOException
protected void options() throws IOException
IOException
protected void imports() throws IOException
IOException
public String getGrammarModifier()
public String getGrammarName()
public String getTokenVocab()
public String getLanguage()
public static void main(String[] args) throws IOException
IOException
Copyright © 1992–2015 ANTLR. All rights reserved.