progs/parser-combinators/comb2.sc
changeset 803 d4fb8c7fc3bf
parent 742 b5b5583a3a08
child 812 2f9a0dcf61ae
--- a/progs/parser-combinators/comb2.sc	Thu Nov 12 12:22:26 2020 +0000
+++ b/progs/parser-combinators/comb2.sc	Fri Nov 13 15:03:48 2020 +0000
@@ -10,14 +10,11 @@
 //    amm comb2.sc
 
 
-
-
 // more convenience for the map parsers later on;
 // it allows writing nested patterns as
 // case x ~ y ~ z => ...
 
-case class ~[+A, +B](_1: A, _2: B)
-
+case class ~[+A, +B](x: A, y: B)
 
 // constraint for the input
 type IsSeq[A] = A => Seq[_]
@@ -172,7 +169,7 @@
 
 
 // Examples
-Stmts.parse_all("x2:=5+3;")
+Stmt.parse_all("x2:=5+3")
 Block.parse_all("{x:=5;y:=8}")
 Block.parse_all("if(false)then{x:=5}else{x:=10}")