[antlr-interest] generated code not compilable - with parameters.
Matt Benson
gudnabrsam at yahoo.com
Wed Oct 30 09:58:13 PST 2002
I have no idea what the problem is, being a novice,
but I thought I would point out that you are referring
to ANTLR, not Ant.
-Matt
--- praveen_c <praveen_c at yahoo.com> wrote:
> I got ANT 2.7.2 and got rid of the previous problem.
> Thanks guys.
>
> Looks like I'm onto the next one. I pasted the rule
> and code fragment
> at the end of this message. Line 15 of the generated
> code should have
> an additional boolean parameter. How do I tell ant
> to generate an
> additional param?? I don't think I've control on
> that.
>
> Please help.
>
> Thanks,
> Praveen.
>
>
------------------------GRAMMAR-----------------------
> TEXT [boolean stopAtEndingAngleBracket]:
> (END_LOOP) => END_LOOP {
> $setType(END_LOOP); } |
> (
> options
> {
> generateAmbigWarnings=false;
> }:
> ( {
> !isEndOfText(stopAtEndingAngleBracket) }? . )*
> );
> ------------------------END
> GRAMMAR-----------------------
>
> ------------------------GENERATED
> CODE--------------------
> 1 public Token nextToken() throws
> TokenStreamException {
> 2 Token theRetToken=null;
> 3 tryAgain:
> 4 for (;;) {
> 5 Token _token = null;
> 6 int _ttype = Token.INVALID_TYPE;
> 7 resetText();
> 8 try { // for char stream error handling
> 9 try { // for lexical error handling
> 10 if ((LA(1)=='<') && (LA(2)=='@')) {
> 11 mTAG(true);
> 12 theRetToken=_returnToken;
> 13 }
> 14 else {
> 15 mTEXT(true);
> 16 theRetToken=_returnToken;
> 17 }
>
-------------------------------------------------------------
>
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list