开发者

Where can I find a yacc grammar for ECMAscript/Actionscript/Javascript [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

My compilers class requires us to find a yacc grammar for one of these languages and combine it with the tokenizer we wrote. Presumably this is something easy to Google but I can't find it and my classmates are struggling as well. A yacc grammar for any of those thr开发者_JAVA百科ee languages would suffice.


The grammar at the bellow link uses LALR parser(see [Changelog][1]) same as Yacc, I think is much closer to what you need than ANTLR wich usees LL according to this answer: Can a ANTLR grammar file be modified to be used by PLY?

You can find the LALR Ecmascript grammar here: http://scriptonite.cvs.sourceforge.net/viewvc/scriptonite/scriptonite/src/ecmascript.grammar?revision=1.7

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜