Bruce Hill
|
568a44ef19
|
Reworking some stuff so that functions only allow expressions to be
return values with either an explicit "return" statement or if they're
the only line in the function, and the line is an expression.
|
2018-01-07 18:45:27 -08:00 |
|
Bruce Hill
|
c92e5fbc81
|
Some overhaul of binary operators so that arbitrary math patterns work
fine.
|
2018-01-07 18:03:37 -08:00 |
|
Bruce Hill
|
87b93f4aba
|
Added nomsu:assert()
|
2018-01-05 15:23:18 -08:00 |
|
Bruce Hill
|
de668ce174
|
Low hanging optimization fruit.
|
2018-01-05 14:56:35 -08:00 |
|
Bruce Hill
|
8cc1262504
|
Updated examples and made operator characters not stick to each other.
Useful for <%x>=6 properly registering as <%x> = 6.
|
2018-01-03 19:26:41 -08:00 |
|
Bruce Hill
|
b2ddc1d768
|
Added support for \000 and \x00 style byte literals.
|
2018-01-03 17:23:46 -08:00 |
|
Bruce Hill
|
cfee75b21b
|
Reworked {} a bit and added dicts to the core language. Did some more
testing on string interpolations too.
|
2018-01-03 00:52:01 -08:00 |
|
Bruce Hill
|
4789892824
|
Got everything mostly working.
|
2017-12-30 14:31:07 -08:00 |
|
Bruce Hill
|
611a8c87f3
|
renamed utils2 -> utils
|
2017-12-18 16:26:26 -08:00 |
|
Bruce Hill
|
eaea9c0599
|
Recompiled.
|
2017-12-18 16:25:56 -08:00 |
|
Bruce Hill
|
3c303018bb
|
Tweaks.
|
2017-12-15 15:30:05 -08:00 |
|
Bruce Hill
|
28f5c31299
|
Switched compiler to do lua> instead of lua files.
|
2017-12-14 16:41:22 -08:00 |
|
Bruce Hill
|
49adc12952
|
Minor fix.
|
2017-12-14 14:26:24 -08:00 |
|
Bruce Hill
|
ce398c255a
|
Rebuild.
|
2017-12-14 14:08:07 -08:00 |
|
Bruce Hill
|
536a3ba649
|
Got it working.
|
2017-12-13 16:29:15 -08:00 |
|
Bruce Hill
|
0c1c406ce0
|
More updates with more functional macros and source code storage.
|
2017-12-11 17:53:23 -08:00 |
|
Bruce Hill
|
0f0dcaac37
|
Recompiled.
|
2017-12-09 16:00:09 -08:00 |
|
Bruce Hill
|
96441251c4
|
Pretty much everything is working??
|
2017-12-09 15:34:52 -08:00 |
|
Bruce Hill
|
28b6bc1883
|
Simplified parser by removing prev_edge.
|
2017-12-08 15:39:05 -08:00 |
|
Bruce Hill
|
8da2b1d64c
|
Added unicode support and cleaned up the parser a bit.
|
2017-12-08 15:37:36 -08:00 |
|
Bruce Hill
|
b3b8c4d731
|
Some stuff changed to allow escaped args and some other ports from the
two_defs branch.
|
2017-12-04 17:35:47 -08:00 |
|
Bruce Hill
|
8c0816995a
|
Added empty string check.
|
2017-11-01 20:11:44 -07:00 |
|
Bruce Hill
|
f1a2c936de
|
Fixed some codegen stuff, optimized "say" for the common case of string
literals.
|
2017-11-01 16:49:11 -07:00 |
|
Bruce Hill
|
b0072e6dcf
|
Added local var persistence for REPL.
|
2017-10-31 18:35:40 -07:00 |
|
Bruce Hill
|
6ba79a8ff1
|
Added support for serializing rules.
|
2017-10-31 16:19:08 -07:00 |
|
Bruce Hill
|
c1ec00d5fc
|
Changed it so variables can't contain wordbreakers anymore.
|
2017-10-30 14:08:23 -07:00 |
|
Bruce Hill
|
28a6446c66
|
Added tree_to_nomsu() and improved codegen by compiling \foo to
nomsu:parse("foo") and removing some newlines.
|
2017-10-22 18:40:49 -07:00 |
|
Bruce Hill
|
3d81837261
|
Made it so nomsu only runs REPL with -i
|
2017-10-20 15:17:57 -07:00 |
|
Bruce Hill
|
c6819cf1e9
|
More callstack fixin
|
2017-10-20 15:10:04 -07:00 |
|
Bruce Hill
|
b909dce5d1
|
Fix for callstack.
|
2017-10-20 15:07:57 -07:00 |
|
Bruce Hill
|
09cb00e106
|
Recompile.
|
2017-10-19 18:16:48 -07:00 |
|
Bruce Hill
|
e42f14dbd1
|
Recompile.
|
2017-10-19 17:01:08 -07:00 |
|
Bruce Hill
|
e43f60a124
|
Rebuilt.
|
2017-10-13 19:44:32 -07:00 |
|
Bruce Hill
|
bccfe9d8e1
|
Changed tokenizing to treat symbols as their own things.
|
2017-10-13 19:41:58 -07:00 |
|
Bruce Hill
|
56f014a488
|
Improved code generation by changing vars["x"] to vars.x for allowed lua
var names.
|
2017-10-13 18:14:18 -07:00 |
|
Bruce Hill
|
a176c7dfb5
|
Rebuilt.
|
2017-10-13 18:09:46 -07:00 |
|
Bruce Hill
|
d13bcde2b9
|
Renamed repr_if_not_string to "stringify" and added nomsu:stringify for
convenience.
|
2017-10-13 16:16:07 -07:00 |
|
Bruce Hill
|
7435b61380
|
Changed generated code to be less verbose for function and macro defs
(using "foo %" syntax instead of {type="FunctionCall", ...} literals).
|
2017-10-13 16:10:47 -07:00 |
|
Bruce Hill
|
06d05ebeee
|
Tweaked macros to insert runtime checks, rather than compile-time.
|
2017-10-13 14:15:02 -07:00 |
|
Bruce Hill
|
c189be29bc
|
Added better output control for stderr.
|
2017-10-12 14:39:49 -07:00 |
|
Bruce Hill
|
d0b0cfcf39
|
Added an option to pass in vars to run()
|
2017-10-10 00:52:07 -07:00 |
|
Bruce Hill
|
2f1c0284fe
|
Test fix.
|
2017-10-09 04:37:16 -07:00 |
|
Bruce Hill
|
9e1aaf2d5c
|
Moved timeout code into compiler and out of a lib.
|
2017-10-09 04:31:41 -07:00 |
|
Bruce Hill
|
ca130f36a5
|
Added chain for loaded files.
|
2017-10-09 03:51:53 -07:00 |
|
Bruce Hill
|
e8c820b8f5
|
Moved colors to only when invoking from command line.
|
2017-10-08 20:41:05 -07:00 |
|
Bruce Hill
|
5b28823d6b
|
Fixed command line for no args.
|
2017-10-08 18:25:50 -07:00 |
|
Bruce Hill
|
7c231bf435
|
Updated command line interface and compilation.
|
2017-10-08 18:23:48 -07:00 |
|
Bruce Hill
|
529afd465f
|
Fixed permissions to work better with aliases.
|
2017-10-08 15:06:05 -07:00 |
|
Bruce Hill
|
b7973b0afa
|
Renamed ansicolors to consolecolors.
|
2017-10-07 16:25:17 -07:00 |
|
Bruce Hill
|
9251b462da
|
Fixed one compiler bug with comments immediately after indenting
|
2017-10-02 20:17:52 -07:00 |
|
Bruce Hill
|
63ed265157
|
More progress towards making everything work.
|
2017-10-02 19:00:58 -07:00 |
|
Bruce Hill
|
e2bbbfe161
|
More stuff is working more better.
|
2017-09-29 22:04:03 -07:00 |
|
Bruce Hill
|
ac25e20b9f
|
Kinda mostly working, except for closure vars like in lib/secrets.nom.
|
2017-09-28 17:49:15 -07:00 |
|
Bruce Hill
|
10d61df78b
|
Making forward progress.
|
2017-09-26 15:27:01 -07:00 |
|
Bruce Hill
|
8afab37c90
|
Recompiled.
|
2017-09-24 20:20:43 -07:00 |
|
Bruce Hill
|
e4660b169c
|
Renamed compiler -> nomsu for concision and clarity.
|
2017-09-22 11:56:46 -07:00 |
|
Bruce Hill
|
6882862d0f
|
Cleaned up code generation to have less cruft.
|
2017-09-22 11:44:07 -07:00 |
|
Bruce Hill
|
d3a5fc73bc
|
Tweaks and adjustments.
|
2017-09-22 00:51:53 -07:00 |
|
Bruce Hill
|
861d5accc0
|
Recompiled.
|
2017-09-22 00:27:27 -07:00 |
|
Bruce Hill
|
faf19b2729
|
Being extra cautious and putting the indent stack back.
|
2017-09-22 00:03:32 -07:00 |
|
Bruce Hill
|
0489456a4e
|
Fixed lua block vars.
|
2017-09-21 21:15:37 -07:00 |
|
Bruce Hill
|
26d72ce56e
|
Overhaul of invocations/specs. Much cleaner and more consistent now,
with less code duplication.
|
2017-09-21 21:11:13 -07:00 |
|
Bruce Hill
|
4fd6b61a00
|
Fixed bug that caused files to get reloaded if they returned nil.
|
2017-09-21 14:11:34 -07:00 |
|
Bruce Hill
|
79ad6b07c1
|
Optimization and cleanup pass.
|
2017-09-21 13:30:59 -07:00 |
|
Bruce Hill
|
c82e4f3409
|
Cleaning up and simplifying code.
|
2017-09-21 04:51:02 -07:00 |
|
Bruce Hill
|
34f50056ad
|
Rebuilt.
|
2017-09-21 04:04:08 -07:00 |
|
Bruce Hill
|
3715481506
|
Another overhaul, this time pulling all the chunks of the core lib into
their own files.
|
2017-09-21 00:10:26 -07:00 |
|
Bruce Hill
|
0750d64262
|
Updated all the code to work with the latest nomsu.
|
2017-09-20 05:02:53 -07:00 |
|
Bruce Hill
|
e073b23fbf
|
Added and fixed up "when"
|
2017-09-20 04:21:46 -07:00 |
|
Bruce Hill
|
b1b36fead5
|
Added require instead of run file.
|
2017-09-19 00:35:37 -07:00 |
|
Bruce Hill
|
3b10a60826
|
Moved core into lib/ and recompiled.
|
2017-09-19 00:30:47 -07:00 |
|
Bruce Hill
|
2c4acdfe67
|
More major overhaulage.
|
2017-09-18 22:41:50 -07:00 |
|
Bruce Hill
|
7087dc5151
|
Disabled serializing functions until it works.
|
2017-09-18 17:08:35 -07:00 |
|
Bruce Hill
|
f69e4763ca
|
Moved utils onto the compiler.
|
2017-09-18 12:34:10 -07:00 |
|
|
bf01888279
|
Switched to use more flexible write instead of print.
|
2017-09-15 04:03:42 +00:00 |
|
Bruce Hill
|
13490a34c8
|
Made repr fix more flexible/correct.
|
2017-09-14 19:45:36 -07:00 |
|
Bruce Hill
|
6225462a1c
|
Updated to use return values better.
|
2017-09-14 18:18:42 -07:00 |
|
Bruce Hill
|
f8f5e7b653
|
Added REPL.
|
2017-09-14 15:35:06 -07:00 |
|
Bruce Hill
|
2dc9d24a5f
|
Fixed error message, added another convenience accessor.
|
2017-09-14 05:49:01 -07:00 |
|
Bruce Hill
|
2cf8a96c70
|
Fixed out-of-order invocation args.
|
2017-09-14 05:44:55 -07:00 |
|
Bruce Hill
|
be55821244
|
Fixed invocation function to canonicalize better and play nice with "'"
|
2017-09-14 05:14:28 -07:00 |
|
Bruce Hill
|
88ff27148b
|
Rebuilt.
|
2017-09-14 04:33:45 -07:00 |
|
Bruce Hill
|
83463f11c5
|
Working string interpolation!
|
2017-09-14 02:41:10 -07:00 |
|
Bruce Hill
|
0f228d2d25
|
Changed comments to use # and #.. instead of (# #), which is more
consistent with the language's attitude towards code blocks and
indentation. No more long-range action closing parens.
|
2017-09-14 00:09:54 -07:00 |
|
Bruce Hill
|
6b5fbd436b
|
Renamed Compiler -> NomsuCompiler
|
2017-09-13 16:22:04 -07:00 |
|
Bruce Hill
|
522a039767
|
Fixed some bugs with generated code.
|
2017-09-12 23:12:45 -07:00 |
|
Bruce Hill
|
8221616cd6
|
Recompiled lua.
|
2017-09-12 23:08:38 -07:00 |
|
Bruce Hill
|
57268d8c04
|
Renamed language again.
|
2017-09-12 22:30:41 -07:00 |
|