@@ -582,8 +582,8 @@ module Expr =
582582 eval conf Skip (schedule_list [e; Intrinsic (fun conf -> branch conf bs)])
583583
584584 (* Expression parser. You can use the following terminals:
585- LIDENT --- a non-empty identifier a-z[a-zA-Z0-9_]* as a string
586- UIDENT --- a non-empty identifier A-Z[a-zA-Z0-9_]* as a string
585+ LIDENT --- a non-empty identifier a-z[a-zA-Z0-9_' ]* as a string
586+ UIDENT --- a non-empty identifier A-Z[a-zA-Z0-9_' ]* as a string
587587 DECIMAL --- a decimal constant [0-9]+ as a string
588588 *)
589589
@@ -604,7 +604,7 @@ module Expr =
604604 match s with
605605 | ":" -> Sexp (" cons" , [x; y])
606606 | ":=" -> Assign (x, y)
607- | "=" -> Binop (" ==" , Call (Var (" compare" ), [x; y]), Const (0 ))
607+ | "=" -> Binop (" ==" , Call (Var (" compare" ), [x; y]), Const (0 ))
608608 | _ -> Binop (s, x, y)
609609 in
610610 match x with
@@ -1289,13 +1289,16 @@ let run_parser cmd =
12891289 inherit Util.Lexers. string s
12901290 inherit Util.Lexers. char s
12911291 inherit Util.Lexers. infix s
1292- inherit Util.Lexers. lident kws s
1292+ inherit Util.Lexers. lident kws s as lident
12931293 inherit Util.Lexers. uident kws s
12941294 inherit Util.Lexers. skip [
12951295 Matcher.Skip. whitespaces " \t\n\r " ;
12961296 Matcher.Skip. lineComment " --" ;
12971297 Matcher.Skip. nestedComment " (*" " *)"
12981298 ] s
1299+
1300+ method getLIDENT : 'b. (String. t -> 'self -> ('self, 'b, Reason. t) Types. result) -> ('self, 'b, Reason. t) Types. result =
1301+ fun k -> lident#getIdent (fun s self -> k (String. map (function '\' ' -> '$' | c -> c) s) self)
12991302 end
13001303 )
13011304 (if cmd#is_workaround then ostap (p:!(constparse cmd ) - EOF ) else ostap (p:!(parse cmd ) - EOF ))
0 commit comments