Building Parsers with Java

Uses of Class
sjm.parse.Parser

Packages that use Parser
sjm.examples.arithmetic   
sjm.examples.coffee   
sjm.examples.logic   
sjm.examples.mechanics   
sjm.examples.midimath   
sjm.examples.minimath   
sjm.examples.pretty   
sjm.examples.query   
sjm.examples.regular   
sjm.examples.reserved   
sjm.examples.robot   
sjm.examples.sling   
sjm.examples.tests   
sjm.examples.track   
sjm.parse   
sjm.parse.chars   
sjm.parse.tokens   
 

Uses of Parser in sjm.examples.arithmetic
 

Methods in sjm.examples.arithmetic that return Parser
protected  Parser ArithmeticParser.divideFactor()
           
protected  Parser ArithmeticParser.expFactor()
           
 Parser ArithmeticParser.expression()
          Returns a parser that will recognize an arithmetic expression.
protected  Parser ArithmeticParser.factor()
           
protected  Parser ArithmeticParser.minusTerm()
           
protected  Parser ArithmeticParser.phrase()
           
protected  Parser ArithmeticParser.plusTerm()
           
static Parser ArithmeticParser.start()
          Returns a parser that will recognize an arithmetic expression.
protected  Parser ArithmeticParser.term()
           
protected  Parser ArithmeticParser.timesFactor()
           
 

Uses of Parser in sjm.examples.coffee
 

Methods in sjm.examples.coffee that return Parser
 Parser CoffeeParser.coffee()
          Return a parser that will recognize the grammar:
protected  Parser CoffeeParser.country()
           
protected  Parser CoffeeParser.formerName()
           
protected  Parser CoffeeParser.name()
           
protected  Parser CoffeeParser.orFrench()
           
protected  Parser CoffeeParser.price()
           
protected  Parser CoffeeParser.roast()
           
static Parser CoffeeParser.start()
          Return the primary parser for this class -- coffee().
 

Uses of Parser in sjm.examples.logic
 

Methods in sjm.examples.logic that return Parser
protected  Parser LogikusParser.arg()
           
 Parser LogikusParser.axiom()
          Return a parser that recognizes the grammar:
protected  Parser LogikusParser.divideFactor()
           
protected  Parser LogikusParser.evaluation()
           
protected  Parser LogikusParser.expression()
           
protected  Parser LogikusParser.factor()
           
protected  Parser LogikusParser.functor()
           
protected  Parser LogikusParser.listContents()
           
protected  Parser LogikusParser.listTail()
           
protected  Parser LogikusParser.minusPhrase()
           
protected  Parser LogikusParser.not()
           
 Parser LogikusParser.num()
           
protected  Parser LogikusParser.operator()
           
protected  Parser LogikusParser.phrase()
           
protected  Parser LogikusParser.plusPhrase()
           
static Parser LogikusParser.query()
          Return a parser that recognizes the grammar:
protected  Parser LogikusParser.ruleDef()
           
static Parser LogikusParser.start()
          Return a parser that recognizes the grammar:
protected  Parser LogikusParser.structure()
           
protected  Parser LogikusParser.term()
           
protected  Parser LogikusParser.timesFactor()
           
protected  Parser LogikusParser.variable()
           
 

Methods in sjm.examples.logic with parameters of type Parser
protected static Sequence LogikusParser.commaList(Parser p)
           
protected static java.lang.Object LogikusFacade.parse(TokenString ts, Parser p, java.lang.String type)
           
 

Uses of Parser in sjm.examples.mechanics
 

Subclasses of Parser in sjm.examples.mechanics
 class LowercaseWord
          This class shows the how to introduce a new type of terminal, specifically for recognizing lowercase words.
 class UppercaseWord
          This class shows the how to introduce a new type of terminal, specifically for recognizing uppercase words.
 class VerboseRepetition
          The match() method of this class prints the collection of assemblies it receives, and the new collection it creates.
 class VerboseSequence
          The match() method of this class prints the collection of assemblies it receives, and each new collection it creates.
 

Constructors in sjm.examples.mechanics with parameters of type Parser
VerboseRepetition.VerboseRepetition(Parser p)
          Constructs a VerboseRepetition of the given parser.
VerboseRepetition.VerboseRepetition(Parser p, java.lang.String name)
          Constructs a VerboseRepetition of the given parser with the given name.
 

Uses of Parser in sjm.examples.midimath
 

Methods in sjm.examples.midimath that return Parser
 Parser Midiloop.expression()
          Returns a parser that will recognize a Midimath expression.
protected  Parser Midiloop.factor()
          Returns a parser that will recognize either numbers, or arithmetic expressions in parentheses.
protected  Parser Midiloop.term()
          Returns a parser that will recognize arithmetic expressions containing just multiplication.
 Parser Midimath.expression()
          Returns a parser that will recognize a Midimath expression.
protected  Parser Midimath.term()
          Returns a parser that will recognize arithmetic expressions containing just multiplication.
 Parser MidiParser.expression()
          Returns a parser that will recognize a Midimath expression.
protected  Parser MidiParser.minusTerm()
           
protected  Parser MidiParser.term()
           
 Parser MidiloopNot.expression()
          Returns a parser that will recognize a Midimath expression.
protected  Parser MidiloopNot.factor()
          Returns a parser that will recognize either numbers, or arithmetic expressions in parentheses.
protected  Parser MidiloopNot.term()
          Returns a parser that will recognize arithmetic expressions containing just multiplication.
 

Uses of Parser in sjm.examples.minimath
 

Methods in sjm.examples.minimath that return Parser
static Parser MinimathParser.e()
          Return a parser that will recognize a Minimath expression.
protected static Parser MinimathParser.m()
           
protected static Parser MinimathParser.n()
           
static Parser MinimathParser.start()
          Returns a parser that will recognize a Minimath expression.
 

Uses of Parser in sjm.examples.pretty
 

Fields in sjm.examples.pretty declared as Parser
protected  Parser PrettyParser.parser
           
 

Methods in sjm.examples.pretty that return Parser
static Parser ShowPrettyAlternations.alligator()
          Returns a parser that recognizes some alligators.
static Parser ShowPrettyAlternations.crocodile()
          Returns a parser that recognizes some crocs.
static Parser ShowPrettyAlternations.crocodilian()
          Returns a parser that recognizes members of the crocodilian order.
static Parser ShowPrettyAlternations.lizard()
          Returns a parser that recognizes some lizards.
static Parser ShowPrettyAlternations.reptile()
          Returns a parser that recognizes some reptiles.
static Parser ShowPrettyAlternations.snake()
          Returns a parser that recognizes some snakes.
static Parser ShowPrettyAlternations.squamata()
          Returns a parser that recognizes some members of the squamata order.
 

Constructors in sjm.examples.pretty with parameters of type Parser
PrettyParser.PrettyParser(Parser parser)
          Construct a pretty parser whose assemblers create a "pretty print" of input text.
 

Uses of Parser in sjm.examples.query
 

Fields in sjm.examples.query declared as Parser
protected  Parser JaqlMediator.parser
           
 

Methods in sjm.examples.query that return Parser
protected  Parser JaqlParser.className()
           
protected  Parser JaqlParser.classNames()
           
protected  Parser JaqlParser.comparison()
           
protected  Parser JaqlParser.comparisons()
           
protected  Parser JaqlParser.optionalWhere()
           
 Parser JaqlParser.select()
          Returns a parser that will recognize a select statement.
protected  Parser JaqlParser.selectTerm()
           
protected  Parser JaqlParser.selectTerms()
           
 Parser JaqlParser.start()
          Returns a parser that will recognize a select statement.
protected  Parser JaqlParser.where()
           
 Parser ComparisonParser.arg()
          Returns a parser that will recognize a comparison argument.
 Parser ComparisonParser.comparison()
          Returns a parser that will recognize a comparison.
protected  Parser ComparisonParser.divideFactor()
           
 Parser ComparisonParser.expression()
          Returns a parser that will recognize an arithmetic expression.
protected  Parser ComparisonParser.factor()
           
protected  Parser ComparisonParser.minusTerm()
           
protected  Parser ComparisonParser.operator()
           
protected  Parser ComparisonParser.plusTerm()
           
protected  Parser ComparisonParser.term()
           
protected  Parser ComparisonParser.timesFactor()
           
protected  Parser ComparisonParser.variable()
           
protected  Parser JaqlMediator.parser()
           
 

Methods in sjm.examples.query with parameters of type Parser
protected static Sequence JaqlParser.commaList(Parser p)
           
 

Uses of Parser in sjm.examples.regular
 

Methods in sjm.examples.regular that return Parser
 Parser RegularParser.expression()
          Returns a parser that will recognize a regular expression.
protected  Parser RegularParser.factor()
           
protected  Parser RegularParser.letterOrDigit()
           
protected  Parser RegularParser.nextFactor()
           
protected  Parser RegularParser.orTerm()
           
protected  Parser RegularParser.phrase()
           
protected  Parser RegularParser.phraseStar()
           
static Parser RegularParser.start()
          Returns a parser that will recognize a regular expression.
protected  Parser RegularParser.term()
           
static Parser RegularParser.value(java.lang.String s)
          Return a parser that will match a CharacterAssembly, according to the value of a regular expression given in a string.
 

Uses of Parser in sjm.examples.reserved
 

Subclasses of Parser in sjm.examples.reserved
 class ReservedWord
          A ReservedWord matches a word whose token type is WordOrReservedState.TT_RESERVED.
 

Methods in sjm.examples.reserved that return Parser
static Parser VolumeQuery2.query()
          Return a parser that recognizes the grammar: query = (Word | volume)* '?';
protected static Parser VolumeQuery2.volume()
           
 

Uses of Parser in sjm.examples.robot
 

Methods in sjm.examples.robot that return Parser
 Parser RobotRefactored.command()
           
protected  Parser RobotRefactored.location()
           
protected  Parser RobotRefactored.pickCommand()
           
protected  Parser RobotRefactored.placeCommand()
           
protected  Parser RobotRefactored.scanCommand()
           
 Parser RobotParser.command()
          Returns a parser that will recognize a command for a track robot and build a corresponding command object.
protected  Parser RobotParser.location()
           
protected  Parser RobotParser.pickCommand()
           
protected  Parser RobotParser.placeCommand()
           
protected  Parser RobotParser.scanCommand()
           
static Parser RobotParser.start()
          Returns a parser that will recognize a command for a track robot and build a corresponding command object.
 

Uses of Parser in sjm.examples.sling
 

Subclasses of Parser in sjm.examples.sling
 class ReservedLiteral
          A ReservedLiteral matches a specific string that a tokenizer returns as a reserved word type.
 

Methods in sjm.examples.sling that return Parser
protected  Parser SlingParser.assignment()
           
protected  Parser SlingParser.baseElement()
           
protected static Parser SlingParser.comma()
           
protected  Parser SlingParser.element()
           
protected  Parser SlingParser.expression()
           
protected  Parser SlingParser.forStatement()
           
protected static Parser SlingParser.lBrace()
           
protected static Parser SlingParser.lParen()
           
protected  Parser SlingParser.negative()
           
protected  Parser SlingParser.noArgs(java.lang.String name, SlingFunction f)
           
protected  Parser SlingParser.num()
           
protected  Parser SlingParser.oneArg(java.lang.String name, SlingFunction f)
           
protected  Parser SlingParser.pi()
           
protected  Parser SlingParser.plotStatement()
           
protected static Parser SlingParser.rBrace()
           
protected static Parser SlingParser.rParen()
           
protected  Parser SlingParser.s1()
           
protected  Parser SlingParser.s2()
           
protected  Parser SlingParser.scale()
           
protected static Parser SlingParser.semicolon()
           
 Parser SlingParser.start()
           
protected  Parser SlingParser.statement()
           
protected  Parser SlingParser.statements()
           
protected  Parser SlingParser.term()
           
protected  Parser SlingParser.twoArg(java.lang.String name, SlingFunction f)
           
protected  Parser SlingParser.variable()
           
 

Uses of Parser in sjm.examples.tests
 

Methods in sjm.examples.tests that return Parser
static Parser Dangle.callCustomer()
           
static Parser Dangle.comparison()
           
static Parser Dangle.expression()
           
static Parser Dangle.ifelse()
           
static Parser Dangle.iff()
           
static Parser Dangle.operator()
           
static Parser Dangle.sendBill()
           
static Parser Dangle.statement()
          Return a parser that recognizes the grammar:
static Parser VolumeQuery.query()
           
static Parser VolumeQuery.volume()
           
 

Uses of Parser in sjm.examples.track
 

Subclasses of Parser in sjm.examples.track
 class Track
          A Track is a sequence that throws a TrackException if the sequence begins but does not complete.
 

Methods in sjm.examples.track that return Parser
static Parser ShowTrack.list()
           
 

Methods in sjm.examples.track with parameters of type Parser
protected  void Track.throwTrackException(java.util.Vector previousState, Parser p)
           
 

Uses of Parser in sjm.parse
 

Subclasses of Parser in sjm.parse
 class Alternation
          An Alternation object is a collection of parsers, any one of which can successfully match against an assembly.
 class CollectionParser
          This class abstracts the behavior common to parsers that consist of a series of other parsers.
 class Empty
          An Empty parser matches any assembly once, and applies its assembler that one time.
 class Repetition
          A Repetition matches its underlying parser repeatedly against a assembly.
 class Sequence
          A Sequence object is a collection of parsers, all of which must in turn match against an assembly for this parser to successfully match.
 class Terminal
          A Terminal is a parser that is not a composition of other parsers.
 

Fields in sjm.parse declared as Parser
protected  Parser ParserTester.p
           
protected  Parser Repetition.subparser
           
 

Methods in sjm.parse that return Parser
 Parser Parser.setAssembler(Assembler assembler)
          Sets the object that will work on an assembly whenever this parser successfully matches against the assembly.
 Parser Repetition.getSubparser()
          Return this parser's subparser.
 Parser Repetition.setPreAssembler(Assembler preAssembler)
          Sets the object that will work on every assembly before matching against it.
 

Methods in sjm.parse with parameters of type Parser
 CollectionParser CollectionParser.add(Parser e)
          Adds a parser to the collection.
 

Constructors in sjm.parse with parameters of type Parser
ParserTester.ParserTester(Parser p)
          Constructs a tester for the given parser.
Repetition.Repetition(Parser p)
          Constructs a repetition of the given parser.
Repetition.Repetition(Parser subparser, java.lang.String name)
          Constructs a repetition of the given parser with the given name.
 

Uses of Parser in sjm.parse.chars
 

Subclasses of Parser in sjm.parse.chars
 class Char
          A Char matches a character from a character assembly.
 class Digit
          A Digit matches a digit from a character assembly.
 class Letter
          A Letter matches any letter from a character assembly.
 class SpecificChar
          A SpecificChar matches a specified character from a character assembly.
 

Constructors in sjm.parse.chars with parameters of type Parser
CharacterTester.CharacterTester(Parser p)
           
 

Uses of Parser in sjm.parse.tokens
 

Subclasses of Parser in sjm.parse.tokens
 class CaselessLiteral
          A CaselessLiteral matches a specified String from an assembly, disregarding case.
 class Literal
          A Literal matches a specific String from an assembly.
 class Num
          A Num matches a number from a token assembly.
 class QuotedString
          A QuotedString matches a quoted string, like "this one" from a token assembly.
 class Symbol
          A Symbol matches a specific sequence, such as <, or <= that a tokenizer returns as a symbol.
 class Word
          A Word matches a word from a token assembly.
 

Constructors in sjm.parse.tokens with parameters of type Parser
TokenTester.TokenTester(Parser p)
           
 


by Steve Metsker