3 ms·
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 lowe
by jfoutz 10y ago
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.
- PeCaN 10y agoDoesn'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.
- chubot 10y agoANTLR 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=11340764028758422091&hl=en&as_sdt=2005&sciodt=0,5 https://scholar.google.com/scholar?cluster=11340764028758422... https://scholar.google.com/scholar?cluster=7030592786096225431&hl=en&as_sdt=0,5&sciodt=0,5 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/ http://www.antlr.org/