80 likes | 391 Views
ANTLR. Andrew Pangborn & Zach Busser. ANTLR in a Nutshell. AN other T ool for L anguage R ecognition generates lexers generates parsers (and parse trees) Java-based, but has runtime implementations in other languages like python, javascript, c, c# An LL(k) parser
E N D
ANTLR Andrew Pangborn & Zach Busser
ANTLR in a Nutshell • ANother Tool for Language Recognition • generates lexers • generates parsers (and parse trees) • Java-based, but has runtime implementations in other languages like python, javascript, c, c# • An LL(k) parser • EBNF grammar notation with custom extensions / syntax
ANTLR Features • What can ANTLR do? • Extensions to typical EBNF?
ANTLR Pros • What features does ANTLR have that are better/different from other parser generating tools? • ANTLRWorks – a great tool • Target languages besides Java – C, python, Javascript, etc.
ANTLR Shortcomings • An LL parser – cannot support left-recursive grammars like YACC or PJ2 • No way to specify operator precedence (?)
Getting started with ANTLR • http://www.antlr.org/wiki/display/ANTLR3/FAQ+-+Getting+Started • A good link – ANTLR documentation is pretty helpful online.