mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-11 09:18:47 +00:00
Sync
This commit is contained in:
commit
6bd9b1a5f5
2 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue