[antlr-interest] How can I insert a Token in the token stream?

Yet ANOTHER Test Runner yatr.main at gmail.com
Sat Sep 20 22:00:43 PDT 2008


Sorry for my poor English :(

Many computer languages like TTCN3, allows near '}' token or at the last
statement inside block statement omit ';' token correctly, like this:

if(xx){

    const integer i:=1;    //error if missing ';'

    const integer i2:=2  //ok! even though missing ';'

}

How can I insert a token ';' in the TokenStream if it is omitted.

e.g.:

if(xx) { } /* Don't insert ';' here */ else{} /* Insert ';' here */

if(yy) {} /* insert a ';' here*/

if(zz) { const integer i1:=5; const integer i2:=6 }

Like this:

if(xx) {} else {};

if(yy) {};

if(zz) { const integer i1:=5; const integer i2:=6; } ;

Thank you!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080921/97ad2d54/attachment.html 


More information about the antlr-interest mailing list