Building Parsers with Java

Package sjm.examples.mechanics

Class Summary
LowercaseWord This class shows the how to introduce a new type of terminal, specifically for recognizing lowercase words.
ShowAlternationBasic This class shows the basics of using an alternation.
ShowAlternationSet This class shows that an alternation can, by itself, create a collection of possible matches.
ShowAmbiguity This class shows than a parser can find more than one way to completely consume an assembly.
ShowAssemblies This class shows that a repetition of an object of the Terminal base class will match an entire assembly.
ShowAstarAB This class shows that the "right" answer for a repetition object is not always to match all that it can.
ShowBestMatch Show that Parser.bestMatch() matches a parser against an input as far as possible.
ShowCompleteMatch This class shows that Parser.completeMatch() returns a complete match, or null.
ShowCycle Show that a parser that contains a cycle prints itself without looping.
ShowNewTerminals Show the use of new subclasses of Terminal.
ShowPush Show the value of not pushing the element a terminal matches.
ShowRepetitionMatch This class shows that a repetition object creates more than one match from a single assembly.
ShowSequenceLeftovers This class shows the complete results of matching an arithmetic expression parser against an expression.
ShowSequenceManual This class shows that a Sequence match is equivalent to a series of match() calls.
ShowSequencePinch This class shows that a Sequence match may widen and then narrow the state of a match.
ShowSequenceSimple This class uses a VerboseSequence to show the progress a sequence makes during matching.
ShowToString1 Show how a simple composite prints itself.
ShowToString2 Show how a moderately complex composite parser prints itself.
ShowVacation This class uses a VerboseRepetition to show the progress a repetition makes during matching.
ShowZeroMatch This class shows that a repetition object matches successfully once, when the subparser matches an assembly 0 times.
UppercaseWord This class shows the how to introduce a new type of terminal, specifically for recognizing uppercase words.
VerboseRepetition The match() method of this class prints the collection of assemblies it receives, and the new collection it creates.
VerboseSequence The match() method of this class prints the collection of assemblies it receives, and each new collection it creates.
 


by Steve Metsker