unboxed -> val, boxed -> box

This commit is contained in:
Dmitry Boulytchev 2021-01-31 21:07:17 +03:00
parent 919cda5556
commit 5ae88f820d
8 changed files with 16 additions and 16 deletions

View file

@ -311,7 +311,7 @@ public fun lookupMemo (mm@[p, m], v) {
| _ -> x ()
esac}
(fun () {case v of
#unboxed -> v
#val -> v
| _ ->
case findMap (m, v) of
Some (w) -> w

View file

@ -20,8 +20,8 @@ public infix =?= at < (x, y) {
esac;
case r of
[#unboxed] -> r
| [x] -> walkrec (r, p1, x)
[#val] -> r
| [x] -> walkrec (r, p1, x)
esac
}

View file

@ -198,13 +198,13 @@ fun createResult () {
fun k (x) {
if log then printf ("Result: %s\n", x.string) fi;
case x of
Succ (val, s) ->
Succ (v, s) ->
if log then printf ("Result stream: %s\n", showMatcher (s)) fi;
if deref (hasValue)
then failure (sprintf ("Ostap: ambiguous parsing (%s vs. %s)", deref (value).string, val.string))
then failure (sprintf ("Ostap: ambiguous parsing (%s vs. %s)", deref (value).string, v.string))
else
hasValue ::= true;
value ::= val
value ::= v
fi
| Fail (err, l, c) ->
if deref (hasError)

View file

@ -2,8 +2,8 @@ fun collect_ints_acc (v, tail) {
local i;
case v of
a@#unboxed -> Cons (a, tail)
| #string -> tail
a@#val -> Cons (a, tail)
| #string -> tail
| _ ->
for i := 0, i < v.length, i := i + 1 do
tail := collect_ints_acc (v[i], tail)

View file

@ -62,8 +62,8 @@ fun genCyclicArrays (n, eq, cross) {
if 1 - eq && deref (f) then
case b[i] of
#unboxed -> b[i] := b[i] + 1
| _ -> b[i] := 0
#val -> b[i] := b[i] + 1
| _ -> b[i] := 0
esac;
f ::= true
fi