| #T Test Notebook
| test
test
| trace(syntax)
| test
: test
test
| untrace(syntax)
: untrace(syntax)
| quote(foo(x+y))
foo(plus(x, y))
| S -> N[_n] V[_n]
| _grammar_
Start: S

Rules:
    [0] S -> N[_n] V[_n]
| dog <- N[sg]
| barks <- V[sg]
| _grammar_
Start: S

Rules:
    [0] S -> N[_n] V[_n]

Lexicon:
    barks V[sg]
    dog N[sg]
| start()
S
| S0 -> S
| start() := S0
| start()
S0
| _grammar_
Start: S0

Rules:
    [0] S -> N[_n] V[_n]
    [1] S0 -> S

Lexicon:
    barks V[sg]
    dog N[sg]
| "dog barks"
<dog, barks>
| parse("dog barks")

0   (S0
1      (S
2         (N[sg] dog)
3         (V[sg] barks)))

| include(testinclude)
| _foo
<hi, there>
| _bar
<d, o, g>
| good("dog barks")
| good("the dog barks")
| bad("dog bark")
| results()
:) good <dog, barks>
** good <the, dog, barks>
:)  bad <dog, bark>
| a
a
| _a
ERROR: Unbound variable: _a
| _a := foo
| _a
foo
| <hi, there>
<hi, there>
| 'hi'
<h, i>
| "hi there"
<hi, there>
| <hi>.<there>
<hi, there>
| <"dog barks", 7>
<<dog, barks>, 7>
| <eight>
<eight>
| <k, a, t>
<k, a, t>
| <1,1,2,3,5,8,13>
<1, 1, 2, 3, 5, 8, 13>
| eight = eight
True
| eight = <eight>
False
| <eight> = <<eight>>
False
| 'kek'
<k, e, k>
| <fire, house> = <house, fire>
False
| |<4,4>|
2
| <>
<>
| _e_
<>
| _e_ = <>
True
| |_e_|
0
| <k,a>.<t> = <k,a,t>
True
| <k,a>._e_ = <k,a>.<>
True
| <k,a>._e_ = <k,a>
True
| <k,_e_>
<k, <>>
| <3,hi>.<bye,0>
<3, hi, bye, 0>
| <hi> = <h,i>
False
| <h,i>._e_ = _e_.<h,i>
True
| foo.<b,a,r>
<foo, b, a, r>
| 2^3
8
| 3^2
9
| <a,b>^3
<a, b, a, b, a, b>
| _a := <t,l,e>
| _b := <c,a,t>
| <a,b>._e_
<a, b>
| |'dog'|
3
| |'cat'.'fish'|
7
| _b._a
<c, a, t, t, l, e>
| |_b._a|
6
| _a._a
<t, l, e, t, l, e>
| _a.x
<t, l, e, x>
| {m,o,m}
{m, o}
| {m,o}
{m, o}
| {m,o,m} = {m,o}
True
| {m,o} = {o,m}
True
| _0_
{}
| |{a,b,c}|
3
| {a} = a
False
| a = {a}
False
| {a,_0_} = {a}
False
| {} = _0_
True
| {a,b,c} = {b,b,a,c}
True
| <a,b,c> = <b,b,a,c>
False
| <a,b,c> = {b,b,a,c}
False
| <hi> = hi
False
| <a>.<b,c> = <a,b>.<c>
True
| {{hi}} = {hi}
False
| 0 = _0_
False
| _0_ = _e_
False
| |{s,i,t,s}|
3
| |<s,i,t,s>|
4
| |{<s,i,t,s>}|
1
| |s,i,t,s|
ERROR: Too many args for 'abs', expected 1
| |_0_|
0
| |{_0_}|
1
| {x | x^2 = 9}
ERROR IN PARSING: Unmatched delimiter: |
| 1 < 2 < 3
ERROR IN PARSING: Unmatched delimiter: <
| _A := {_a,b,c,d,e}
| _A
{<t, l, e>, b, c, d, e}
| a @ _A
False
| b @ _A
True
| _B := {c,d,e,f,g}
| _A + _B
{<t, l, e>, b, c, d, e, f, g}
| _A & _B
{c, d, e}
| _A - _B
{<t, l, e>, b}
| 5 - 2
3
| hi - there
ERROR: Not a valid object for subtraction: hi
| {b,c} @< _A
True
| {b,c} @> _A
False
| _A @> {b,c}
True
| _D := {the, a, this, that}
| _N := {dog, cat, fish, this, that}
| _V := {run, chase, fish}
| _W := _D + _N + _V
| _T := {0,1}
| _D + _N
{a, cat, dog, fish, that, the, this}
| _D & _N
{that, this}
| _N - _D
{cat, dog, fish}
| (_D&_N) + _V
{chase, fish, run, that, this}
| _D & (_N+_V)
{that, this}
| |{c,o,o,l}| = 4
False
| a @ {a}
True
| _e_ @ {a}
False
| _0_ @ {a}
False
| _0_ @< {a}
True
| h @ {hi}
False
| hi @< {hi}
ERROR: Cannot be used with @<: hi
| hit = hi.t
False
| hi = hi._e_
False
| hi._e_
<hi>
