Simon Forman
defedcbd12
Parse ints; move line/{1,2} to main.pl.
2019-08-13 11:29:49 -07:00
Simon Forman
3f19b2b210
Parse floating point numbers.
2019-08-13 11:24:28 -07:00
Simon Forman
4c78a31bd9
minor cleanup
2019-08-12 22:29:09 -07:00
Simon Forman
d22e6e86dc
minor cleanup
2019-08-12 21:59:19 -07:00
Simon Forman
86bf875841
Numbers can be followed by space or [.
2019-08-12 21:29:26 -07:00
Simon Forman
8947dff010
Parse negative numbers.
2019-08-12 21:13:11 -07:00
Simon Forman
143b711028
swapd function
2019-08-12 21:08:35 -07:00
Simon Forman
aae0e91c44
assert_defs/1 got upset about not finding combo/5
2019-08-12 21:08:17 -07:00
Simon Forman
e67ef3951c
Minor cleanup of the parser.
2019-08-12 20:59:02 -07:00
Simon Forman
120610cd6b
rework parser DCGs
2019-08-12 20:12:35 -07:00
Simon Forman
b25ef2d5f7
Oops! Regression.
2019-08-12 19:25:13 -07:00
Simon Forman
dd42c7c0bc
minor cleanup
2019-08-12 19:17:15 -07:00
Simon Forman
cae79ded8f
swoncat and fiddling with parser.
2019-08-12 19:09:49 -07:00
Simon Forman
2e1f598aa2
Experiment with putting logic vars on the stack.
2019-08-11 21:30:02 -07:00
Simon Forman
222c472449
Remove a cut that sucked.
2019-08-11 20:45:49 -07:00
Simon Forman
40148fced9
unstack, least_fraction
2019-08-11 19:57:28 -07:00
Simon Forman
7a4e58fe15
Copyright notices.
2019-08-11 19:41:11 -07:00
Simon Forman
afec650c7b
The sqrt/1 predicate wasn't working.
2019-08-11 19:35:05 -07:00
Simon Forman
79aa2f972d
Multifile func/3.
2019-08-11 18:45:57 -07:00
Simon Forman
cd60816429
Build math & comparision functions.
2019-08-11 17:48:29 -07:00
Simon Forman
ab454375c0
Clean up REPL formatting.
2019-08-11 17:00:38 -07:00
Simon Forman
4d33f32674
Don't shadow funcs and combos.
2019-08-11 15:12:56 -07:00
Simon Forman
adf0e96f84
Don't shadow funcs & combos.
2019-08-11 14:56:20 -07:00
Simon Forman
9e180e8173
Extract mainloop to own file.
2019-08-11 14:51:13 -07:00
Simon Forman
6bc1b5ec8b
Use double-quoted string for codes.
2019-08-10 22:21:57 -07:00
Simon Forman
f6705f3fa0
cleanup old files
2019-08-10 22:07:17 -07:00
Simon Forman
e49b0b70cb
Build defs.pl from defs.txt.
2019-08-10 22:03:44 -07:00
Simon Forman
90bccece6a
build defs.pl
2019-08-10 21:46:48 -07:00
Simon Forman
731c59088e
build defs.pl
2019-08-10 21:45:59 -07:00
Simon Forman
32e77f6d73
Move parser to own file.
2019-08-10 20:57:11 -07:00
Simon Forman
3af9e7e174
map combo
2019-08-10 20:42:48 -07:00
Simon Forman
c8c1df8d88
Bring in funcs and combos.
2019-08-10 20:12:41 -07:00
Simon Forman
ab587beaa9
Omit Prolog toplevel.
2019-08-10 20:06:12 -07:00
Simon Forman
dc5737eb45
Do not need thses files.
2019-08-10 20:03:52 -07:00
Simon Forman
1d31ca99c3
Fold in parser, main loop, and support.
2019-08-10 19:57:00 -07:00
Simon Forman
fd5f54992a
Rename foo to thun.
2019-08-10 19:25:48 -07:00
Simon Forman
1ce9544bcc
Make a version for GNU Prolog compiler.
2019-08-10 12:19:09 -07:00
Simon Forman
10a23c5c68
Also don't shadow combinators.
...
(I realized that the way defs are parsed now means that each def
(but the last) is first asserted with the wrong definition expression
(it includes the symbol of the following definition at the end) and
then the parser figures out that there's another defintion following
and re-asserts the correct expression. It would be nice to fix that
but it's kind of a PITA. I used to build a list of definitions and
then assert them all at the end. For now there aren't enough defs to
justify the extra work.
2019-08-09 16:58:34 -07:00
Simon Forman
cbf2af18e5
Prevent definitions from shadowing functions.
2019-08-09 16:53:40 -07:00
Simon Forman
49491bceef
Demo grow/shrink.
2019-08-09 16:37:33 -07:00
Simon Forman
df5ddb8ad9
Some trailing whitespace or something.
2019-08-09 09:28:15 -07:00
Simon Forman
b9ae00cecb
A few more functions.
...
reverse, shift, shunt, take, split_at
2019-08-09 07:26:37 -07:00
Simon Forman
712f0a0267
merge
2019-08-07 23:36:38 -07:00
Simon Forman
976b8302be
grow/shrink as DCGs.
2019-08-07 23:28:28 -07:00
Simon Forman
4ea77cf1be
Integer DCGs that work in both directions.
2019-08-07 11:40:49 -07:00
Simon Forman
0048ee212d
loop combinator handles ambiguity.
...
remove some old notes.
2019-08-04 09:28:01 -07:00
Simon Forman
a3f863ff18
Move is_numerical() to joy.gui.utils.
2019-08-03 19:02:24 -07:00
Simon Forman
177d6cd433
Experiment in formatting stacks for output.
...
Tracing, sort of...
2019-08-03 19:01:45 -07:00
Simon Forman
3b1a89d1c4
Minor refactor.
...
crbo/4 to to_fixed_point/3
2019-08-03 19:01:00 -07:00
Simon Forman
cb0078f3bc
Gnarly fun with metaprogramming.
2019-08-03 17:56:25 -07:00