Skip to content

Commit

Permalink
delete more unused rules
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnrd committed Mar 8, 2022
1 parent 03a470a commit fcc7733
Showing 1 changed file with 2 additions and 37 deletions.
39 changes: 2 additions & 37 deletions org.lflang/src/org/lflang/LinguaFranca.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,6 @@ TypedVariable:
Variable:
TypedVariable | Timer | Mode;

Trigger:
Action | Input;

Effect:
Action | Output;
VarRef:
variable=[Variable] | container=[Instantiation] '.' variable=[Variable]
| interleaved?='interleaved' '(' (variable=[Variable] | container=[Instantiation] '.' variable=[Variable]) ')'
Expand All @@ -300,36 +295,15 @@ Assignment:
* Parameter declaration with optional type and mandatory initialization.
*/
Parameter:
name=ID (':' (type=Type))?
// FIXME: rename Value to Expr
name=ID (':' (type=Type))?
((parens+='(' (init+=Value (',' init+=Value)*)? parens+=')')
| (braces+='{' (init+=Value (',' init+=Value)*)? braces+='}')
)?
;

Sum :
terms+=Difference ('+' terms+=Difference)*;

Difference:
terms+=Product ('-' terms +=Product)*;

Product:
terms+=Quotient ('*' terms+=Quotient)*;

Quotient:
terms+=Expr ('/' terms += Expr)*;

Expr :
Value | '(' Sum ')';

// Time is either a reference to a parameter or an integer value,
// a number followed by a unit specification (unless the value is zero).
// If it is a constant, the validator should check that if the value
// is non-zero, it is accompanied by a unit.
Value:
(parameter=[Parameter] | time=Time | literal=Literal | code=Code);


Time:
(interval=INT unit=TimeUnit)
;
Expand Down Expand Up @@ -386,11 +360,6 @@ DottedName:
(ID (('.'|'::') ID)*)
;


Generic:
'<' (DottedName (',' DottedName)*) '>'
;

SignedInt:
INT | NEGINT
;
Expand Down Expand Up @@ -473,10 +442,6 @@ Code:
{Code} '{=' body=Body '=}'
;

// The following cannot be terminal because it overlaps ID.
//Path:
// ID ('.' ID)*;

FSName:
(ID | '.' | '_')+
;
Expand Down Expand Up @@ -543,4 +508,4 @@ Token:
'@' |
// Single quotes
"'"
;
;

0 comments on commit fcc7733

Please sign in to comment.