|LRSTAR: LR(*) parser generator for C++||A.M.D.G.|
Setup LRSTAR DFA Release
LRSTAR vs ANTLR vs BISON
* Reasons why people use LRSTAR.
LRSTAR will report conflicts, if found in your grammar, but offers an LR(*) parsing algorithm to take care of everything at runtime. Testing will eventually determine if the grammar is correct, and if not, the conflict report may prove helpful in correcting the grammar.
ANTLR accepts any grammar without complaining, but ambiguous grammars may cause problems like slow parsers or ambiguous parsers. If the grammar is not right, how can the parser be correct? Hopefully, the LL(*) parsing algorthm will take care of everything at runtime.
LRSTAR uses an LR table-driven parsing algorithm, like YACC. However, LRSTAR uses a more modern parser-table format, which allows chain-reduction elimination. LR parsers handle a larger class of grammars than LL parsers. LR parsers are the result of years of research and provide state-of-the-art small, fast parsers.
ANTLR uses an LL recursive-descent parsing technique, like the hand-coding method people have been using for many years. People like it because it's easy to follow the parsing with a debugger. But LL hates left recursion and forces people to write grammars in an unnatural way. ANTLR has allieviated this problem, but not completely.
To get small-fast parsers, LRSTAR requires some things that only C++ can provide. C++ is a systems-level, compiled language for professional work. Non-professional programmers are scared of C++. So, let them use Java or Python and stay away from projects that require maximum performance. And finally, the C++ code present in LRSTAR parsers is the most efficient C++ style of coding, static variables, function pointers, arrays instead of linked lists, and more.
|(c) Copyright LRTEC 2020. All rights reserved.|