[antlr-interest] newbie: help grammar trips on dual use perio d

mzukowski at yci.com mzukowski at yci.com
Thu Nov 14 08:05:33 PST 2002


Seems like when you see a . in a number then it is part of a number, if it
is between other things then it isn't.  See the java grammar's handling of
numbers to see how to deal with it.

Monty

-----Original Message-----
From: DogbertKarma [mailto:gossman at free-source.com]
Sent: Thursday, November 14, 2002 7:07 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] newbie: help grammar trips on dual use period


All,
I'm thinking this should be easy to do, unluckily I'm new enough at
antlr that I'm missing something and I'm hoping that with a little
push from you'all that I can solve this. 

I've got a grammar (not allowed to change it) of the form:

(interface):(base_object).(sub_object)*.(variable) = (value)

so a file of these would look like:

// example comment
ethernet:dog.tail = true
serial:cat.collar.tag = 123.6
ethernet:dog.snout = 12
// another example comment

I keep hanging up on the fact that the (.) period is dual use. It is
both a delimiter and part of the value when the value is a floating
point number.

Thanks,
Matt





 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list