Changeset 2168

Show
Ignore:
Timestamp:
07/03/08 08:00:01 (2 months ago)
Author:
sukyoungryu
Message:

[parser] Preparing for Jon's syntax abstraction work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ProjectFortress/src/com/sun/fortress/parser/Expression.rats

    r2104 r2168  
    6262     <As> As 
    6363   / <Asif> AsIf 
     64   / <DoubleStar> Star 
    6465   ; 
    6566 
     
    7980               return new AsIfExpr(createSpan(yyStart,yyCount), false, 
    8081                                   (Expr)base, a1); 
     82           }}; 
     83     }; 
     84 
     85constant inline Action<Expr> Star = 
     86     DoubleStar 
     87     { yyValue = new Action<Expr>() { 
     88           public Expr run(Expr base) { 
     89               return base; 
    8190           }}; 
    8291     }; 
  • trunk/ProjectFortress/src/com/sun/fortress/parser/NoNewlineExpr.rats

    r1987 r2168  
    6161     <As> NoNewlineAs 
    6262   / <AsIf> NoNewlineAsIf 
     63   / <DoubleStar> NoNewlineStar 
    6364   ; 
    6465 
     
    8081               return new AsIfExpr(createSpan(yyStart,yyCount), false, 
    8182                                   (Expr)base, t); 
     83           }}; 
     84     }; 
     85 
     86constant inline Action<Expr> NoNewlineStar = 
     87     DoubleStar 
     88     { yyValue = new Action<Expr>() { 
     89           public Expr run(Expr base) { 
     90               return base; 
    8291           }}; 
    8392     }; 
  • trunk/ProjectFortress/src/com/sun/fortress/parser/Symbol.rats

    r2024 r2168  
    160160private String singleOp = 
    161161     !(encloser / leftEncloser / rightEncloser / multiOp / compOp / match) 
    162      a1:_ &{ PrecedenceMap.ONLY.isOperator("" + a1) } 
     162     a1:_ !("*") &{ PrecedenceMap.ONLY.isOperator("" + a1) } 
    163163     { yyValue = "" + a1; } ; 
    164164 
     
    222222transient void plus = "+":singleOp; 
    223223transient void pound = "#":singleOp; 
    224 transient void star = "*":singleOp; 
     224transient void star = !("**") "*":singleOp; 
    225225transient void underscore = "_"; 
    226226 
     
    257257                                              a1.getA(), a1.getB(), a2); 
    258258     }; 
     259 
     260transient void DoubleStar = "**";