[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grammar question...



I have been trying to generate a grammar for a tool I am developing that 
has a 'basic-like' syntax.  However, I seem to be coming up against a problem in that my syntax should allow
  $Sym = 3
as well as 
  Sym  = 3
(that is, there can be an optional dollar sign at the beginning of a line).  
The grammar has tokens for symbol names specified as 
sym_identifier = letter (letter_or_digit)*;
dollar = dollarsign;

and then listed the dollar token as one of the tokens to be ignored (along with blanks).  This seems to work only for 
$ Sym = 3 but not for
$Sym  = 3

Can someone point out what I did wrong?

Thanks!

Roger

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm