updated
authorChristian Urban <christian.urban@kcl.ac.uk>
Mon, 30 Aug 2021 14:38:24 +0100
changeset 827 67c8a6e6a305
parent 826 b0352633bf48
child 828 bdcaecdee9eb
updated
progs/lexer/lex.sc
progs/lexer/lexer.sc
progs/lexer/token.sc
--- a/progs/lexer/lex.sc	Mon Aug 30 14:18:08 2021 +0100
+++ b/progs/lexer/lex.sc	Mon Aug 30 14:38:24 2021 +0100
@@ -1,6 +1,11 @@
 // A simple lexer inspired by work of Sulzmann & Lu
 //==================================================
 //
+// call with
+//
+//   amm lex.sc 
+//
+
 
 // regular expressions including records
 abstract class Rexp 
@@ -176,7 +181,7 @@
 // Two Simple While Tests
 //========================
 
-@doc("small tests")
+@arg(doc = "small tests")
 @main
 def small() = {
 
@@ -193,3 +198,8 @@
   println(lexing(WHILE_REGS, prog2))
 }
 
+
+
+
+
+// runs with amm2 and amm3
--- a/progs/lexer/lexer.sc	Mon Aug 30 14:18:08 2021 +0100
+++ b/progs/lexer/lexer.sc	Mon Aug 30 14:38:24 2021 +0100
@@ -223,7 +223,7 @@
 // Two Simple While Tests
 //========================
 
-@doc("small tests")
+@arg(doc = "small tests")
 @main
 def small() = {
 
@@ -264,7 +264,7 @@
 write minus2
 """
 
-@doc("Fibonacci test")
+@arg(doc = "Fibonacci test")
 @main
 def fib() = {
   println("lexing fib program")
@@ -290,14 +290,14 @@
 }
 """
 
-@doc("Loops test")
+@arg(doc = "Loops test")
 @main
 def loops() = {
   println("lexing Loops")
   println(escape(lexing_simp(WHILE_REGS, prog3)).mkString("\n"))
 }
 
-@doc("Email Test")
+@arg(doc = "Email Test")
 @main
 def email() = {
   val lower = "abcdefghijklmnopqrstuvwxyz"
@@ -317,10 +317,14 @@
 }
 
 
-@doc("All tests.")
+@arg(doc = "All tests.")
 @main
 def all() = { small(); fib() ; loops() ; email() } 
 
 
 
 
+// runs with amm2 and amm3
+
+
+
--- a/progs/lexer/token.sc	Mon Aug 30 14:18:08 2021 +0100
+++ b/progs/lexer/token.sc	Mon Aug 30 14:38:24 2021 +0100
@@ -41,7 +41,7 @@
 
 
 
-@doc("Tokens for fib and loops programs.")
+@arg(doc = "Tokens for fib and loops programs.")
 @main
 def main() = {
   println("Fib program")
@@ -58,16 +58,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
 // Primes program
 //================
 
@@ -101,4 +91,7 @@
     };
     f := f + 1
 }
-*/
\ No newline at end of file
+*/
+
+
+// runs with amm2 and amm3