Re:Programming Your Own Language in C++
by jfoutz on Sunday August 07, 2016 @05:30PM
(#12243763)
ANTLR generates a recursive descent parser. The value is, it's easier to compare (hopefully) your EBNF to the antlr spec than it is to compare your EBNF to lower level code.
[ Parent
| on HN ]
Doesn't ANTLR usually generate a bottom-up parser? I've never used ANTLR but it would be very odd to generate a recursive descent parser; LR grammars are parsed bottom-up (presumably the ‘LR’ in ‘ANTLR’).
Bottom-up parsers are nigh unreadable by mortals.
ANTLR generates top down parsers which use a few different algorithms, including Parr's LL(star) algorithm and the new ALL(star) algorithm for antlr 4:
https://scholar.google.com/scholar?cluster=11340764028758422...
https://scholar.google.com/scholar?cluster=70305927860962254...
The ANTLR acronym is explained here and doesn't have anything to do with LR grammars: http://www.antlr.org/