Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/parser/diderot.grm
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/parser/diderot.grm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 902, Wed Apr 20 21:32:01 2011 UTC revision 903, Thu Apr 21 14:09:20 2011 UTC
# Line 372  Line 372 
372          | "!" PrefixExpr          | "!" PrefixExpr
373                  => (markExpr(FULL_SPAN, PT.E_UnaryOp(B.op_not, PrefixExpr)))                  => (markExpr(FULL_SPAN, PT.E_UnaryOp(B.op_not, PrefixExpr)))
374          | "D" PrefixExpr          | "D" PrefixExpr
375                  => (markExpr(FULL_SPAN, PT.E_Apply(B.fn_D, [PrefixExpr])))                  => (markExpr(FULL_SPAN, PT.E_Apply(PT.E_Var  B.fn_D, [PrefixExpr])))
376          ;          ;
377    
378  SliceExpr  SliceExpr
# Line 384  Line 384 
384          ;          ;
385    
386  Suffix  Suffix
387          : "[" Indices "]"          : "(" Arguments ")"
388                    => (fn e => markExpr(FULL_SPAN, PT.E_Apply(e, Arguments)))
389            | "[" Indices "]"
390                  => (fn e => PT.E_Slice(e, Indices))                  => (fn e => PT.E_Slice(e, Indices))
391          | "{" Expr "}"          | "{" Expr "}"
392                  => (fn e => PT.E_Subscript(e, Expr))                  => (fn e => PT.E_Subscript(e, Expr))
# Line 416  Line 418 
418          ;          ;
419    
420  AtomExpr  AtomExpr
421          : ID ( "(" Arguments ")" )?          : ID
422                  => (case SR                  => (markExpr(FULL_SPAN, PT.E_Var ID))
                      of NONE => markExpr(FULL_SPAN, PT.E_Var ID)  
                       | SOME args => markExpr(FULL_SPAN, PT.E_Apply(ID, args))  
                     (* end case *))  
423          | KW_identity "[" Dimension "]"          | KW_identity "[" Dimension "]"
424                  => (markExpr(FULL_SPAN, PT.E_Id Dimension))                  => (markExpr(FULL_SPAN, PT.E_Id Dimension))
425          | KW_zeros Dimensions          | KW_zeros Dimensions

Legend:
Removed from v.902  
changed lines
  Added in v.903

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0