[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Parsing a file specification
I need to write the grammar for a language which allows a form of an include statement. The format of the statments are :
FILENAME=file-spec
where file-spec is a any legal unix type file name. Note that it is not delimited, unless it contains spaces like:
FILENAME='file with spaces'
The language also allows math type constructs, such as A = b/C. The trouble is how to tell the difference between an expression that gets parsed as "b/c" or a file named c in subdirectory b, etc.
From what I can see in the archives, it seems like the suggested way to do this is to build a custom lexer/parser, etc to handle it much like an include. I was just wondering if there is any other way to do this without the need for customized code?
Thanks
Roger
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm