Ignore:
Timestamp:
Aug 31, 2014, 12:05:40 AM (5 years ago)
Author:
ksherdy
Message:

Grammar clean-up. Removed unused types. Restricted var decl to primitive or aggregate types (stream/BitBlock).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/s2k/trunk/framework/input/grammar/scatter/s2k.scatter

    r4115 r4116  
    165165    stmt                        #->     varDecl | funcCallOrAssignStmt | returnStmt | ifStmt | whileStmt | foreachStmt | forStmt ;
    166166    blockStmt                   ->      LCURLY stmt* RCURLY ;
    167     varDecl                     ->      type identifier (ASSIGN^ expr) ? TERMINATOR ;
     167    varDecl                     ->      (primitiveType | streamType) identifier (ASSIGN^ expr) ? TERMINATOR ;
    168168    funcCallOrAssignStmt        #->     expr (assignRest _promote_) ? TERMINATOR ; // KH: SA must validate 'expr' is a 'funcCall'
    169169    assignRest                  ->      assignOperator^! expr ;
     
    230230    intType                 ->      INT    { @type = {{PrimitiveType.INTEGER}};  } ;
    231231    primitiveType           #->     intType ;
    232     indexType               #->     intType ;
     232    // indexType               #->     intType ;
    233233   
    234234    streamType              ->      STREAM fieldWidthSpecifier! {   @fieldWidth = @:value;
Note: See TracChangeset for help on using the changeset viewer.