Commit Graph

502 Commits (0fb43fb86484f88320461da8ebed98722098253f)

Author SHA1 Message Date
Doug Coleman 76580da5d5 Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183.
Fixes #209.
2011-09-29 11:28:28 -07:00
John Benediktsson f9986bb446 alien.data: need to mark ">c-array" inline. 2011-09-26 13:34:42 -07:00
John Benediktsson 4f42c72012 specialized-arrays: performed some cleanup.
Specifically,
    •   Created >c-array to be replacement for >T-array.
    •   Created cast-array to be generic replacement for all T-array-cast words.
    •   Created c-array@ to be generic replacement for T-array@ words.
    •   Replaced usages of <T-array> with T <c-array>
    •   Replaced usages of <direct-T-array> with T <c-direct-array>
    •   Replaced usages of >T-array with T >c-array
    •   Replaced usages of T-array-cast with T cast-array
    •   Replaced usages of malloc-T-array with T malloc-array.
    •   Removed malloc-T-array.
    •   Removed T-array-cast.
    •   Removed T-array@.
    •   Removed >T-array.

I also added (but didn't change any code to use):
    •   T c-array-type, returns T-array
    •   T c-array?, returns T-array?
    •   c-array{ T ... }, returns T-array{ ... }

Bootstraps just find on Mac OS X.  Also `load-all test-all` works for me.
2011-09-26 11:37:51 -07:00
Joe Groff 81b12adcad math.blas, alien.fortran: move to unmaintained cuz I'm getting too old for this shit. closes #171 2011-09-24 20:59:21 -07:00
John Benediktsson f6b6e17b00 alien.data: removing unused (and broken?) "require-c-array". 2011-09-23 13:15:09 -07:00
Doug Coleman fa52349f9c Add STRUCT: syntax to alien.endian. Test and document the changes. 2011-09-22 11:27:53 -05:00
John Benediktsson 216f2332be alien: fix docs (add space between sentences). 2011-09-21 19:33:23 -07:00
Doug Coleman 4220f9dc0c Add c-types in alien.endian for making endian-aware STRUCTs. 2011-09-21 16:04:17 -05:00
Slava Pestov acde29b7c7 alien.libraries: add platforms.txt 2011-09-13 20:18:02 -07:00
Joe Groff 218cdcbe0b alien.libraries.unix: break circular dependency on alien.syntax 2011-09-13 09:49:53 -07:00
Joe Groff 5703e8d7a1 alien.libraries, compiler.cfg.builder.alien: if `dlopen` fails during `<library>`, call `dlerror` and store the error message in the library object; put the dlerror message in the linkage-error when a word from the library is compiled 2011-09-12 23:25:59 -07:00
Joe Groff b6e0f0180b alien.libraries, compiler.cfg.builder.alien: include the result of dlerror/GetLastError in the linkage-error for missing symbols 2011-09-12 23:25:59 -07:00
Joe Groff d510723d8e alien.c-types: fill out the higher-order stack effect of if-void 2011-09-03 11:10:08 -07:00
Joe Groff a820c1091d alien: merge enum improvements from Blei/gtk-image-loader 2011-08-27 13:48:30 -07:00
Erik Charlebois e28e48beea Create a setter for C-GLOBAL words 2011-05-23 23:36:14 -04:00
Erik Charlebois 64252dbdbc 32 and 64 bit Linux PPC support 2011-05-23 23:36:14 -04:00
Slava Pestov 59a708638c alien.c-types: add summary and docs for no-c-type error 2011-04-03 22:33:51 -07:00
Slava Pestov b0732bcb22 Fix unit test failures caused by alien.data change 2010-12-25 22:34:12 -08:00
Slava Pestov 75560699ea Move <ref>, deref and little-endian? from alien.c-types to alien.data, remove <c-object> 2010-12-25 16:55:36 -08:00
Slava Pestov dd0d9fbc10 alien.fortran: cleanup 2010-12-01 03:00:00 -08:00
Joe Groff 2dbfc7df33 alien.fortran: fix stack effect of SUBROUTINE: and FUNCTION: words to include out parameters 2010-12-01 07:05:32 +05:30
Slava Pestov 8be8c7f213 Merge branch 'master' of git://factorcode.org/git/factor 2010-10-31 20:26:29 -05:00
Slava Pestov b03a16ef4d alien.libraries: add-library won't close and re-open the library if nothing changed. This fixes a crash on Windows when reloading the windows vocab 2010-10-25 23:39:15 -05:00
Slava Pestov e139a7a02d Clean up alien.c-types changes a little 2010-10-25 21:09:08 -07:00
Doug Coleman 67c37591ca Remove <uint> *uint and friends. Hopefully remove the last usages of these words 2010-10-25 15:54:42 -05:00
Doug Coleman 4ca9bd0bba Remove usages of <void*> and *void* 2010-10-25 13:22:50 -05:00
Doug Coleman 1f57dc326e Remove many uses of <int> and *int etc 2010-10-25 12:49:12 -05:00
Slava Pestov a400b39fa1 alien.enums: enum>number didn't work in deployed images, add a test which deploys and runs benchmark.ui-panes to catch this in the future 2010-10-17 21:02:42 -04:00
Slava Pestov 559b1ae876 alien.c-types: make behavior of int/uint/long/ulong/longlong/ulonglong struct field setters consistent across 32-bit and 64-bit when supplied with floats (reported by Anton Gorenko) 2010-10-14 22:29:48 -07:00
Slava Pestov fbbaef70c4 Remove stream-peek and stream-peek1, re-implement dns vocab to not need this abstraction 2010-10-08 18:55:13 -07:00
Doug Coleman d462355035 Implement and document stream-peek 2010-10-08 06:34:19 -07:00
Doug Coleman 046efe7798 Update alien.enums docs 2010-10-01 01:41:24 -05:00
Doug Coleman 3ac8847a15 Fix typo ohno 2010-09-29 17:29:28 -05:00
Doug Coleman 3cdc9ba650 Use create-class-in to get redefinition errors with enums 2010-09-29 16:24:25 -05:00
Doug Coleman 56c8d47d58 Make alien.enums create singletons so I can dispatch on them. Clean up the code a bit. 2010-09-28 15:15:55 -05:00
Slava Pestov f9c9814e57 alien.data: remove deprecated malloc-object word 2010-09-20 21:36:20 -07:00
Slava Pestov d450d12b2b classes.struct: fields with a type that's an array of pointers (eg int*[3]) now work 2010-08-15 02:44:21 -07:00
Slava Pestov 25ea734a8e alien.parser: make int[3]* parse, make int[3][4 not parse 2010-08-15 02:37:17 -07:00
Slava Pestov e8152e9098 alien.parser: array types where the base type was a pointer didn't parse (reported by Dmitry Shubin) 2010-08-15 02:32:12 -07:00
Slava Pestov cc71799833 alien.prettyprint: fix unit test snafu 2010-08-11 21:52:37 -07:00
Joe Groff 04075be646 alien.c-types: classify typedefs of array/string types as typedef-words so they prettyprint correctly 2010-08-11 10:03:19 -07:00
Slava Pestov a5f59e9cd6 alien.prettyprint: fix test failure 2010-07-29 21:09:05 -04:00
Slava Pestov 6142bd7335 alien.syntax: FUNCTION: and FUNCTION-ALIAS: now define inline words 2010-07-28 03:05:14 -04:00
Slava Pestov b23aac1beb compiler.cfg: open-code parameter boxing and unboxing for certain C types 2010-07-19 10:25:13 -04:00
Slava Pestov 446ee6896d alien.data: remove second quotation parameter from with-out-parameters, now all values are copied properly and calling 'clone' on structs in this quotation is not necessary 2010-07-16 17:32:05 -04:00
Slava Pestov 5b31cbcb3c alien.data: document with-scoped-allocation and with-out-parameters, and add initial: syntax 2010-07-16 17:13:38 -04:00
Slava Pestov 8a0525e5ce Add a scan-token word which is like scan, except throws an error on EOF; document scan-object word; mention that scan-token/scan-object are preferred over scan/scan-word 2010-07-06 16:20:08 -04:00
Slava Pestov 4c4a86ee72 alien.data: fix unit test failure 2010-06-11 15:38:57 -04:00
Joe Groff c8ea7ed0c7 alien.data: make binary-zero? public and move it from classes.struct.private 2010-06-10 17:05:43 -07:00
Slava Pestov be1b5e6627 alien.prettyprint: fix wrapping when prettyprinting pointer: 2010-06-02 03:11:46 -04:00