Class SQLTemplateParser
java.lang.Object
org.apache.cayenne.template.parser.SQLTemplateParser
- All Implemented Interfaces:
SQLTemplateParserConstants
,SQLTemplateParserTreeConstants
public class SQLTemplateParser
extends Object
implements SQLTemplateParserTreeConstants, SQLTemplateParserConstants
Parser of Cayenne Templates.
- Since:
- 4.1
-
Field Summary
Modifier and TypeFieldDescriptionNext token.protected JJTSQLTemplateParserState
Current token.Generated Token Manager.Fields inherited from interface org.apache.cayenne.template.parser.SQLTemplateParserConstants
ARGS, COMMA, DEC_DIGITS, DEC_FLT, DEFAULT, DIGIT, DOLLAR, DOT, DOUBLE_QUOTED_STRING, ELSE, END, EOF, ESC, EXPONENT, FALSE, FLOAT_LITERAL, FLT_SUFF, IDENTIFIER, IF, IN_SINGLE_LINE_COMMENT, INT_LITERAL, LBRACKET, LETTER, LSBRACKET, NOT_TEXT, RBRACKET, RSBRACKET, SHARP, SINGLE_LINE_COMMENT_END, SINGLE_QUOTED_STRING, STRING_ESC, TEXT, TEXT_OTHER, tokenImage, TRUE, WithinDoubleQuoteLiteral, WithinSingleQuoteLiteral
Fields inherited from interface org.apache.cayenne.template.parser.SQLTemplateParserTreeConstants
JJTARRAY, JJTBLOCK, JJTBOOLSCALAR, JJTDIRECTIVE, JJTEXPRESSION, JJTFLOATSCALAR, JJTIFELSE, JJTINTSCALAR, JJTMETHOD, jjtNodeName, JJTSTRINGSCALAR, JJTTEXT, JJTVARIABLE, JJTVOID
-
Constructor Summary
ConstructorDescriptionSQLTemplateParser
(InputStream stream) Constructor with InputStream.SQLTemplateParser
(InputStream stream, String encoding) Constructor with InputStream and supplied encodingSQLTemplateParser
(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
array()
final void
block()
final void
final void
Disable tracing.final void
Enable tracing.final void
Generate ParseException.final Token
Get the next Token.final Token
getToken
(int index) Get the specific Token.final void
ifElse()
final void
method()
void
ReInit
(InputStream stream) Reinitialise.void
ReInit
(InputStream stream, String encoding) Reinitialise.void
Reinitialise.void
Reinitialise.final void
scalar()
final Node
template()
final void
text()
final boolean
Trace enabled.final void
variable()
-
Field Details
-
jjtree
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
SQLTemplateParser
Constructor with InputStream. -
SQLTemplateParser
Constructor with InputStream and supplied encoding -
SQLTemplateParser
Constructor. -
SQLTemplateParser
Constructor with generated Token Manager.
-
-
Method Details
-
template
- Throws:
ParseException
-
block
- Throws:
ParseException
-
text
- Throws:
ParseException
-
ifElse
- Throws:
ParseException
-
directive
- Throws:
ParseException
-
expression
- Throws:
ParseException
-
scalar
- Throws:
ParseException
-
variable
- Throws:
ParseException
-
method
- Throws:
ParseException
-
array
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
trace_enabled
public final boolean trace_enabled()Trace enabled. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-