> I seem to remember reading somewhere that Falcon uses a grammar based > approach as well to parsing AS3. I'm wondering how they're pulling it off > then...
Falcon currently uses an ANTLR 2 grammar to parse ActionScript. We've been improving the grammar that was previously used for code intelligence in Flash Builder. We expect to move to ANTLR 3 at some point. We handle semicolons by calling a Java method we wrote, matchOptionalSemicolon(), in the actions of various productions. We don't try to represent the optional semicolons in the productions of the grammar itself. - Gordon Smith, Falcon team, Adobe -----Original Message----- From: Roland Zwaga [mailto:[email protected]] Sent: Wednesday, February 22, 2012 4:52 AM To: [email protected] Subject: Re: [gosh] On the sad tale of BNF and optional semicolons > > Everything I've read points to the same thing: EcmaScript-style > languages cannot be expressed as BNF. I suspect that the reason why > Adobe are talking about the changes to language in the Falcon compiler > breaking some existing > AS3 projects is because they have had to modify the language to make > it definable in something like BNF. > I seem to remember reading somewhere that Falcon uses a grammar based approach as well to parsing AS3. I'm wondering how they're pulling it off then... Roland
