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 690, Fri Mar 25 00:23:10 2011 UTC revision 691, Fri Mar 25 01:31:46 2011 UTC
# Line 258  Line 258 
258          | ValueType ("{" Dimension "}")*          | ValueType ("{" Dimension "}")*
259                  => (case SR                  => (case SR
260                       of [] => ValueType                       of [] => ValueType
261                        | d => markTy(FULL_SPAN, List.foldl (fn (dim, ty) => PT.T_Array(ty, dim)) ValueType d)                        | d => markTy(FULL_SPAN, List.foldl (fn (dim, ty) => PT.T_Seq(ty, dim)) ValueType d)
262                      (* end case *))                      (* end case *))
263          ;          ;
264    
# Line 394  Line 394 
394                      (* end case *))                      (* end case *))
395          | "real" "(" Expr ")"          | "real" "(" Expr ")"
396                  => (markExpr(FULL_SPAN, PT.E_Real Expr))                  => (markExpr(FULL_SPAN, PT.E_Real Expr))
397            | "(" Expr ("," Expr)* ")"
398                    => (case SR
399                         of [] => Expr
400                          | l => markExpr(FULL_SPAN, PT.E_Tuple(Expr::l))
401                        (* end case *))
402            | "{" Expr ("," Expr)* "}"
403                    => (markExpr(FULL_SPAN, PT.E_Sequence(Expr::SR)))
404          | "[" Expr ("," Expr)* "]"          | "[" Expr ("," Expr)* "]"
405                  => (markExpr(FULL_SPAN, PT.E_Cons(Expr::SR)))                  => (markExpr(FULL_SPAN, PT.E_Cons(Expr::SR)))
406          | INT          | INT
# Line 402  Line 409 
409                  => (markExpr(FULL_SPAN, PT.E_Lit(L.Float FLOAT)))                  => (markExpr(FULL_SPAN, PT.E_Lit(L.Float FLOAT)))
410          | STRING          | STRING
411                  => (markExpr(FULL_SPAN, PT.E_Lit(L.String STRING)))                  => (markExpr(FULL_SPAN, PT.E_Lit(L.String STRING)))
         | "(" Expr ("," Expr)* ")"  
                 => (case SR  
                      of [] => Expr  
                       | l => markExpr(FULL_SPAN, PT.E_Tuple(Expr::l))  
                     (* end case *))  
412          | "|" Expr "|"          | "|" Expr "|"
413                  => (markExpr(FULL_SPAN, PT.E_UnaryOp(B.op_norm, Expr)))                  => (markExpr(FULL_SPAN, PT.E_UnaryOp(B.op_norm, Expr)))
414          ;          ;

Legend:
Removed from v.690  
changed lines
  Added in v.691

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