summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
authorBrian Campbell2019-02-08 17:52:42 +0000
committerBrian Campbell2019-02-08 18:17:23 +0000
commit44e35e2384824f8f3b3cc65a61bbb76e08a6422c (patch)
tree0fbfd602fdda94113ea2425f9356272f7dcfada8 /src/parser.mly
parent7835052c225a6fd1d6f3e05217ea4b583ec0831a (diff)
Allow internal AST nodes in input when -dmagic_hash is on
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 7540d1f4..cbbc41e3 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -183,6 +183,7 @@ let rec desugar_rchain chain s e =
%token Undefined Union Newtype With Val Constraint Throw Try Catch Exit Bitfield
%token Barr Depend Rreg Wreg Rmem Rmemt Wmem Wmv Wmvt Eamem Exmem Undef Unspec Nondet Escape
%token Repeat Until While Do Mutual Var Ref Configuration TerminationMeasure
+%token InternalPLet InternalReturn
%nonassoc Then
%nonassoc Else
@@ -806,6 +807,12 @@ exp:
| While exp Do exp
{ mk_exp (E_loop (While, $2, $4)) $startpos $endpos }
+ /* Debugging only, will be rejected in initial_check if debugging isn't on */
+ | InternalPLet pat Eq exp In exp
+ { mk_exp (E_internal_plet ($2,$4,$6)) $startpos $endpos }
+ | InternalReturn exp
+ { mk_exp (E_internal_return($2)) $startpos $endpos }
+
/* The following implements all nine levels of user-defined precedence for
operators in expressions, with both left, right and non-associative operators */