Commit d06e09b9 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/ltlparse/ltlscan.ll: Allow doubly quoted atomic propositions.

parent 694ce34b
2003-10-02 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/ltlparse/ltlscan.ll: Allow doubly quoted atomic propositions.
2003-10-01 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* iface/gspn/udcsltl.test, iface/gspn/udcseltl.test,
......
......@@ -20,7 +20,7 @@
static const char *to_parse = 0;
static size_t to_parse_size = 0;
void
flex_set_buffer(const char *buf)
{
......@@ -40,8 +40,8 @@ flex_set_buffer(const char *buf)
")" return PAR_CLOSE;
"!" return OP_NOT;
/* & and | come from Spin. && and || from LTL2BA.
/\, \/, and xor are from LBTT.
/* & and | come from Spin. && and || from LTL2BA.
/\, \/, and xor are from LBTT.
*/
"||"|"|"|"+"|"\\/" return OP_OR;
"&&"|"&"|"."|"*"|"/\\" return OP_AND;
......@@ -59,16 +59,22 @@ flex_set_buffer(const char *buf)
"1"|"true" return CONST_TRUE;
"0"|"false" return CONST_FALSE;
[ \t\n]+ /* discard whitespace */ yylloc->step ();
[ \t\n]+ /* discard whitespace */ yylloc->step ();
/* An Atomic proposition cannot start with the letter
used by a unary operator (F,G,X), unless this
letter is followed by a digit in which case we assume
it's an ATOMIC_PROP (even though F0 could be seen as Ffalse, we
don't). */
[a-zA-EH-WYZ_][a-zA-Z0-9_]* |
[FGX][0-9_][a-zA-Z0-9_]* {
yylval->str = new std::string(yytext);
[a-zA-EH-WYZ_][a-zA-Z0-9_]* |
[FGX][0-9_][a-zA-Z0-9_]* {
yylval->str = new std::string(yytext);
return ATOMIC_PROP;
}
/* Atomic propositions can also be inclosed in double quotes. */
\"[^\"]*\" {
yylval->str = new std::string(yytext + 1, yyleng - 2);
return ATOMIC_PROP;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment