SQLTemplateParser (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.template.parser, class: SQLTemplateParser

# 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

  Fields
  Modifier and Type
  Field
  Description
  `Token`
  `jj_nt`
  Next token.
  `protected JJTSQLTemplateParserState`
  `jjtree`
  `Token`
  `token`
  Current token.
  `SQLTemplateParserTokenManager`
  `token_source`
  Generated Token Manager.

  ### Fields inherited from interface 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`
  Modifier and Type
  Field
  Description
  `static final int`
  `ARGS`
  Lexical state.
  `static final int`
  `COMMA`
  RegularExpression Id.
  `static final int`
  `DEC_DIGITS`
  RegularExpression Id.
  `static final int`
  `DEC_FLT`
  RegularExpression Id.
  `static final int`
  `DEFAULT`
  Lexical state.
  `static final int`
  `DIGIT`
  RegularExpression Id.
  `static final int`
  `DOLLAR`
  RegularExpression Id.
  `static final int`
  `DOT`
  RegularExpression Id.
  `static final int`
  `DOUBLE_QUOTED_STRING`
  RegularExpression Id.
  `static final int`
  `ELSE`
  RegularExpression Id.
  `static final int`
  `END`
  RegularExpression Id.
  `static final int`
  `EOF`
  End of File.
  `static final int`
  `ESC`
  RegularExpression Id.
  `static final int`
  `EXPONENT`
  RegularExpression Id.
  `static final int`
  `FALSE`
  RegularExpression Id.
  `static final int`
  `FLOAT_LITERAL`
  RegularExpression Id.
  `static final int`
  `FLT_SUFF`
  RegularExpression Id.
  `static final int`
  `IDENTIFIER`
  RegularExpression Id.
  `static final int`
  `IF`
  RegularExpression Id.
  `static final int`
  `IN_SINGLE_LINE_COMMENT`
  Lexical state.
  `static final int`
  `INT_LITERAL`
  RegularExpression Id.
  `static final int`
  `LBRACKET`
  RegularExpression Id.
  `static final int`
  `LETTER`
  RegularExpression Id.
  `static final int`
  `LSBRACKET`
  RegularExpression Id.
  `static final int`
  `NOT_TEXT`
  Lexical state.
  `static final int`
  `RBRACKET`
  RegularExpression Id.
  `static final int`
  `RSBRACKET`
  RegularExpression Id.
  `static final int`
  `SHARP`
  RegularExpression Id.
  `static final int`
  `SINGLE_LINE_COMMENT_END`
  RegularExpression Id.
  `static final int`
  `SINGLE_QUOTED_STRING`
  RegularExpression Id.
  `static final int`
  `STRING_ESC`
  RegularExpression Id.
  `static final int`
  `TEXT`
  RegularExpression Id.
  `static final int`
  `TEXT_OTHER`
  RegularExpression Id.
  `static final String[]`
  `tokenImage`
  Literal token values.
  `static final int`
  `TRUE`
  RegularExpression Id.
  `static final int`
  `WithinDoubleQuoteLiteral`
  Lexical state.
  `static final int`
  `WithinSingleQuoteLiteral`
  Lexical state.

  ### Fields inherited from interface SQLTemplateParserTreeConstants

  `JJTARRAY, JJTBLOCK, JJTBOOLSCALAR, JJTDIRECTIVE, JJTEXPRESSION, JJTFLOATSCALAR, JJTIFELSE, JJTINTSCALAR, JJTMETHOD, jjtNodeName, JJTSTRINGSCALAR, JJTTEXT, JJTVARIABLE, JJTVOID`
  Modifier and Type
  Field
  Description
  `static final int`
  `JJTARRAY`
  `static final int`
  `JJTBLOCK`
  `static final int`
  `JJTBOOLSCALAR`
  `static final int`
  `JJTDIRECTIVE`
  `static final int`
  `JJTEXPRESSION`
  `static final int`
  `JJTFLOATSCALAR`
  `static final int`
  `JJTIFELSE`
  `static final int`
  `JJTINTSCALAR`
  `static final int`
  `JJTMETHOD`
  `static final String[]`
  `jjtNodeName`
  `static final int`
  `JJTSTRINGSCALAR`
  `static final int`
  `JJTTEXT`
  `static final int`
  `JJTVARIABLE`
  `static final int`
  `JJTVOID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SQLTemplateParser(InputStream stream)`
  Constructor with InputStream.
  `SQLTemplateParser(InputStream stream, String encoding)`
  Constructor with InputStream and supplied encoding
  `SQLTemplateParser(Reader stream)`
  Constructor.
  `SQLTemplateParser(SQLTemplateParserTokenManager tm)`
  Constructor with generated Token Manager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `array()`
  `final void`
  `block()`
  `final void`
  `directive()`
  `final void`
  `disable_tracing()`
  Disable tracing.
  `final void`
  `enable_tracing()`
  Enable tracing.
  `final void`
  `expression()`
  `ParseException`
  `generateParseException()`
  Generate ParseException.
  `final Token`
  `getNextToken()`
  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`
  `ReInit(Reader stream)`
  Reinitialise.
  `void`
  `ReInit(SQLTemplateParserTokenManager tm)`
  Reinitialise.
  `final void`
  `scalar()`
  `final Node`
  `template()`
  `final void`
  `text()`
  `final boolean`
  `trace_enabled()`
  Trace enabled.
  `final void`
  `variable()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### jjtree

    protected JJTSQLTemplateParserState jjtree

  - ### token_source

    public SQLTemplateParserTokenManager token_source
    Generated Token Manager.

  - ### token

    public Token token
    Current token.

  - ### jj_nt

    public Token jj_nt
    Next token.

- ## Constructor Details

  - ### SQLTemplateParser

    public SQLTemplateParser(InputStream stream)
    Constructor with InputStream.

  - ### SQLTemplateParser

    public SQLTemplateParser(InputStream stream, String encoding)
    Constructor with InputStream and supplied encoding

  - ### SQLTemplateParser

    public SQLTemplateParser(Reader stream)
    Constructor.

  - ### SQLTemplateParser

    public SQLTemplateParser(SQLTemplateParserTokenManager tm)
    Constructor with generated Token Manager.

- ## Method Details

  - ### template

    public final Node template() throws ParseException
    Throws:
      `ParseException`

  - ### block

    public final void block() throws ParseException
    Throws:
      `ParseException`

  - ### text

    public final void text() throws ParseException
    Throws:
      `ParseException`

  - ### ifElse

    public final void ifElse() throws ParseException
    Throws:
      `ParseException`

  - ### directive

    public final void directive() throws ParseException
    Throws:
      `ParseException`

  - ### expression

    public final void expression() throws ParseException
    Throws:
      `ParseException`

  - ### scalar

    public final void scalar() throws ParseException
    Throws:
      `ParseException`

  - ### variable

    public final void variable() throws ParseException
    Throws:
      `ParseException`

  - ### method

    public final void method() throws ParseException
    Throws:
      `ParseException`

  - ### array

    public final void array() throws ParseException
    Throws:
      `ParseException`

  - ### ReInit

    public void ReInit(InputStream stream)
    Reinitialise.

  - ### ReInit

    public void ReInit(InputStream stream, String encoding)
    Reinitialise.

  - ### ReInit

    public void ReInit(Reader stream)
    Reinitialise.

  - ### ReInit

    public void ReInit(SQLTemplateParserTokenManager tm)
    Reinitialise.

  - ### getNextToken

    public final Token getNextToken()
    Get the next Token.

  - ### getToken

    public final Token getToken(int index)
    Get the specific Token.

  - ### generateParseException

    public ParseException 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.