Commit Graph

77 Commits

Author SHA1 Message Date
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
2197da3028 Updated comments. 2017-10-23 14:55:12 -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
ca5896b7bd Finally fixed the bullshit way that string literals were converted to lua. 2017-10-19 18:16:15 -07:00
Bruce Hill
b98059261c Abbreviated "lua code" to "lua>" and "lua expr" to "=lua" and "lua
block" to "lua do>"
2017-10-19 17:00:10 -07:00
Bruce Hill
9dee9dbbd8 Made symbols group with each other, instead of *every* one being alone. 2017-10-13 19:43:55 -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
e476bfea52 Improved code generation for "when" statements using elseif, and
improved code generation for loops by omitting goto labels when not used.
2017-10-13 18:09:04 -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
1822df2b1a Added *much* better filename and line number error reporting. 2017-10-13 15:42:10 -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
e9cb758efd Added note about checking compiler. 2017-10-05 15:26:22 -07:00
Bruce Hill
9251b462da Fixed one compiler bug with comments immediately after indenting 2017-10-02 20:17:52 -07:00
Bruce Hill
e3200dece1 Updating comments. 2017-10-02 19:35:01 -07:00
Bruce Hill
dcd3391b36 Updated to undo some of the block/thunk stuff. Thunks are thunks, and
expressions can be grouped with parens, and they have a clear
distinction.
2017-10-02 17:21:22 -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
02def0af92 lib/metaprogramming.nom is working! 2017-09-25 17:02:00 -07:00
Bruce Hill
af3274ca92 massive overhaul, compiler kinda works. 2017-09-24 20:20:27 -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
0436e4d15c Some really minor tweaks. 2017-09-22 00:27:10 -07:00
Bruce Hill
03b4b0ea9c Did that. 2017-09-22 00:05:54 -07:00
Bruce Hill
faf19b2729 Being extra cautious and putting the indent stack back. 2017-09-22 00:03:32 -07:00
Bruce Hill
85db7b422b Relocated LPEG defs to outside the parse funtion. 2017-09-22 00:01:53 -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