[metaas-dev] parser: super.method() fails
Ralf Bokelberg
ralf.bokelberg at gmail.com
Thu Mar 27 09:45:18 UTC 2008
Hi Dave
i wanted to write a formatter. The formatter should read in any
ActionScript and output it as nicely indented and formatted.
Since i don't know about antlr very much, i started to write parser
manually now.
Cheers
Ralf.
On Thu, Mar 27, 2008 at 9:09 AM, David Holroyd
<dave at badgers-in-foil.co.uk> wrote:
> Hi!
>
>
> On Wed, Mar 26, 2008 at 10:31:48AM +0100, Ralf Bokelberg wrote:
> > When i tried to import a file, which contains a ActionScript statement
> > like super.method(1,2,3), parsing failed with an error. It seems like
> > it expects super to be a method name and not an object. Generally i
> > wonder, why super handling is part of the grammar. Shouldn't this be
> > part of a later stage?
>
> Well, the spec says that 'super' is a keyword with special significance
> in the grammar,
>
> http://livedocs.adobe.com/specs/actionscript/3/as3_specification129.html
>
> This prevents use of 'super' in contexts where identifiers would
> otherwise be allowed, like,
>
> foo.super.bar.method(1,2,3); or var super = 1;
>
> Currently, metaas only supports 'super' in a super-statement,
>
> http://livedocs.adobe.com/specs/actionscript/3/as3_specification152.html
>
> When implementing that, I couldn't get the super-expression to work due
> to ambiguity problems in the resulting ANTLR grammar. Sorry!
>
> I know I need to make further efforts to get that working. (Do you
> fancy fiddling with the grammar definition? ;)
>
> Will this cause big problems for your intended application?
>
>
> ta,
> dave
>
> --
> http://david.holroyd.me.uk/
>
> _______________________________________________
> metaas-dev mailing list
> metaas-dev at lists.badgers-in-foil.co.uk
> http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev
>
--
Ralf Bokelberg <ralf.bokelberg at gmail.com>
Flex & Flash Consultant based in Cologne/Germany
More information about the metaas-dev
mailing list