[il-antlr-interest: 23737] [antlr-interest] Hopefully just a little more help with syntax for semantic predicates?

2009-05-15 Thread dhjdhj
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

[il-antlr-interest: 23672] [antlr-interest] Rewrite rules with context-sensitive values

2009-05-12 Thread dhjdhj
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

[il-antlr-interest: 23213] [antlr-interest] Slightly off-topic --- newsgroup instead of email

2009-04-16 Thread dhjdhj
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 --~--~-~--~~~-

[il-antlr-interest: 23097] Re: [antlr-interest] How can I find the line number and column for asemantic error

2009-04-10 Thread dhjdhj
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

[il-antlr-interest: 23089] [antlr-interest] How can I find the line number and column for a semantic error

2009-04-10 Thread dhjdhj
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

[il-antlr-interest: 22278] [antlr-interest] Execute part of a tree multiple times

2009-03-06 Thread dhjdhj
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