BNF grammar for AS3 (or ECMAScript would be good too)

Hi. I’m looking for a conscious all-in-one-place BNF description of our cherished language :slight_smile: I’ve found some results in Google, but they are incomplete or bizarre :slight_smile:
I need this because I think I’ve made already 3 attempts at writing a proper syntax highlighter for AS3 (just so you know, not a single program in the entire world highlights it properly). But I keep running into a dead end with every next technique I try. So, I was thinking about trying more scientific approach, and I’d need a formal description of the language for that. Who knew it would be so hard to find? :slight_smile:
OK, to tell you what I’ve found already: http://stackoverflow.com/questions/1786565/ebnf-for-ecmascript and I’ve followed every single link in that discussion. ECMA’s standard is the best approach so far, but it’s still a lot of work of consolidating all parts that are distributed randomly across 252 pages…

Just for the record - ANTRL file puts ‘this’, ‘void’, ‘in’ and ‘if’ in the same category, which is unacceptable / essentially wrong. I’ve no idea why did they come with this strange definition… :S