diff --git a/src/Language.ml b/src/Language.ml index 9b6d9ac72..0fb34aba0 100644 --- a/src/Language.ml +++ b/src/Language.ml @@ -70,7 +70,12 @@ module Expr = | Var x -> st x | Binop (op, x, y) -> to_func op (eval st x) (eval st y) - (* Expression parser *) + (* Expression parser. You can use the following terminals: + + IDENT --- a non-empty identifier a-zA-Z[a-zA-Z0-9_]* as a string + DECIMAL --- a decimal constant [0-9]+ as a string + + *) ostap ( parse: !(Ostap.Util.expr @@ -93,7 +98,7 @@ module Expr = | x:IDENT {Var x} | -"(" parse -")" ) - + end (* Simple statements: syntax and sematics *) diff --git a/src/SM.ml b/src/SM.ml index e3e985860..6b6d9b865 100644 --- a/src/SM.ml +++ b/src/SM.ml @@ -16,7 +16,7 @@ type prg = insn list (* The type for the stack machine configuration: a stack and a configuration from statement interpreter *) -type config = int list * Language.Stmt.config +type config = int list * Stmt.config (* Stack machine interpreter