Parse tree and grammar information

2020-07-16 12:56发布

问题:

Does anyone know where to find good online resources with examples of how to make grammars and parse trees? Preferably introductory materials. Info that is n00b friendly, haven't found anything good with Google myself.

Edit: I'm thinking about theory, not a specific parser software.

回答1:

Not online, but maybe you should take a look at Compilers: Principles, Techniques, and Tools (2nd Edition) by Aho et al. This is a standard text that has been evolving for 30 years (if you count the 1st Dragon Book, published in 1977



回答2:

Well, here's where I learned it...

http://www.cs.uiuc.edu/class/sp08/cs273/

Click on the lectures tag, scroll through till you find the lectures on the material you are talking about.

Love my alma mater. God bless them, they never take down their lectures in any class and you can go and read any of them anytime you want.

edit: Looks like you want lecture11



回答3:

Antlr?

http://www.antlr.org/

Has a quite good IDE for designing a grammar, and a lot of generators for different languages.



回答4:

www.goldparser.com

The tools are free and good to work on. It has technical and theoretical tutorials, lots of info, tools and code generators for many langs.



回答5:

in C,C++ use lex and bison in java use ANTLR this is a beautiful antlr video tutorial