net.sf.dropboxmq.messageselector
Class Parser

java.lang.Object
  extended by net.sf.dropboxmq.messageselector.Parser
All Implemented Interfaces:
ParserConstants

public class Parser
extends Object
implements ParserConstants

Created: 06 Oct 2007

Version:
$Revision: 187 $, $Date: 2009-01-13 21:06:54 -0700 (Tue, 13 Jan 2009) $
Author:
Dwayne Schultz

Nested Class Summary
(package private) static class Parser.JJCalls
           
 
Field Summary
(package private)  SimpleCharStream jj_input_stream
           
 Token jj_nt
          Next token.
 Token token
          Current token.
 ParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface net.sf.dropboxmq.messageselector.ParserConstants
AND, BETWEEN, BLOCK_COMMENT, DASH_COMMENT, DECIMAL, DEFAULT, DIGIT, EOF, ESCAPE, EXPONENT, FALSE, FLOAT_SUFFIX, FLOATING_POINT, HEX, IDENTIFIER, IN, INTEGER, IS, LETTER, LIKE, LINE_COMMENT, NEWLINE, NOT, NULL, OCTAL, OR, RETURN, SIGN, SPACE, STRING, TAB, tokenImage, TRUE
 
Constructor Summary
Parser(InputStream stream)
          Constructor with InputStream.
Parser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
Parser(ParserTokenManager tm)
          Constructor with generated Token Manager.
Parser(Reader stream)
          Constructor.
 
Method Summary
 void disable_tracing()
          Disable tracing.
 void enable_tracing()
          Enable tracing.
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 Expression parse()
           
static Expression parse(String messageSelector)
           
 Expression parseAddition()
           
 Expression parseAnd()
           
 Expression parseConditional()
           
 ConstantExpression parseConstant()
           
 Expression parseExpression()
           
 Expression parseMultiplication()
           
 Expression parseOr()
           
 String parseString()
           
 Expression parseUnary()
           
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(ParserTokenManager tm)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public ParserTokenManager token_source
Generated Token Manager.


jj_input_stream

SimpleCharStream jj_input_stream

token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

Parser

public Parser(InputStream stream)
Constructor with InputStream.


Parser

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


Parser

public Parser(Reader stream)
Constructor.


Parser

public Parser(ParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

parse

public static Expression parse(String messageSelector)
                        throws InvalidSelectorException
Throws:
InvalidSelectorException

parse

public final Expression parse()
                       throws ParseException
Throws:
ParseException

parseOr

public final Expression parseOr()
                         throws ParseException
Throws:
ParseException

parseAnd

public final Expression parseAnd()
                          throws ParseException
Throws:
ParseException

parseConditional

public final Expression parseConditional()
                                  throws ParseException
Throws:
ParseException

parseAddition

public final Expression parseAddition()
                               throws ParseException
Throws:
ParseException

parseMultiplication

public final Expression parseMultiplication()
                                     throws ParseException
Throws:
ParseException

parseUnary

public final Expression parseUnary()
                            throws ParseException
Throws:
ParseException

parseExpression

public final Expression parseExpression()
                                 throws ParseException
Throws:
ParseException

parseConstant

public final ConstantExpression parseConstant()
                                       throws ParseException
Throws:
ParseException

parseString

public final String parseString()
                         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(ParserTokenManager 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.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.