# HG changeset patch # User Christian Urban # Date 1630330704 -3600 # Node ID 67c8a6e6a3051fb2c9986c9d537abffc7cc031a6 # Parent b0352633bf48dd485983b2a64c0c1eaf22b2069b updated diff -r b0352633bf48 -r 67c8a6e6a305 progs/lexer/lex.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 diff -r b0352633bf48 -r 67c8a6e6a305 progs/lexer/lexer.sc --- 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 + + + diff -r b0352633bf48 -r 67c8a6e6a305 progs/lexer/token.sc --- 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