public class JSGFParser extends java.lang.Object implements JSGFParserConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt |
Token |
token |
JSGFParserTokenManager |
token_source |
CHARACTER_LITERAL, DECIMAL_LITERAL, DEFAULT, DIGIT, EOF, EXPONENT, FLOATING_POINT_LITERAL, FORMAL_COMMENT, GRAMMAR, IDENTIFIER, IMPORT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INTEGER_LITERAL, LETTER, MULTI_LINE_COMMENT, PUBLIC, SINGLE_LINE_COMMENT, STRING_LITERAL, TAG, tokenImage
Constructor and Description |
---|
JSGFParser(java.io.InputStream stream) |
JSGFParser(java.io.InputStream stream,
java.lang.String encoding) |
JSGFParser(JSGFParserTokenManager tm) |
JSGFParser(java.io.Reader stream) |
public JSGFParserTokenManager token_source
public Token token
public Token jj_nt
public JSGFParser(java.io.InputStream stream)
public JSGFParser(java.io.InputStream stream, java.lang.String encoding)
public JSGFParser(java.io.Reader stream)
public JSGFParser(JSGFParserTokenManager tm)
public static void main(java.lang.String[] args)
public static JSGFRuleGrammar newGrammarFromJSGF(java.io.InputStream i, JSGFRuleGrammarFactory factory) throws JSGFGrammarParseException
JSGFGrammarParseException
public static JSGFRuleGrammar newGrammarFromJSGF(java.io.Reader i, JSGFRuleGrammarFactory factory) throws JSGFGrammarParseException
JSGFGrammarParseException
public static JSGFRuleGrammar newGrammarFromJSGF(java.net.URL url, JSGFRuleGrammarFactory factory) throws JSGFGrammarParseException, java.io.IOException
JSGFGrammarParseException
java.io.IOException
public static JSGFRule ruleForJSGF(java.lang.String text)
public final JSGFRuleGrammar GrammarUnit(JSGFRuleGrammarFactory factory) throws ParseException
ParseException
public final JSGFRuleGrammar GrammarDeclaration(JSGFRuleGrammarFactory factory) throws ParseException
ParseException
public final void IdentHeader() throws ParseException
ParseException
public final void ImportDeclaration(JSGFRuleGrammar grammar) throws ParseException
ParseException
public final java.lang.String Name() throws ParseException
ParseException
public final void RuleDeclaration(JSGFRuleGrammar grammar) throws ParseException
ParseException
public final JSGFRuleAlternatives alternatives() throws ParseException
ParseException
public final java.lang.String ruleDef() throws ParseException
ParseException
public final JSGFRuleSequence sequence() throws ParseException
ParseException
public final float weight() throws ParseException
ParseException
public final JSGFRule item() throws ParseException
ParseException
public final java.util.ArrayList<java.lang.String> tags() throws ParseException
ParseException
public final JSGFRule terminal() throws ParseException
ParseException
public final JSGFRuleName ruleRef() throws ParseException
ParseException
public final JSGFRuleName importRef() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(JSGFParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()