Changeset 36

Show
Ignore:
Timestamp:
06/05/08 15:38:27 (7 months ago)
Author:
mb0
Message:

rest parameter for optional arguments added to grammar

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/parser/AS3Parser.g

    r31 r36  
    254254    FormalParameters$$FormalParameter ::= FormalParameter | FormalParameters COMMA FormalParameter  
    255255     
     256    FormalParameter$FormalParameter ::= REST$ IDENTIFIER$Name 
    256257    FormalParameter$FormalParameter ::= IDENTIFIER$Name COLON$ Type 
    257258    FormalParameter$FormalParameter ::= IDENTIFIER$Name COLON$ STAR$Dyn 
     
    297298                | WhileStatement 
    298299                | ForStatement 
    299                 | ForEachStatement 
    300300                | SwitchStatement 
    301301                | TryStatement 
     
    352352    DoStatement ::= do$ Statement while$ LPAREN$ Expression$Condition RPAREN$ SemiOpt$ 
    353353     
    354     ForStatement$ForStatement ::= for$ LPAREN$ ForInit SEMI$ ForCondition SEMI$ ForUpdate RPAREN$ Statement$Statement 
    355      
    356     ForStatementNoShortIf$ForStatement ::= for$ LPAREN$ ForInit SEMI$ ForCondition SEMI$ ForUpdate RPAREN$ StatementNoShortIf$Statement 
    357  
    358     ForEachStatement$ForEachStatement ::= for$ each$ LPAREN$ LocalVariableDeclaration in$ Expression RPAREN$ Statement$Statement 
    359      
     354    ForStatement$ForStatement ::= for$ LPAREN$ ForHead RPAREN$ Statement$Statement 
     355    ForStatement$ForStatement ::= for$ each$ LPAREN$ ForHead RPAREN$ Statement$Statement 
     356     
     357    ForStatementNoShortIf$ForStatement ::= for$ LPAREN$ ForHead RPAREN$ StatementNoShortIf$Statement 
     358    ForStatementNoShortIf$ForStatement ::= for$ each$ LPAREN$ ForHead RPAREN$ StatementNoShortIf$Statement 
     359 
    360360    ContinueStatement$ContinueStatement ::= continue$ SemiOpt$ 
    361361    BreakStatement$BreakStatement ::= break$ SemiOpt$ 
     
    365365    CatchStatements$$CatchStatement ::= CatchStatement | CatchStatements CatchStatement 
    366366     
    367     CatchStatement$CatchStatement ::= catch$ LPAREN$ VariableDeclarator RPAREN$ Block  
     367    CatchStatement$CatchStatement ::= catch$ LPAREN$ VariableDeclarator RPAREN$ Block 
     368     
     369    ForHead$ForHead ::= ForInit SEMI$ ForCondition SEMI$ ForUpdate 
     370    ForHead$ForHead ::= LocalVariableDeclaration in$ Expression 
    368371     
    369372    ForInit ::= %empty