Accept more syntaxes as range specifications for [*], [=], and [->].

* src/ltlparse/ltlscan.ll (OP_SQBKT_SEP): Accept ":" and "to"
in addition to ".." and ",".
(OP_UNBOUNDED): Recognize "$" for the rule below.
* src/ltlparse/ltlparse.yy: Accept [OP1:$] as a synonym
for [OP1:], for people used to SVA's syntax.
* src/ltltest/equals.test: Test these syntaxes.
This commit is contained in:
Alexandre Duret-Lutz 2010-10-15 16:38:30 +02:00
parent 4fd4f83ed6
commit 754ff36b01
3 changed files with 22 additions and 13 deletions

View file

@ -116,8 +116,15 @@ flex_set_buffer(const char* buf, int start_tok)
yylloc->step();
}
}
<sqbracket>","|".." return token::OP_SQBKT_SEP;
/* .. is from PSL and EDL
: is from Verilog and PSL
to is from VHDL
, is from Perl */
<sqbracket>","|".."|":"|"to" return token::OP_SQBKT_SEP;
/* In SVA you use [=1:$] instead of [=1..]. We will also
accept [=1..$] and [=1:]. */
<sqbracket>"$" return token::OP_UNBOUNDED;
/* & and | come from Spin. && and || from LTL2BA.
/\, \/, and xor are from LBTT.