Commit Graph

59 Commits

Author SHA1 Message Date
ValKmjolnir d121dcd630 🎨 improve format of code 2022-10-28 23:28:15 +08:00
ValKmjolnir 3fd1b25f79 🔥 change class name.
nasal_lexer -> lexer
nasal_parse -> parse
nasal_codegen -> codegen
nasal_vm -> vm
nasal_gc -> gc
nasal_dbg -> debugger
nasal_import -> linker
nas_ref -> var
2022-10-21 01:29:29 +08:00
ValKmjolnir 025ff49ffc 🚀 add `stl/csv.nas` & ast name change 2022-10-19 00:54:21 +08:00
ValKmjolnir a13e419518 📝 fix MSVC warning in nasal_builtin.h & improve error output. 2022-09-04 23:08:06 +08:00
ValKmjolnir b022b25cea 🚀 add colorful error info print. 2022-08-31 00:56:19 +08:00
ValKmjolnir a91826607c optimize header file, now modules could generate smaller dynamic libs. 2022-08-24 22:08:47 +08:00
ValKmjolnir 99a131c552 🚀 change `std::string` to `string`, change identifiers' name, `-o` is now a function available in debug mode. 2022-07-23 17:00:25 +08:00
ValKmjolnir 46516485b5 📝 change name of used types 2022-07-23 12:35:21 +08:00
ValKmjolnir 577ecd14df 🚀 update makefile to choose different compilers by users & fix some codes for MSVC to compile. 2022-07-16 16:53:11 +08:00
ValKmjolnir f1f48b4881 first step trying to make this project compiled by MSVC: using indirect-threading, change `\e` to `\033`. 2022-07-16 01:02:33 +08:00
ValKmjolnir 5d4cff0aa8 🚀 shrink code size & now import module can search lib file from local dir and dirs in PATH 2022-07-08 00:42:56 +08:00
ValKmjolnir 452bb4a5d8 📝 change some identifiers' name. 2022-07-03 22:46:28 +08:00
ValKmjolnir e8bd4664b3 optimize codes 2022-07-02 18:08:41 +08:00
ValKmjolnir c993c77b78 change format of error info
parser now can report exact place where is lacking ';' or ','
2022-06-30 23:15:10 +08:00
ValKmjolnir 51a1279110 add utf-8 identifier check in nasal_lexer & fix printf format at windows platform & add test file utf8chk.nas 2022-05-07 16:50:13 +08:00
ValKmjolnir fc25dd69e1 fix bug in codegen: foreach/forindex(id;vec/hash) may cause segmentation fault because of incorrect generated operand 2022-04-16 19:45:55 +08:00
ValKmjolnir ca073499ae optimize codes 2022-04-13 19:08:06 +08:00
ValKmjolnir 022460755f optimize codes 2022-04-12 18:26:54 +08:00
ValKmjolnir e77bb73a82 add special character `\e`. 2022-02-18 01:58:49 +08:00
ValKmjolnir 630c99c39a optimize codes 2022-01-16 22:48:00 +08:00
ValKmjolnir 70a43c2f03 bug fixed 2021-12-25 15:56:08 +08:00
ValKmjolnir f0ae63bce5 lexer,parser,import,codegen use the same error module. 2021-12-23 21:15:50 +08:00
ValKmjolnir 30650bb64f update error info (except parser)
prepare for nasal_err module
2021-12-23 14:09:54 +08:00
ValKmjolnir b8ef3cf6b6 delete op_cntpop & counter stack
now the iterator will be type vm_cnt and be stored on value stack.
2021-11-25 18:13:31 +08:00
ValKmjolnir cd08b2d1bb change code structure 2021-11-02 22:44:42 +08:00
ValKmjolnir fd0d836c03 add io lib & bug fixed 2021-10-27 23:05:25 +08:00
ValKmjolnir 183446d32a bug fixed 2021-10-26 22:34:02 +08:00
ValKmjolnir d4a9412947 optimize code structure 2021-10-16 21:08:57 +08:00
ValKmjolnir 1b240b293e update variable name in nasal_lexer 2021-10-16 14:07:55 +08:00
ValKmjolnir e41f728589 update 2021-10-15 22:21:57 +08:00
ValKmjolnir 577546763f change function name and cli format 2021-10-14 23:22:28 +08:00
Li Haokun 618ce59233
bad access bug fixed 2021-09-13 19:55:03 +08:00
Li Haokun 5fe6681b0d
update lexer 2021-08-12 19:00:17 +08:00
ValKmjolnir 638ec1c3a3 use same indentation 2021-08-09 21:30:18 +08:00
Li Haokun 90ac468aa9
update 2021-08-09 19:13:39 +08:00
ValKmjolnir 65dfef0a33 update 2021-08-09 01:02:27 +08:00
Li Haokun fa618eb97f
variables can be used before definition
change program to command line
change trace back info
change print function of nasal_vec and nasal_hash
2021-08-03 18:55:11 +08:00
ValKmjolnir 91771297d3 add test file 2021-08-01 22:34:02 +08:00
Li Haokun 9ebabfe737
fixed bug in nasal_parse 2021-07-21 17:38:11 +08:00
ValKmjolnir fd57e9a47c performance optimization of vm/lex/parse/test 2021-06-24 00:26:26 +08:00
Valk Richard Li 00c6e3b4fd nothing changed 2021-06-20 01:27:01 +08:00
Valk Richard Li 3deea632f8 front end optimization&stack overflow prompt
change parameter type to avoid unnecessary copies of string.
change stack depth from 65536<<4 to 16+(65536<<2).
now you could know stack overflow when it happens
2021-06-07 23:53:43 +08:00
Valk Richard Li 9f2c31149a bug fixed
fixed SIGSEGV when failed to load file in nasal_lexer::openfile
2021-06-06 19:17:02 +08:00
Valk Richard Li a68bf85f04 bug fixed
a gc bug which causes  fatal error.
add member value collect to make sure that nasal_val is not collected repeatedly.
use builtin_alloc in builtin function to avoid incorrect collection of value in use(gc_alloc).
change free_list to free_list[vm_type_size] to avoid too many calls of new/delete(but seems useless?)
but the most important thing is fixing this bug.
2021-05-31 19:10:59 +08:00
Valk Richard Li 6adb991c04 parser reports syntax error accurately
still need improvement
2021-05-04 01:13:53 +08:00
Valk Richard Li e2ee9cff4c update 2021-02-13 14:37:21 +08:00
Valk Richard Li 996ac59c79 update parser to LL(1) 2021-02-13 13:28:20 +08:00
Valk Richard Li 7329c70492 identifiers' name changed 2021-02-12 23:48:51 +08:00
Valk Richard Li f0cb8b6ef3 update 2021-01-06 21:07:34 +08:00
Valk Richard Li 9474ac9ef0 update & bug fixed 2021-01-05 23:17:32 +08:00