[antlr-interest] automatic tree grammar generation

Loring Craymer lgcraymer at yahoo.com
Mon May 19 14:07:18 PDT 2008


Bernardo--

I did a version of ANTLR 2 (2.8) with that capability, but the distribution got buried behind the OpenChannel licensing conditions.  That was one of the things that inspired the ANTLR 3 effort, and is (or will be--modeling transformations that use the attribute algebra takes a bit of effort to implement) a key feature of ANTLR Yggdrasil.  Automated tree grammar generation does cut development time significantly.

The lack of a first-class attribute syntax in ANTLR 3 makes it very difficult to impossible to build a "complete" tree grammar automatically (long-distance translocations would be hidden in actions) for some of the interesting translation situations, but it should be possible to cover 99% of the cases arising with hand editing for the remainder.

I am in the middle of getting the tree grammar generation working for Yggdrasil.  It will take me about three weeks of intensive debug and test to get the attribute algebra modeling working (but don't ask me when I will have those three weeks--I have other priorities) and then about a month to get the annotation-based (^ and current rule tree manipulations) transformation passes.  Once I have that, I intend to release a pre-1.0 version of Yggdrasil for general use.

--Loring


----- Original Message ----
From: Bernardo Elayda <belayda at gmail.com>
To: antlr-interest at antlr.org
Sent: Monday, May 19, 2008 11:28:05 AM
Subject: [antlr-interest] automatic tree grammar generation

Hi!

If a tree grammar is derived from an AST made by ANTLR, shouldn't the creation of the tree grammar be able to happen automatically?
If this can't be done today, I think this would be a nice feature for the future.

This question occurred to me while I was writing a paper on using ANTLR as a front-end for a virtual machine.

tia,
Bernie Elayda



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080519/b3dae1e7/attachment.html 


More information about the antlr-interest mailing list