[antlr-interest] Language Processor (like ASP)

craigmain001 <craig at palantir.co.za> craig at palantir.co.za
Thu Feb 6 05:51:05 PST 2003


Hi,

I need to get the parser to re-parse sections of the text. My example 
here needs to have the foreach reparse everying when it gets to 
endfor, it needs to reparse whatever is between the for and endfor.

How would one go about achieving this?
Would you re-parse from the foreach again each time?

Given the following.

<a>
  <b>1</b>
  <b>2</b>
  <c>3</c>
</a>

And the input file.
-------------------

[foreach (a\b)]
OUTPUT SOMETHING
ANITEM = [=nodevalue]
[endfor]

I wish to produce
-------------------

OUTPUT SOMETHING
ANITEM = 1
OUTPUT SOMETHING
ANITEM = 2



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list