progs/lexer.scala
changeset 670 551d018cbbac
parent 642 064afa8fc1d9
equal deleted inserted replaced
669:2f5a4d76756d 670:551d018cbbac
   158       case (ONE, _) => (r2s, F_SEQ_Empty1(f1s, f2s))
   158       case (ONE, _) => (r2s, F_SEQ_Empty1(f1s, f2s))
   159       case (_, ONE) => (r1s, F_SEQ_Empty2(f1s, f2s))
   159       case (_, ONE) => (r1s, F_SEQ_Empty2(f1s, f2s))
   160       case _ => (SEQ(r1s,r2s), F_SEQ(f1s, f2s))
   160       case _ => (SEQ(r1s,r2s), F_SEQ(f1s, f2s))
   161     }
   161     }
   162   }
   162   }
   163   case RECD(x, r1) => {
       
   164     val (r1s, f1s) = simp(r1)
       
   165     (RECD(x, r1s), F_RECD(f1s))
       
   166   }
       
   167   case r => (r, F_ID)
   163   case r => (r, F_ID)
   168 }
   164 }
   169 
   165 
   170 // lexing functions including simplification
   166 // lexing functions including simplification
   171 def lex_simp(r: Rexp, s: List[Char]) : Val = s match {
   167 def lex_simp(r: Rexp, s: List[Char]) : Val = s match {