[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sample SimpleC grammar

Hi Patrick,

> >  Required components:
> >  * SableCC 2.18.0 or newer (http://sourceforge.net/projects/sablecc)

It simply reads: it will run perfectly well with SableCC 2.18.xx, 
and it will not work with 2.16.xx 

Before the stable 2.18 is out, you have to give it a shot with 2.17.xx, 
but (in README file) there is no guarantee it will always work. 2.17.xx is 
a developers release.

I may assure you informally that it will work with the latest 2.17.xx,
but I did not want to make dependencies on development version of SableCC 
in the README.

> I'll try with 2.17 now...

It will work, get the latest one ;o)
> I was also wondering about the use of TreeBuilder.getNode() in this
> SimpleC example.  I couldn't find any references to TreeBuilder.  What is
> that?

This is one of new generated utility classes, which new (2.17.xx and up) 
SableCC provides.  This class is generated dynamically based on the 
grammar file, and simplifies the API for parsing the given grammar input.
(BTW, there is a minor bug in the current TreeBuilder, which is already 
fixed in CVS, but not included in the last release. It does not matter for 
the grammars example though, and SimpleC will work just fine).

have fun