Where can I find a JavaCC (Java Compiler Compiler) tutorial?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abey_Mullassery
Posted On:   Wednesday, July 18, 2001 04:19 AM

I have not used lex & yacc OR flex & bison. Hence I could not fully understand the tutorial/ user guide which came along with the JavaCC (downloaded from WebGain).

I wanted to know if there are any other tutorials or guides which will help me write simple grammer files and improve step by step.


Anyone who can write a step by step guide to a simple grammer file using most of the options (all productions) will be greatly appreciated (Lots of people waiting for the same).

Re: Where can I find a JavaCC (Java Compiler Compiler) tutorial?

Posted By:   Abey_Mullassery  
Posted On:   Tuesday, August 21, 2001 03:15 AM

I got great help from newsgroups viz.,
comp.compilers.tools.javacc
A great place for JavaCC related doubts.


I think Antlr is also discussed at
comp.compilers.tools.pccts


I used the java production methods and the ebnf productions to develop my parser. It is quite simple for simple requirements (such as mine).
For eg.


String Words():
{
StringBuffer theWords = new StringBuffer();
}
{
{theWords.append(getToken(0).image);}
{return theWords.toString();}
}


TOKEN:
{

}


I used javaCC to develop a parser for netlist files.

Re: Where can I find a JavaCC (Java Compiler Compiler) tutorial?

Posted By:   Dermot_Hennessy  
Posted On:   Wednesday, July 18, 2001 04:48 AM

Have a look at this article from Javaworld.

Dermot
About | Sitemap | Contact