[antlr-interest] updated "antlr 2 bashing list"

Jim O'Connor Jim.OConnor at microfocus.com
Tue Mar 16 10:18:16 PST 2004


IBM's Job Control Language (JCL) has a feature called symbolic replacement
 
SET   MYVAR="FRED,ANOTHERPARAMETER=MARY"
DD   DDNAME PARAMETER=&MYVAR
 
The ability to recognize PARAMETER=FRED,ANOTHERPARAMETER=MARY involves
modifying the input stream.  A workable solution involves a class MyToken
that has a TracedText element.  It knows about &MYVAR being replaced by
"FRED,ANOTHERPARAMETER=MARY".  To use these constructs, it was necessary to
modify the JavaCodeGenerator.
 
println("   _token = makeToken(_ttype);");
 
was change to
 
println("   _token = makeToken(_ttype, inputState.tokenStartColumn + _begin
- 1, text.length()-_begin);");
 
 
and I had to make tokenStartColumn public in order to use a TracedText
feature of the MyToken class.
 
 
What can be done to make this easier to implement?
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20040316/8a8ce095/attachment.html


More information about the antlr-interest mailing list