tl: add support for ##[+] and ##[*]
Suggested by Victor Khomenko. * spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Implement them. * NEWS, doc/tl/tl.tex: Document them. * tests/core/sugar.test: Add a couple of tests.
This commit is contained in:
parent
b726d78cbd
commit
f476483f4a
5 changed files with 19 additions and 3 deletions
|
|
@ -232,6 +232,8 @@ using namespace spot;
|
|||
%token OP_POST_NEG "negative suffix" OP_POST_POS "positive suffix"
|
||||
%token <num> OP_DELAY_N "SVA delay operator"
|
||||
%token OP_DELAY_OPEN "opening bracket for SVA delay operator"
|
||||
%token OP_DELAY_PLUS "##[+] operator"
|
||||
%token OP_DELAY_STAR "##[*] operator"
|
||||
|
||||
/* Priorities. */
|
||||
|
||||
|
|
@ -240,7 +242,7 @@ using namespace spot;
|
|||
|
||||
%left OP_CONCAT
|
||||
%left OP_FUSION
|
||||
%left OP_DELAY_N OP_DELAY_OPEN
|
||||
%left OP_DELAY_N OP_DELAY_OPEN OP_DELAY_PLUS OP_DELAY_STAR
|
||||
|
||||
/* Logical operators. */
|
||||
%right OP_IMPLIES OP_EQUIV
|
||||
|
|
@ -451,7 +453,10 @@ delayargs: OP_DELAY_OPEN sqbracketargs
|
|||
{ error_list.
|
||||
emplace_back(@$, "missing closing bracket for ##[");
|
||||
$$.min = $$.max = 1U; }
|
||||
|
||||
| OP_DELAY_PLUS
|
||||
{ $$.min = 1; $$.max = fnode::unbounded(); }
|
||||
| OP_DELAY_STAR
|
||||
{ $$.min = 0; $$.max = fnode::unbounded(); }
|
||||
|
||||
atomprop: ATOMIC_PROP
|
||||
{
|
||||
|
|
|
|||
|
|
@ -233,6 +233,8 @@ eol2 (\n\r)+|(\r\n)+
|
|||
}
|
||||
return token::OP_DELAY_N;
|
||||
}
|
||||
"##[+]" BEGIN(0); return token::OP_DELAY_PLUS;
|
||||
"##[*]" BEGIN(0); return token::OP_DELAY_STAR;
|
||||
"##[" BEGIN(sqbracket); return token::OP_DELAY_OPEN;
|
||||
|
||||
/* PSL operators */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue