Package com.singularsys.jeptests.system
Class ModifiedParserTest.SuffixArrayAccessShuntingYard
java.lang.Object
com.singularsys.jep.configurableparser.ShuntingYard
com.singularsys.jeptests.system.ModifiedParserTest.SuffixArrayAccessShuntingYard
- All Implemented Interfaces:
GrammarParser
- Enclosing class:
ModifiedParserTest
A subclass of the ShuntingYard which can parse various forms of list element access.
So
seq(2,5)[3] [5,6,7][2] and ([1,2]+[3,4])[2] are all possible.
If works by overriding the ShuntingYard.prefixSuffix() method
to treat array access as a general suffix operator which can be applied to all
prefix expressions.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.configurableparser.ShuntingYard
ShuntingYard.PrefixRes, ShuntingYard.ShuntingYardGrammarParserFactory -
Field Summary
Fields inherited from class com.singularsys.jep.configurableparser.ShuntingYard
DUMP, implicitMul, it, jep, matchers, nf, nodes, ops, sentinel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidA prefix() optionally followed by suffix operators.Methods inherited from class com.singularsys.jep.configurableparser.ShuntingYard
compareOps, dumpState, expression, getIterator, parse, parsePrefixSuffix, parseSubExpression, popOp, prefix, prefixSuffixUnchecked, prefixUnchecked, pushOp, setIterator
-
Constructor Details
-
SuffixArrayAccessShuntingYard
-
-
Method Details
-
prefixSuffix
Description copied from class:ShuntingYardA prefix() optionally followed by suffix operators.- Overrides:
prefixSuffixin classShuntingYard- Throws:
ParseException
-