noob: is ANTLR the right tool for me - I think i miss a point (parsing slightly complex configuration files)
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Klaus_Koeder
Posted On:   Monday, March 12, 2012 11:16 AM

Hi, for a small project I need to analyze configuration files which are slightly complex. (nested blocks; vector values etc ..)

I was looking at jflex/bison and antlr. I installed ANTLRworks and played around. Somehow I miss examples which emphasis on actions. I found the "Five minute introduction" calculator example but it only seems to analyze if the syntax is correct and doesn't calculate the formula at all. Googling didn't bring up much more. So I think I missing some points here ...


How is this supposed to work? Can you point me to a simple example?


thx n rgds

KK

Re: noob: is ANTLR the right tool for me - I think i miss a point (parsing slightly complex configuration files)

Posted By:   jeancallisti  
Posted On:   Tuesday, June 26, 2012 08:02 AM

If you follow those tutorials step by step you'll see how to move on from simple syntax recognizing to actually producing an output.

http://javadude.com/articles/antlr3xtut/

Part 9 is the most interesting, but you might need to watch the previous ones to get it.


Re: noob: is ANTLR the right tool for me - I think i miss a point (parsing slightly complex configuration files)

Posted By:   franz  
Posted On:   Monday, June 18, 2012 10:56 AM

About | Sitemap | Contact