Ignore:
Timestamp:
Nov 19, 2012, 7:51:17 PM (7 years ago)
Author:
ksherdy
Message:

Shortened variable names for sanity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/pablo/input/grammar/scatter/pablo.scatter.beta

    r2370 r2658  
    5454 binaryOperator {} [expression, expression1, expression3],
    5555 unaryOperator {} [expression2],
    56  assignment {} [assignmentStatementRest],
    57  ifStatement {} [ifStatementBulk],
    58  functionInvocation {} [functionInvocationRest],
    59  ASTNode [assignmentOrFunctionInvocation, variableOrFunctionInvocation],
     56 assignment {} [assignmentStmtRest],
     57 ifStmt {} [ifStmtBulk],
     58 FunctionCall {} [FunctionCallRest],
     59 ASTNode [assignmentOrFunctionCall, variableOrFunctionCall],
    6060}
    6161
     
    7070 // We need to put curly braces {} around body of class delcaration.
    7171 // this grammar only allows simple initialization of fields as class
    72  // body statements. Verfiy this as a property of the input.
     72 // body Stmts. Verfiy this as a property of the input.
    7373 ////////////////////////////////////////////////////////////////////////
    7474 
    7575 structDeclaration → CLASS structName LEFTROUND RIGHTROUND COLON structBody ;
    76  structBody → LEFTCURLY structBodyStatement* RIGHTCURLY ;
    77  structBodyStatement ʉ → variableName ASSIGN value TERMINATOR? ;
     76 structBody → LEFTCURLY structBodyStmt* RIGHTCURLY ;
     77 structBodyStmt ʉ → variableName ASSIGN value TERMINATOR? ;
    7878 value → INTEGER_CONST ;
    7979 
     
    8787 ////////////////////////////////////////////////////////////////////////
    8888 
    89  functionDef → DEF functionName LEFTROUND parameterList RIGHTROUND COLON blockStatement ;
     89 functionDef → DEF functionName LEFTROUND parameterList RIGHTROUND COLON blockStmt ;
    9090 parameterList → identifier ( COMMA identifier )* ;
    9191 
    92  statement ʉ → (assignmentOrFunctionInvocation | ifStatement | whileStatement | blockStatement) TERMINATOR?;
    93  blockStatement → LEFTCURLY statement* RIGHTCURLY ;
     92 Stmt ʉ → (assignmentOrFunctionCall | ifStmt | whileStmt | blockStmt) TERMINATOR?;
     93 blockStmt → LEFTCURLY Stmt* RIGHTCURLY ;
    9494 
    95  assignmentOrFunctionInvocation → compoundVariable ( assignmentStatementRest ▲ | functionInvocationRest ▲ ) ;
    96  assignmentStatementRest → assignOp^! expression ;
     95 assignmentOrFunctionCall → compoundVariable ( assignmentStmtRest ▲ | FunctionCallRest ▲ ) ;
     96 assignmentStmtRest → assignOp^! expression ;
    9797 assignOp -> AND_EQUAL | OR_EQUAL | XOR_EQUAL | ASSIGN ;
    9898 
    99  ifStatement ʉ → IF ifStatementBulk ;
    100  ifStatementBulk → expression COLON? blockStatement (ELIF COLON? ifStatementBulk | ELSE COLON? blockStatement)? ;
    101  whileStatement → WHILE expression COLON? blockStatement ;
    102  expressionStatement → expression;
     99 ifStmt ʉ → IF ifStmtBulk ;
     100 ifStmtBulk → expression COLON? blockStmt (ELIF COLON? ifStmtBulk | ELSE COLON? blockStmt)? ;
     101 whileStmt → WHILE expression COLON? blockStmt ;
     102 expressionStmt → expression;
    103103 
    104104 expression ʉ → expression1 ( (OR^ | XOR^) expression )? ;    // lowest precedence: OR, XOR
     
    108108 expression4 ʉ → LEFTROUND expression RIGHTROUND
    109109 
    110               | variableOrFunctionInvocation
     110              | variableOrFunctionCall
    111111 
    112112              | constant ;
    113113 
    114  variableOrFunctionInvocation ʉ → compoundVariable (functionInvocationRest ▲)? ;
    115  functionInvocationRest → LEFTROUND^ expression (COMMA expression)* RIGHTROUND ;
     114 variableOrFunctionCall ʉ → compoundVariable (FunctionCallRest ▲)? ;
     115 FunctionCallRest → LEFTROUND^ expression (COMMA expression)* RIGHTROUND ;
    116116 
    117117 compoundVariable ʉ → identifier (DOT^ identifier)* ;
Note: See TracChangeset for help on using the changeset viewer.