I have been trying all day to get the rule below accepted (oh yeah,
that doesn't count about 2 hours wasted before I figured out that you
can't have a space after the right curly brace and the question mark
in a semantic predicate (grin))
I get a "cannot generate the grammar because" error
Below is a partial (pretty standard, I would assume) grammar that
creates a tree representing a boolean comparison. The TAttributeType
is essentially a constant that represents the type of the found
expressions, e.g, TAttributeType.atString, TAttributeType.atInteger,
TAttributeType.atBo
Is there any reason why a mailing list is being used rather than a
newsgroup, or a google group?
David Jameson
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~-~--~~~-
Capturing errors is not the issue, I've already got such a framework
setup --- the problem I'm running into is finding that "token" object
with the line and col information in it so that I can call a method
such as your AddError in the first place.
In other words, using your example, suppo
I understand that if I get a RecognitionException, I can extract the
line and column from the exeception.
However, suppose I'm inside a rule and I decide that I have a semantic
error (i.e, variable types aren't compatible or something). At that
point I want to generate a Semantic Error tha
I'm new to ANTLR (love it, by the way) so hopefully the following
question is not too stupid!
Suppose I have a language whose core I want to execute multiple times,
typically against different data. (A lot of financial trading systems
work this way, for example)
So here's an example of suc