Commit Graph

822 Commits

Author SHA1 Message Date
acd9c2acd4 Fixed breaking bug with compiler not finding the peg file when running the installed version because it
wasn't looking in the full nomsupath.
2018-09-21 00:27:14 -07:00
Bruce Hill
79d4bd5125 Got rid of repr() use and replaced with :as_lua() or :as_nomsu() in as
many places as possible.
2018-09-18 19:49:29 -07:00
Bruce Hill
d11f9bc5d3 Oops, added "$" to ensure keywords with suffixes don't get changed. 2018-09-18 17:42:01 -07:00
Bruce Hill
884368593d Added code for handling lua keywords in as_lua_id(). 2018-09-18 17:40:49 -07:00
Bruce Hill
790b73c52a Fix for as_lua_id() for keywords 2018-09-18 17:28:26 -07:00
Bruce Hill
c1cba45968 Added support for compile actions returning trees, and compiling blocks
into values.
2018-09-17 15:30:24 -07:00
Bruce Hill
e3bf10196a Added support for compile actions returning syntax trees, which will get
recompiled until they produce Lua code.
2018-09-16 17:53:26 -07:00
Bruce Hill
f225a48367 Much better error reporting for compile errors (i.e. not parse errors),
using the pretty_error system.
2018-09-16 17:38:51 -07:00
Bruce Hill
96e5e567cb Working module system. 2018-09-16 16:57:24 -07:00
Bruce Hill
2282085e13 Initial working version. 2018-09-15 20:20:46 -07:00
Bruce Hill
f8cfdd0f22 Better parsing of strings and handling of non-printable characters and
tabs.
2018-09-15 15:39:57 -07:00
Bruce Hill
b721356d8b Added 3.8 upgrade. 2018-09-14 19:18:18 -07:00
Bruce Hill
e22c35681f Auto-upgraded everything. 2018-09-14 19:17:16 -07:00
Bruce Hill
7112af7cb6 Fixed comments in nomsu codegen. 2018-09-14 15:24:31 -07:00
Bruce Hill
626b6cab79 Updated compiler to produce cool string output. 2018-09-14 15:20:07 -07:00
Bruce Hill
3e2844ef62 Added error truncating. 2018-09-14 14:55:00 -07:00
Bruce Hill
9bba7dd2cd Using more concise peg file finding. 2018-09-14 14:46:29 -07:00
Bruce Hill
d428725c86 Recompile 2018-09-14 14:43:33 -07:00
Bruce Hill
cdbf3c971f Bumped compiler version to 8 2018-09-14 14:43:21 -07:00
Bruce Hill
13ce4e7ee9 Renaming parser2 to parser. 2018-09-14 14:42:20 -07:00
Bruce Hill
31f593fb09 Removing the remnants of the old parser system. 2018-09-14 14:39:10 -07:00
Bruce Hill
54e1f99e90 Upgraded nomsu.1.peg to tidier version. 2018-09-14 14:26:06 -07:00
Bruce Hill
21d0d7901c Upgraded nomsu.2.peg and fixed minor bug in Source serialization in
trees.
2018-09-14 14:12:22 -07:00
Bruce Hill
7c1f2dfd69 Fixes and improvements, and ported nomsu.3.peg to new tidier syntax. 2018-09-14 14:01:07 -07:00
Bruce Hill
4d48bf359d Improvements to indented text parsing and error reporting. 2018-09-13 16:02:40 -07:00
Bruce Hill
ea310306d7 Initial working version. 2018-09-12 15:32:04 -07:00
Bruce Hill
9e10c8bf00 Removing dead code and string.as_lua_id() (now just set on string
metametatable)
2018-09-10 16:37:16 -07:00
Bruce Hill
989e133a57 Fixed tree_to_nomsu for method calls that span lines. 2018-09-10 16:29:17 -07:00
Bruce Hill
7c6047254e Upgraded to 3.8 (text method changes) and fixed some bugs in
tree_to_nomsu.
2018-09-10 16:26:27 -07:00
Bruce Hill
c859eac2be Fixed "A_" prefix. 2018-09-10 16:04:13 -07:00
Bruce Hill
43e6523fd4 Shifting towards more text methods instead of text global functions.
Also fixed a bug with method call parenthesizing.
2018-09-10 15:56:00 -07:00
Bruce Hill
603c5b1245 Minor fixes/tidying. 2018-09-08 01:06:05 -07:00
Bruce Hill
13923c9d26 Made uuid action public. 2018-09-06 13:32:30 -07:00
Bruce Hill
a35d010dfe Removed the mandatory "_" prefix for Nomsu variables, renamed "list" and
"dict" to "List" and "Dict", or in Nomsu's environment, "_List" and
"_Dict", removed uuid.lua and replaced it with core/id.nom for handling
IDs.
2018-09-06 12:48:16 -07:00
Bruce Hill
e1bc075bb5 Removing the "A_" prefix on action names, and improving the quality of
as_lua_id() (guaranteed injectivity).
2018-08-31 15:22:32 -07:00
Bruce Hill
ee10b788e3 Updated to use method call syntax. 2018-08-30 14:36:25 -07:00
Bruce Hill
8d3e9358d5 Added bitops files to Makefile. 2018-08-30 14:36:14 -07:00
Bruce Hill
bfb40c02bc Added test for list addition. 2018-08-30 14:26:32 -07:00
Bruce Hill
7f34b9f5ef Added safety check to detect non-number keys in lists. 2018-08-30 14:21:33 -07:00
Bruce Hill
18126da9c5 Auto-upgraded to 3.7 2018-08-30 14:16:18 -07:00
Bruce Hill
ba00294bad Recompile 2018-08-30 14:07:47 -07:00
Bruce Hill
ab38fd19fa Fixed obnoxious bug where List was getting used instead of a Dict,
causing havoc when .first and .pop were being accessed.
2018-08-30 14:07:40 -07:00
Bruce Hill
77ebe2fb2a Fix for "\000123" getting compiled to Lua as "\0123" 2018-08-29 19:49:06 -07:00
Bruce Hill
70b8ee9070 Fixed typo in 3.7 upgrade. 2018-08-29 19:41:46 -07:00
Bruce Hill
4f30e02acb Handling more compatibility stuff, including Lua 5.4, and a backup for
if openssl module is not found, and moving containers (List/Dict) into
their own file, as well as bit operators (and support for __bxor, etc.
metamethods in Lua 5.2/LuaJIT)
2018-08-29 19:39:15 -07:00
Bruce Hill
aae5ce31fe Actually deleting old list modification methods. 2018-08-29 16:05:14 -07:00
Bruce Hill
811fdd6856 Tweaked version 3.6 to include deprecating list append/removal functions
in favor of using a method call style.
2018-08-29 16:00:04 -07:00
Bruce Hill
22495c7d70 Added replace tool. 2018-08-29 15:12:01 -07:00
Bruce Hill
dcb5e8add2 Fully updated to 3.6, deprecated old LuaCode global functions like "to 1
write 2" and replaced them with method calls like "1::append 2"
2018-08-29 15:10:27 -07:00
Bruce Hill
23b52bc22d Intermediate step in upgrading to 3.6. Fixed a bug with upgrading
methods.
2018-08-29 15:03:03 -07:00