[antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

Graham Wideman gwlist at grahamwideman.com
Fri Oct 16 02:31:34 PDT 2009


David:

> I also have received scant (or no help) on this forum

I see that you started two threads.  In one, Jim Idle gave you a thoughtful
response, and suggested some questions to pursue.  You did post some more, and
nobody answered so far as I can see. That could be because the subject line on
your post got wrapped after the first word, so that it appears as just "saving"
-- not a title that would attract much attention.

Your second thread was last week "stuck on tree parsing", in which you posted
two grammars as attachments of 300 and 500 lines each, and then asked:
"PearGrammerTree.g complains about an undefined rule, that is defined right
above it" ...  without mentioning what rule you are talking about.

So here you miss out on the possibility that someone could just glance at the
problem area, in the body of the email, and spot a problem. Instead, you're
obliging someone to have to fetch the attachments and run ANTLR or AW on them
(you don't mention which, what version etc) just to see where there might be a
problem, with no guarantee it's even the same problem you're seeing.

In short, doubtless inadvertantly, you happened to present your messages in a
manner most likely not to be quickly answerable by knowledgeable list members.

If you had simply mentioned which rule had the problem, and inserted the
relevant part of the file in your email (so that looking at the attachment was
optional) then it is possible that someone could just eyeball it and spot an
obvious problem. 

I should also say that one customary line of troubleshooting advice is to
whittle down the troublesome sample so that it's much smaller. Often that
causes the problem to become more conspicuous, and even if not makes for a much
better example to ask for help about.

For what it's worth, I did just run ANTLR on your files, and on
PearGramerTree.g it gave not just one error, but the following:

=============================
F:\Proj\ANTLR\Test\Minor>java -jar D:\Antlr20090923\antlr-3.2.jar
PearGrammerTree.g
error(100): PearGrammerTree.g:117:6: syntax error: antlr:
PearGrammerTree.g:117:6: unexpected token: roi_identifier
error(100): PearGrammerTree.g:123:1: syntax error: antlr:
PearGrammerTree.g:123:1: unexpected token: data_scope_expr
error(100): PearGrammerTree.g:124:6: syntax error: antlr:
PearGrammerTree.g:124:6: unexpected token: IDENTIFIER
error(100): PearGrammerTree.g:127:1: syntax error: antlr:
PearGrammerTree.g:127:1: unexpected token: parameter
error(100): PearGrammerTree.g:129:20: syntax error: antlr:
PearGrammerTree.g:129:20: expecting RPAREN, found '|'
error(100): PearGrammerTree.g:138:2: syntax error: antlr:
PearGrammerTree.g:138:2: expecting RPAREN, found ';'
error(100): PearGrammerTree.g:141:1: syntax error: antlr:
PearGrammerTree.g:141:1: unexpected token: param_list
error(100): PearGrammerTree.g:142:6: syntax error: antlr:
PearGrammerTree.g:142:6: unexpected token: parameter
error(100): PearGrammerTree.g:145:1: syntax error: antlr:
PearGrammerTree.g:145:1: unexpected token: input_param_list
error(100): PearGrammerTree.g:147:2: syntax error: antlr:
PearGrammerTree.g:147:2: expecting RPAREN, found ';'
error(100): PearGrammerTree.g:149:1: syntax error: antlr:
PearGrammerTree.g:149:1: unexpected token: output_param_list
error(100): PearGrammerTree.g:307:4: syntax error: antlr:
PearGrammerTree.g:307:4: unexpected token: binding_expr
error(100): PearGrammerTree.g:315:1: syntax error: antlr:
PearGrammerTree.g:315:1: unexpected token: expression
error(100): PearGrammerTree.g:317:2: syntax error: antlr:
PearGrammerTree.g:317:2: expecting RPAREN, found ';'
error(100): PearGrammerTree.g:319:1: syntax error: antlr:
PearGrammerTree.g:319:1: unexpected token: program
error(106): PearGrammerTree.g:109:17: reference to undefined rule: param_list
error(106): PearGrammerTree.g:150:17: reference to undefined rule: param_list
error(106): PearGrammerTree.g:155:6: reference to undefined rule:
output_param_list
error(106): PearGrammerTree.g:154:22: reference to undefined rule:
output_param_list
error(106): PearGrammerTree.g:177:14: reference to undefined rule:
data_scope_expr
error(106): PearGrammerTree.g:173:11: reference to undefined rule:
data_scope_expr
error(106): PearGrammerTree.g:154:5: reference to undefined rule:
input_param_list
error(106): PearGrammerTree.g:320:4: reference to undefined rule: expression
error(106): PearGrammerTree.g:285:11: reference to undefined rule:
data_scope_expr
error(106): PearGrammerTree.g:156:5: reference to undefined rule:
input_param_list
===============================

Many of these report undefined rules not because that particular rule has a
problem per se, but because some rule it depends on has a problem. It's
probably worth looking at the "unexpected token" errors with a view to
determining if the syntax you've used is legit.

-- Graham

At 10/16/2009 10:16 AM, David Minor wrote: 
>
> I wouldn't shout about it, but I also have received scant (or no help) on
> this forum. I'm not a parasite, I purchased the book, but... well... I'm
> using Gold now and so far so good. I check back every now and then to see if
> I got and answer. The unsubscribe link is at the bottom of this message.




More information about the antlr-interest mailing list