Package org.hibernate.tool.schema.ast
Class GeneratedSqlScriptParser
- java.lang.Object
-
- antlr.Parser
-
- antlr.LLkParser
-
- org.hibernate.tool.schema.ast.GeneratedSqlScriptParser
-
- All Implemented Interfaces:
GeneratedSqlScriptParserTokenTypes
- Direct Known Subclasses:
SqlScriptParser
public class GeneratedSqlScriptParser extends antlr.LLkParser implements GeneratedSqlScriptParserTokenTypes
Lexer and parser used to extract single statements from import SQL script. Supports instructions/comments and quoted strings spread over multiple lines. Each statement must end with semicolon.
-
-
Field Summary
Fields Modifier and Type Field Description static String[]
_tokenNames
static antlr.collections.impl.BitSet
_tokenSet_0
static antlr.collections.impl.BitSet
_tokenSet_1
static antlr.collections.impl.BitSet
_tokenSet_2
static antlr.collections.impl.BitSet
_tokenSet_3
static antlr.collections.impl.BitSet
_tokenSet_4
static antlr.collections.impl.BitSet
_tokenSet_5
-
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
-
Fields inherited from interface org.hibernate.tool.schema.ast.GeneratedSqlScriptParserTokenTypes
BLOCK_COMMENT, CHAR, DELIMITER, EOF, ESCqs, LINE_COMMENT, NEWLINE, NULL_TREE_LOOKAHEAD, QUOTED_TEXT, SPACE, TAB
-
-
Constructor Summary
Constructors Modifier Constructor Description GeneratedSqlScriptParser(antlr.ParserSharedInputState state)
GeneratedSqlScriptParser(antlr.TokenBuffer tokenBuf)
protected
GeneratedSqlScriptParser(antlr.TokenBuffer tokenBuf, int k)
GeneratedSqlScriptParser(antlr.TokenStream lexer)
protected
GeneratedSqlScriptParser(antlr.TokenStream lexer, int k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterStatementPartNewline()
void
blankSpacesToSkip()
void
newLineToSkip()
void
nonSkippedChar()
void
nonSkippedSpace()
void
nonSkippedTab()
protected void
out(antlr.Token token)
protected void
out(String stmt)
void
quotedString()
void
script()
protected void
skip()
void
spaceToSkip()
void
statement()
protected void
statementEnded()
void
statementFirstPart()
void
statementPart()
protected void
statementStarted()
void
tabToSkip()
-
Methods inherited from class antlr.Parser
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
-
-
-
-
Field Detail
-
_tokenNames
public static final String[] _tokenNames
-
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
-
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
-
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
-
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
-
_tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_4
-
_tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_5
-
-
Constructor Detail
-
GeneratedSqlScriptParser
protected GeneratedSqlScriptParser(antlr.TokenBuffer tokenBuf, int k)
-
GeneratedSqlScriptParser
public GeneratedSqlScriptParser(antlr.TokenBuffer tokenBuf)
-
GeneratedSqlScriptParser
protected GeneratedSqlScriptParser(antlr.TokenStream lexer, int k)
-
GeneratedSqlScriptParser
public GeneratedSqlScriptParser(antlr.TokenStream lexer)
-
GeneratedSqlScriptParser
public GeneratedSqlScriptParser(antlr.ParserSharedInputState state)
-
-
Method Detail
-
out
protected void out(String stmt)
-
out
protected void out(antlr.Token token)
-
statementStarted
protected void statementStarted()
-
statementEnded
protected void statementEnded()
-
skip
protected void skip()
-
script
public final void script() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
blankSpacesToSkip
public final void blankSpacesToSkip() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
statement
public final void statement() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
statementFirstPart
public final void statementFirstPart() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
statementPart
public final void statementPart() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
afterStatementPartNewline
public final void afterStatementPartNewline() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
quotedString
public final void quotedString() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
nonSkippedChar
public final void nonSkippedChar() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
nonSkippedSpace
public final void nonSkippedSpace() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
nonSkippedTab
public final void nonSkippedTab() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
newLineToSkip
public final void newLineToSkip() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
spaceToSkip
public final void spaceToSkip() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
tabToSkip
public final void tabToSkip() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
-