Changeset 553 for branches/xtext-MDT/org.modelica.xtext.core/src/org
- Timestamp:
- 12/05/09 15:56:01 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xtext-MDT/org.modelica.xtext.core/src/org/modelica/xtext/ModelicaAST.xtext
r552 r553 133 133 |{ClassPart::PROTECTED} 'protected' (contents+=ElementItem)* 134 134 |{ClassPart::EQUATIONS} 'equation' (contents+=EquationItem)* 135 //|{ClassPart::INITIALEQUATIONS} 'initial' 'equation' (contents+=EquationItem)*135 |{ClassPart::INITIALEQUATIONS} 'initial' 'equation' (contents+=EquationItem)* 136 136 |{ClassPart::ALGORITHMS} 'algorithm' (contents+=AlgorithmItem)* 137 137 |{ClassPart::INITIALALGORITHMS} 'initial' 'algorithm' (contents+=AlgorithmItem)* … … 294 294 ; 295 295 296 AlgorithmIf returns AlgorithmStatement::ALG_IF: 296 AlgorithmIf returns AlgorithmStatement::uAlgorithmStatement : 297 {AlgorithmStatement::ALG_IF} 297 298 'if' ifExp=Expression 'then' (trueBranch+=AlgorithmItem)* 298 299 (elseIfAlgorithmBranch+=ElseIfAlgorithmBranch)* … … 305 306 ; 306 307 307 AlgorithmAssign returns AlgorithmStatement::ALG_ASSIGN: 308 assignComponent=ExprRange ':=' value=Expression 309 ; 310 AlgorithmNoRetCall returns AlgorithmStatement::ALG_NORETCALL : 308 AlgorithmAssign returns AlgorithmStatement::uAlgorithmStatement : 309 {AlgorithmStatement::ALG_ASSIGN} assignComponent=ExprRange ':=' value=Expression 310 ; 311 AlgorithmNoRetCall returns AlgorithmStatement::uAlgorithmStatement: 312 {AlgorithmStatement::ALG_NORETCALL} 311 313 functionCall=ComponentRef '(' functionArgs=FunctionArguments? ')' 312 314 ; … … 316 318 ; 317 319 318 AlgorithmWhen returns AlgorithmStatement::ALG_WHEN_A : 320 AlgorithmWhen returns AlgorithmStatement::uAlgorithmStatement : 321 {AlgorithmStatement::ALG_WHEN_A} 319 322 'when' boolExpr=Expression 'then' (whenBody+=AlgorithmItem) 320 323 (elseWhenAlgorithmBranch+=ElseWhenAlgorithmBranch)* … … 416 419 417 420 ExprRange returns Exp::uExp : 418 ExprLogical ({Exp::RANGE.start=current} ':' stop=ExprLogical 419 | {Exp::RANGE.start=current} ':' step=ExprLogical ':' stop=ExprLogical )? 421 ExprLogical ({Exp::RANGE.start=current} ':' (step=ExprLogical ':' stop=ExprLogical | stop=ExprLogical) )? 420 422 ; 421 423 … … 435 437 ExprRelation returns Exp::uExp : 436 438 ExprArithmetic 437 ({Exp::RELATION.exp1=current} op=OperatorLogical exp2=ExprArithmetic)? 439 ({Exp::RELATION.exp1=current} op = (OperatorLess | OperatorLessEq | OperatorGreater | 440 OperatorGreaterEq | OperatorEqual | OperatorEqual) exp2=ExprArithmetic)? 438 441 ; 439 442 440 443 ExprArithmetic returns Exp::uExp : 441 444 ExprUnaryArithmetic 442 ({Exp::BINARY.exp1=current} op=OperatorAddSub exp2=ExprArithmetic2)? 445 ({Exp::BINARY.exp1=current} op=(OperatorAdd | OperatorSub | OperatorAddEW | OperatorSubEW) 446 exp2=ExprArithmetic2)? 443 447 ; 444 448 445 449 ExprArithmetic2 returns Exp::uExp : 446 450 ExprArithmeticTerm 447 ({Exp::BINARY.exp1=current} op=OperatorAddSub exp2=ExprArithmetic2)? 451 ({Exp::BINARY.exp1=current} op=(OperatorAdd | OperatorSub | OperatorAddEW | OperatorSubEW) 452 exp2=ExprArithmetic2)? 448 453 ; 449 454 … … 550 555 Operators 551 556 */ 552 557 /* 553 558 OperatorLogical returns Operator::uOperator: 554 559 {Operator::LESS} '<' | {Operator::LESSEQ} '<=' | {Operator::GREATER} '>' … … 557 562 558 563 OperatorAddSub returns Operator::uOperator: 559 {Operator:: ADD} '+' | {Operator::SUB} '-' | {Operator::ADD_EW} '.+' | {Operator::SUB_EW} '.-'560 ; 561 564 {Operator::SUB} '-' | {Operator::ADD} '+' | {Operator::ADD_EW} '.+' | {Operator::SUB_EW} '.-' 565 ; 566 */ 562 567 563 568 OperatorAdd returns Operator::ADD :
Note: See TracChangeset
for help on using the changeset viewer.