Package org.jparsec
Provides core Parser implementations for parser combinator logic.
Parser and Parsers are the 2 core classes in this package. Convenience API such as OperatorTable are also provided.
Parser and Parsers are the 2 core classes in this package. Convenience API such as OperatorTable are also provided.
Package Specification
The code is developed and tested under Java 5.0.Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please check out CodeHaus-
Interface Summary Interface Description ParseContext.ParserTrace Allows tracing of parsing progress during error condition, to ease debugging.TokenMap<T> Maps aToken
to a an object of typeT
, or null if the token isn't recognized. -
Class Summary Class Description BestParser<T> DelimitedParser<T> Parses a list of pattern started with a delimiter, separated and optionally ended by the delimiter.EmptyListParser<T> A parser that always returns an empty mutable list.EmptyParseError Empty implementation ofParseErrorDetails
for subclasses to override.Indentation Processes indentation based lexical structure according to the Off-side rule.InternalFunctors Functors used only internally by this package.Keywords Helper class for creating lexers and parsers for keywords.Lexicon ALexicon
is a group of lexical words that can be tokenized by a single tokenizer.ListFactory<T> Creates a {link List}.NestableBlockCommentScanner Parses any nestable comment pattern.NumberLiteralsTranslator Transforms the recognized character range to an integer within 64 bits.Operators Helper class for creating parsers and lexers for operators.Operators.Suite A suite is a list of overlapping operators, where some operators are prefixes of other operators.Operators.Suites A list of suites in the reverse order of the suites.OperatorTable<T> BuildsParser
to parse expressions with operator-precedence grammar.OperatorTable.Operator ParseContext Represents the context state during parsing.Parser<T> Defines grammar and encapsulates parsing logic.Parser.Reference<T> An atomic mutable reference toParser
used in recursive grammars.Parser.Rhs<T> Parsers Provides commonParser
implementations.ParserState RepresentsParseContext
for token level parsing.ParseTree Represents the syntactical structure of the input being parsed.ReluctantBetweenParser<T> Deprecated. RepeatAtLeastParser<T> RepeatTimesParser<T> Scanners Provides commonParser
implementations that scan the source and match certain string patterns.ScannerState Parser state for scanner.SkipAtLeastParser SkipTimesParser SourceLocation Represents a location inside the source.SourceLocator Locates the line and column number of a 0-based index in the source.StringLiteralsTranslator Translates the recognized string literal to aString
.Terminals Provides convenient API to build lexer and parsers for terminals.Terminals.CharLiteral Entry point for parser and tokenizers of character literal.Terminals.DecimalLiteral Entry point for parser and tokenizers of decimal number literal represented asString
.Terminals.Identifier Entry point for parser and tokenizers of regular identifier.Terminals.IntegerLiteral Entry point for any arbitrary integer literal represented as aString
.Terminals.LongLiteral Entry point for parser and tokenizers of integral number literal represented asLong
.Terminals.ScientificNumberLiteral Entry point for parser and tokenizers of scientific notation literal.Terminals.StringLiteral Entry point for parser and tokenizers of string literal.Token Represents any token with a token value and the 0-based index in the source.TokenizerMaps CommonFunction
implementations that maps fromString
.Tokens Provides common token values.Tokens.Fragment Represents a fragment tagged according to its semantics.Tokens.ScientificNotation Represents a scientific notation with a significand (mantissa) and an exponent.TreeNode A TreeNode remembers it's parent (which corresponds to a parent parser that syntactically encloses this parter), it's previous node (which is the parser at the same syntactical level and had just succeeded before this parser started).WithSource<T> Parsed result with the matched source text. -
Enum Summary Enum Description Indentation.Punctuation IntOrder Maps two integers to a boolean value.OperatorTable.Associativity Describes operator associativity, in order of precedence.ParseContext.ErrorType Parser.Mode Defines the mode that a parser should be run in.StringCase Tokens.Tag Pre-builtTokens.Fragment
token tags.