When ANTLR generates my lexer, I get this method:

***********

@Override
public int specialStateTransition(int s, IntStream _input)
   throws NoViableAltException {
   IntStream input = _input;
   int _s = s;
   switch (s) {
     case 0:
     int LA26_16 = input.LA(1);
     s = -1;
     if ((LA26_16 == '\"')) {
           s = 77;
     } else if (((LA26_16 >= '\u0000' && LA26_16 <= '\t')
         || (LA26_16 >= '\u000B' && LA26_16 <= '\f')
         || (LA26_16 >= '\u000E' && LA26_16 <= '!')
         || (LA26_16 >= '#' && LA26_16 <= '\u2027')
         || (LA26_16 >= '\u202A' && LA26_16 <= '\uFFFF'))) {
       s = 36;
     }

     if (s >= 0)
       return s;
     break;
   }
   NoViableAltException nvae =
     new NoViableAltException(getDescription(), 26, _s, input);
     error(nvae);
     throw nvae;
}

***********
What strikes me is that the method argument "s" is modified and 
returned. There is a similarly named local variable "_s" that is 
assigned, but is not modified.

Is this correct or should some of these "s" be "_s" ?
-- 
-bj-
Bart J. Geraci
[email protected]

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to