Skip to content

Commit

Permalink
ogma-language-smv: Support MTL operators with number ranges. Refs nas…
Browse files Browse the repository at this point in the history
…a#101.

The current parser for the SMV language does not support MTL operators with
number ranges as arguments to MTL operators. The only syntax currently
supported is using <MTLOperator>[<ComparisonOperator><Number>], where is a
numeric comparison operator like <=, <, and so on.

This limitation makes some of the component specifications produced from FRET
not parseable with Ogma.

This commit extends the grammar to support MTL operators with number ranges.
The prior syntax is also supported and kept as is.
  • Loading branch information
ivanperez-keera committed Sep 22, 2023
1 parent 4de0375 commit 7cadbec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ogma-language-smv/grammar/SMV.cf
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ BoolConstFalse. BoolConst ::= "FALSE";
BoolConstFTP. BoolConst ::= "FTP";
BoolConstLAST. BoolConst ::= "LAST";

Op1Alone . OpOne ::= Op1Name;
Op1MTL. OpOne ::= Op1Name "[" OrdOp Number "]";
Op1Alone . OpOne ::= Op1Name;
Op1MTL. OpOne ::= Op1Name "[" OrdOp Number "]";
Op1MTLRange. OpOne ::= Op1Name "[" Number "," Number "]";

NumberInt . Number ::= Integer;
_ . Number ::= "<b>" Number "</b>";
Expand Down

0 comments on commit 7cadbec

Please sign in to comment.