Sequential parser

sanity edited this page Mar 25, 2013 · 2 revisions

LastCalc's parser is very sophisticated and has many components, but fortunately provides a very friendly high-level interface to it, which is used at various points through LastCalc's user-facing code.

Here is a simple usage example:

final SequentialParser sp = SequentialParser.create();
final TokenList res = sp.parseNext("a+1");

This will print "53".

You can see many other usage examples in - which also serves as a suite of integration tests for all of LastCalc's parsing code.