[antlr-interest] ANTLR ActionScript target broken

Stefan seaside.ki at me.com
Thu Jun 23 15:50:16 PDT 2011


Thx Jim!

Ah, I see. I'll try to contact the author

I'd probably jump in and invest some days to reanimate the project. There are
several problems, but all seem to be small and relatively easy fixable.

Let's see. Installing the Maven Eclipse plugin right now ;-)

Stefan


Am 24.06.2011 um 00:29 schrieb Jim Idle:

> ActionScript has been orphaned as far as I can tell - you could try
> emailing the original author of that target and see if they have any plans
> to continue with it.
> 
> Jim
> 
>> -----Original Message-----
>> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
>> bounces at antlr.org] On Behalf Of Stefan
>> Sent: Thursday, June 23, 2011 2:48 PM
>> To: antlr-interest at antlr.org
>> Subject: [antlr-interest] ANTLR ActionScript target broken
>> 
>> Hi,
>> 
>> According to these instructions, I'm trying to use ANTLR generated *.as
>> files in a current Flash Builder 4.5.1 project.
>> 
>> Therefore, I added this ANTLR's Actionscript runtime to my project -
>> without problems.
>> 
>> I compiled lexer/parser specs using ANTLRWorks without problems too.
>> 
>> I added the language option to the source *.g file to make ANTLR
>> generate Actionscript sources:
>> 
>> options {
>>    backtrack = true;
>>    memoize = true;
>>    k=2;
>>    output = AST;
>>    language=ActionScript;        // Added this
>>    ASTLabelType = CommonTree;
>> }
>> Unfortunately, the ANTLR/ANTLRworks generated Actionscript code is
>> buggy:
>> 
>> Catch statements read like this catch (RecognitionException re), but
>> should read like this:catch ( re:RecognitionException ).
>> 
>> Furthermore, Flash Builder complains about the use of Array here:
>> 
>> public override function get tokenNames():Array { return
>> PhpParser.tokenNames; } Besides this, other problems exist in the
>> generated ActionScript sources. E.g. wrong function declaration,
>> package declaration inside package, ChartStream.getLine() called
>> instead of ChartStream.line(),...
>> 
>> I checked ANTLR itself too. But the pure JAR renders the same problem.
>> Thus, ANTLRworks isn't the problem, but ANTLR itself.
>> 
>> Assuming that I did everything correct, I wonder if and when the ANTLR
>> project may provide a bug fix.
>> 
>> Ah, hints how to make the current ANTLR work with ActionScript, would
>> be even better ;-)
>> 
>> 
>> Kinds regards,
>> 
>> S
>> 
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
>> email-address
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list