I found something on ANTLR wiki, to override netxtToken

but still the 1 number on first line does not raise an exception while
if there are two numbers it does:

--NO ERROR although it should have been
if ( x.Age = 10) 1
then
  alert(x.Age);
  alert(true);
else
  alert(false);
end

-- ERROR:
if ( x.Age = 10) 1 2
then
  alert(x.Age);
  alert(true);
else
  alert(false);
end





On Thu, Jun 4, 2009 at 12:45 PM, Liviu U <[email protected]> wrote:
> I notices something strange in 3.1.2
>
> If i have a rule:  var x = int; and another that matches: if cond then
> statements end
>
> for a script:
>
> if var x=3 ....
>
> ANTLR ignores the if and parses an assignment. This is not what i
> expect. I need to have an error raised.
>
> Is there a way to configure the behaviour i expect? I remember that in
> older versions the behavior of the parser was different...
>

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