How to Generate a Tree-Building Parser in Java using JJTree

JavaCC is a parser-generator for Java. JJTree augments JavaCC: it makes the generated parser build a syntax tree, without you having to program the tree-building yourself. I once wrote an Introduction to JJTree; and I've just had an email requesting a JJTree example with which a complete beginner could get started. So I decided to blog one. It shows you how to generate a tree-building parser for a language of simple arithmetic expressions.



April 15, 2009
URL:http://www.drdobbs.com/jvm/how-to-generate-a-tree-building-parser-i/228700174

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.