ANTLR4::Grammar v0.1.0 to Perl 6 CPAN

ANTLR4::Grammar lets you convert ANTLR4 lexer and parser grammars from ANTLR to Perl 6. It currently works with all of the basic EBNF constructs, and for the moment chooses to ignore the features of ANTLR that the native Grammar type doesn't support. When I've added the basic Action class I'll probably add support for ANTLR4 modes. ANTLR4 types make a bit of sense as they've at least got string and int types, but actions don't make much sense as if you're using the tool, you're likely porting an existing Java- or C-based grammar over to Perl 6 and the existing Java code wouldn't make sense.

Future additions include automatically generating a basic Action class, and possibly enough code to build an object-only AST from the grammar itself.

Leave a comment

About DrForr

user-pic I blog about Perl.