开发者

JavaCC: Please give me links to "real" examples [closed]

开发者 https://www.devze.com 2022-12-28 06:57 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

I know that there are many examples of JavaCC parsers here, but they all do nothing. They just accept a string, or produce parsing errors.

What I need is a few examples of real parsers, which actually do something during parsing. (Such a开发者_StackOverflow社区s building a DOM tree during parsing an XML string).

Please help! ;)


Take a look at EcmaScript.jj that DOJO library maintains over here - http://svn.dojotoolkit.org/src/trunk/tools/jslinker/src/org/dojo/jsl/parser/EcmaScript.jjt

It parses real javascript and then optimizes it. Read more about what it does out here http://svn.dojotoolkit.org/src/trunk/tools/jslinker/docs/readme.txt


http://www.engr.mun.ca/~theo/JavaCC-Tutorial/javacc-tutorial.pdf
http://www.cobase.cs.ucla.edu/projects/coxml/doc/Eric-Master.pdf


The JavaCC website features a grammar repository with grammars for many programming languages (C,C++,VB,etc.).

Check it out


SourceMeter, as patched, uses JavaCC to derive Java source code metrics.

0

精彩评论

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

关注公众号