Package net.sf.jga.parser

Parser that allows expressions of an as-yet unnamed Java-like language to be parsed to create functors.

See:
          Description

Interface Summary
CharStream This interface describes a character stream that maintains line and column number positions of the characters.
FunctorParserConstants  
FunctorRef Contains and describes a functor being built by the functor parser.
 

Class Summary
BinaryFunctorRef Contains and describes a BinaryFunctor being built by the functor parser.
FunctorParser Parser that converts java-like expressions into functors.
FunctorParserTokenManager  
GeneratorRef Contains and describes a Generator being built by the functor parser.
GenericParser FunctorParser that add runtime type-safe entry points to the non-generified base parser.
Token Describes the input token stream.
UnaryFunctorRef Contains and describes a UnaryFunctor being built by the functor parser.
UnicodeCharStream An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).
 

Exception Summary
ParseException This exception is thrown when parse errors are encountered.
UncheckedParseException Unchecked version of ParseException, generated by the static evaluation methods.
 

Error Summary
TokenMgrError  
 

Package net.sf.jga.parser Description

Parser that allows expressions of an as-yet unnamed Java-like language to be parsed to create functors. The langauge is a subset of a Java 1.5 grammar, whose BNF form is available here. While it is an incomplete subset of the Java expression syntax, what's already implemented is enough to be interesting. You can do basic arithmetic (with all standard Number implementations, including BigDecimal and BigInteger), relational comparisons, shifts, boolean expressions, conditionals, call constructors and methods, reference member variables, cast values, test instanceof, and reference class constants (including enumerated values when run on Java 1.5). Essentially, the grammar allows anything that can be typed on the right side of a Java assignment statement.

The following expression syntax is not implemented in the current release.



Copyright © 2002-2005 David A. Hall. All Rights Reserved.