[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Flex help anyone ?
From: |
Ning Cao |
Subject: |
RE: Flex help anyone ? |
Date: |
Thu, 15 Jan 2004 14:19:46 +0800 |
Hi,
"Hello " will be matched by the first rule
"World" will be matched by the first rule
and " would be ok" will be also matched by the first rule.
this the reason why you got three strings.
-----Original Message-----
From: address@hidden [mailto:address@hidden Behalf Of Mike Aubury (by way of
Hans Aberg)
Sent: Thursday, January 15, 2004 1:54 AM
To: Flex Help
Subject: Flex help anyone ?
Yes - I know this is a bison list - but someone might know...
I've got to detect strings so I have matches for :
\"[^\"]+\" { return CHAR_VALUE;}
\"\" { return CHAR_VALUE;}
in my flex definition file (or similar at least)
(The first for a string, the second for an empty string)
In the language I'm trying to parse - its permissible to embed quotes within a
string if you double up..
so :
"Hello ""World"" would be ok"
Obviously - I'm getting this back as three strings ("Hello " , "World" &
"would be ok") which is messing up the parser...
Any ideas ?
_______________________________________________
address@hidden http://mail.gnu.org/mailman/listinfo/help-bison
_______________________________________________
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex