[antlr-interest] Rookie attempt at ANTLR 3 (using the currentANTLRWorks under Window XP)

Jim Idle jimi at intersystems.com
Wed Oct 25 15:24:46 PDT 2006


Bill,

Unless you have missed some of the grammar out from this post, it looks
to me like you don't actually have any rules in the grammar, only some
member functions? I would think that that you do really have some rules
but just have not posted them? ;-)

If I take out the java code from your post, we are left with:

// Test hoisting and use of predicates to allow us to use "undelimited 
strings"
grammar TestGrammar;

// I'm not using tokens in this langauge yet.
//tokens = { }


If this is really your grammar, then I would think it is pretty obvious
;-), that there is no rule for ANTLR to look for EOF in. 

Jim

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Foolish Ewe
Sent: Wednesday, October 25, 2006 1:30 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Rookie attempt at ANTLR 3 (using the
currentANTLRWorks under Window XP)

Hi Folks:

I'm trying ANTLR 3 today, using ANTLRworks (so far it seems like Bovet
and 
Parr have some
reallly neat stuff in there).

I'm trying to compile the attached grammar in the tool and am getting a 
message:

Cannot generate the grammar because grammar TestGrammar : no start rule
(no 
rule can
obviously be followed by EOF).

This will probably out me to my coauthors and students, but I'm not a
big 
fan of the words
obviously/easily or their variants :-).

What does this message mean, how can I better convey to ANTLR that
startRule 
is the start rule?

Thanks:

Bill M.

_________________________________________________________________
Use your PC to make calls at very low rates 
https://voiceoam.pcs.v2s.live.com/partnerredirect.aspx


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.11/496 - Release Date:
10/24/2006
 


More information about the antlr-interest mailing list