laser.regularlanguage.regularexpression.reparser
Class REParser

java.lang.Object
  extended by antlr.LLkParser
      extended by laser.regularlanguage.regularexpression.reparser.REParser
All Implemented Interfaces:
REParserTokenTypes

public class REParser
extends antlr.LLkParser
implements REParserTokenTypes

The REParser class parses in a RE from the given input.

CAVEATS:

See Also:
laser.alphabetinterface.AlphabetFactoryInterface#createAlphabetInterface, laser.regularexpression.REFactory#createRE

Field Summary
static java.lang.String[] _tokenNames
           
protected  AlphabetInterface alphabet_
           
protected  AlphabetFactoryInterface alphabetFactory_
           
protected  REFactory reFactory_
           
 
Fields inherited from interface laser.regularlanguage.regularexpression.reparser.REParserTokenTypes
CHOICE, COLON, COMMA, COMMENT, CONCAT, DASH, DESCRIPTION, DOT, EMPTY, EOF, EPSILON, ESC, EVENTS, EXPONENT, FOR, IDENTIFIER, KLEENEPLUS, KLEENESTAR, LBRACE, LBRACKET, LETTER, LPAREN, NAME, NEWLINE, NULL_TREE_LOOKAHEAD, NUMBER, OPTION, POSINT, QUOTED_STRING, RBRACE, RBRACKET, RPAREN, TILDE, WHITESPACE
 
Constructor Summary
  REParser(TokenBuffer tokenBuf)
           
protected REParser(TokenBuffer tokenBuf, int k)
           
 
Method Summary
 AlphabetInterface alphabet()
           
 int aPosInt()
           
 java.lang.String aQuotedString()
           
 TreeNode classSet()
           
 java.lang.String description()
           
 Exponent exponent()
           
 TreeNode expression()
           
 LabelInterface label()
           
 java.util.Set<LabelInterface> labelList()
           
 TreeNode leafExpression()
           
 TreeNode modifiedExpression()
           
 TreeNode modifier(TreeNode expression_)
           
 java.lang.String name()
           
 TreeNode regularExpression(AlphabetInterface alphabet)
           
 TreeNode term()
           
 RE toRE(REFactory reFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reFactory_

protected REFactory reFactory_

alphabetFactory_

protected AlphabetFactoryInterface alphabetFactory_

alphabet_

protected AlphabetInterface alphabet_

_tokenNames

public static final java.lang.String[] _tokenNames
Constructor Detail

REParser

protected REParser(TokenBuffer tokenBuf,
                   int k)

REParser

public REParser(TokenBuffer tokenBuf)
Method Detail

toRE

public final RE toRE(REFactory reFactory)
              throws RecognitionException,
                     TokenStreamException
Throws:
RecognitionException
TokenStreamException

name

public final java.lang.String name()
                            throws RecognitionException,
                                   TokenStreamException
Throws:
RecognitionException
TokenStreamException

description

public final java.lang.String description()
                                   throws RecognitionException,
                                          TokenStreamException
Throws:
RecognitionException
TokenStreamException

alphabet

public final AlphabetInterface alphabet()
                                 throws RecognitionException,
                                        TokenStreamException
Throws:
RecognitionException
TokenStreamException

regularExpression

public final TreeNode regularExpression(AlphabetInterface alphabet)
                                 throws RecognitionException,
                                        TokenStreamException
Throws:
RecognitionException
TokenStreamException

aQuotedString

public final java.lang.String aQuotedString()
                                     throws RecognitionException,
                                            TokenStreamException
Throws:
RecognitionException
TokenStreamException

labelList

public final java.util.Set<LabelInterface> labelList()
                                              throws RecognitionException,
                                                     TokenStreamException
Throws:
RecognitionException
TokenStreamException

expression

public final TreeNode expression()
                          throws RecognitionException,
                                 TokenStreamException
Throws:
RecognitionException
TokenStreamException

term

public final TreeNode term()
                    throws RecognitionException,
                           TokenStreamException
Throws:
RecognitionException
TokenStreamException

modifiedExpression

public final TreeNode modifiedExpression()
                                  throws RecognitionException,
                                         TokenStreamException
Throws:
RecognitionException
TokenStreamException

leafExpression

public final TreeNode leafExpression()
                              throws RecognitionException,
                                     TokenStreamException
Throws:
RecognitionException
TokenStreamException

modifier

public final TreeNode modifier(TreeNode expression_)
                        throws RecognitionException,
                               TokenStreamException
Throws:
RecognitionException
TokenStreamException

label

public final LabelInterface label()
                           throws RecognitionException,
                                  TokenStreamException
Throws:
RecognitionException
TokenStreamException

classSet

public final TreeNode classSet()
                        throws RecognitionException,
                               TokenStreamException
Throws:
RecognitionException
TokenStreamException

exponent

public final Exponent exponent()
                        throws RecognitionException,
                               TokenStreamException
Throws:
RecognitionException
TokenStreamException

aPosInt

public final int aPosInt()
                  throws RecognitionException,
                         TokenStreamException
Throws:
RecognitionException
TokenStreamException