Doug Coleman
9a22d35cb7
words: Change word -> last-word, set-word -> set-last-word.
2013-03-23 16:12:03 -07:00
Doug Coleman
56720db9bd
classes.builtin: Add the BUILTIN: keyword which lets builtin classes show up in source files. Probably could use save-location to allow editing, but it seemed to break things.
2013-03-10 12:05:38 -07:00
John Benediktsson
3337401551
core: cleanup USING lists.
2013-03-05 10:34:47 -08:00
Doug Coleman
7de0c0cb69
hashtables: Enforce shape on hashtable literals. Fixes #568 .
2012-08-24 15:11:03 -07:00
Doug Coleman
cb42258144
classes:
...
- Allow methods to dispatch off union{ } and intersection{ } classes.
- Add not{ } anonymous-complement syntax.
- Define class-name for anonymous-union/intersection/complement and maybes, and clean up pprint.
- Change maybe: foo to maybe{ foo }
- Call sort-classes when making anonymous-union/anonymous-intersection classes so that they are canonicalized.
2012-05-03 19:45:30 -07:00
Joe Groff
93e5b711a6
syntax: remove BIN: HEX: OCT:
2011-11-23 20:07:33 -08:00
Doug Coleman
30ade9023c
classes: add syntax for intersection{ and union{ anonymous classes. make classoid a mixin.
2011-11-22 18:49:42 -08:00
Doug Coleman
d3a4e72f95
classes.maybe: move maybe definition from classes.union to classes.maybe
2011-11-22 02:46:36 -08:00
Doug Coleman
14dbf929ee
classes.union: Define a maybe: word that makes a tuple that acts as an anonymous union for a type and f. Updated all the places we define UNION: ?foo foo POSTPONE: f ;. Fixes #416 and lots of headaches.
2011-11-22 01:56:13 -08:00
Doug Coleman
be9f8a99f0
Rename lookup to lookup-word.
2011-11-06 16:00:00 -08:00
Joe Groff
c8aab6659d
Revert "syntax: make it so PRIMITIVE: verifies primitives"
...
This reverts commit 200ea70cffc4bdc74a97e4981442161f64cdbaa3.
2011-11-02 13:23:11 -07:00
Joe Groff
a834ebd493
syntax: make it so PRIMITIVE: verifies primitives
...
It's a bit strange for disparate vocabs to reference words that get created out of thin air during bootstrap, so this lets there be some trace in the seeded vocab source that there was a word created there.
2011-11-02 13:23:09 -07:00
Slava Pestov
eec7602aed
Move definition of 't' from syntax to bootstrap/primitives to fix bootstrap, now that 't' really has to be a class early
2011-10-31 00:24:26 -07:00
John Benediktsson
20a1d63df4
hash-sets: separate <hash-set> and >hash-set to match other containers. Fixes #154 .
2011-10-19 11:35:25 -07:00
John Benediktsson
f2741b34a4
Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed.
2011-10-18 13:19:39 -07:00
Doug Coleman
e75e2b1f14
Make M\ throw an error upon lookup failure. Change method -> ?lookup-method, lookup-method is the throwing version of ?lookup-method. Fixes #229 .
2011-10-03 15:49:49 -07:00
Doug Coleman
94f3ca3b8c
Remove all non-core uses of (scan-token)
...
Add scan-datum
Add scan-number
Document more words
Fixes #225 .
2011-10-02 12:00:08 -07:00
Doug Coleman
300138eb4d
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
Joe Groff
51489e3ef8
parser, source-files, syntax: have MAIN: store the main entry point in the source-file record in addition to the vocabulary. Have run-file execute the MAIN: word for a file if present after evaluating its contents.
2011-08-17 20:58:09 -07:00
Slava Pestov
e935681743
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
d2d466de29
Language change: tuple slot setter words with stack effect ( value object -- ) are now named FOO<< instead of (>>FOO)
2010-05-06 17:21:02 -04:00
Joe Groff
e8dc04746e
catch merge conflicts in source and report them as such
2010-04-06 13:34:26 -07:00
Slava Pestov
a3413060bb
lexer: each-token and map-tokens did not handle EOF properly
2010-03-26 03:42:07 -04:00
Daniel Ehrenberg
4f1819f632
Merge branch 'master' of git://factorcode.org/git/factor into bags
2010-03-02 17:04:45 -05:00
Joe Groff
0c71fcccc7
lexer: add "each-token" and "map-tokens", which are equivalent to "parse-token _ each/map" but incremental. update a smattering of parsing words (such as USING:, SYMBOLS:, etc.) to use each-token/map-tokens
2010-02-28 22:19:43 -08:00
Daniel Ehrenberg
d0e7d8198e
Moving new-sets and hash-sets to core
2010-02-26 11:01:57 -05:00
Slava Pestov
1100861204
Add support for final tuple classes which cannot be subclassed: TUPLE: foo ... ; final
2010-02-18 02:19:57 +13:00
Slava Pestov
7fa61addcd
words: undefined error now contains the word in question
2010-02-03 23:11:23 +13:00
Doug Coleman
a57e990af7
parsed -> suffix!, add append!
2009-10-28 13:38:27 -05:00
Doug Coleman
002bcfab22
add multiline string support
2009-09-19 01:55:05 -07:00
Slava Pestov
47bc1498f7
Add NAN: literal syntax for NANs with a payload
2009-09-12 15:06:15 -05:00
Joe Groff
80ed1dd954
"deprecated" declaration, "deprecation" vocab to track deprecations in the error log
2009-08-20 15:10:42 -05:00
Slava Pestov
9eec019e9b
Remove initial-quot feature
2009-06-15 13:07:15 -05:00
Doug Coleman
d29c71d821
add initial-quot: syntax for tuples
2009-06-11 19:48:14 -05:00
Slava Pestov
ba04d5af1e
Update documentation for stricter vocabulary search path semantics
2009-05-16 00:29:21 -05:00
Slava Pestov
3ebd4594e8
Implement stricter vocab search path semantics, with a new API for vocabs.parser. Add map-find-last to sequences vocab
2009-05-14 22:31:29 -05:00
Slava Pestov
b1bcc44dd5
Rename use+ to add-use, move search to vocabs.parser, EXCLUDE: bombs out if word doesn't exist
2009-05-13 22:15:48 -05:00
Slava Pestov
4d438a3edd
Remove cruddy string encoding/decoding code from VM
2009-05-02 13:45:38 -05:00
Slava Pestov
3dc9fdf9db
Fleshed out new dispatch code
2009-04-24 20:43:01 -05:00
Slava Pestov
3752c706da
Add M\ syntax for method literals
2009-04-06 02:57:39 -05:00
Slava Pestov
5a903d7bcd
Fix a bug in CONSTANT: -- it wasn't calling reset-word
2009-03-29 22:46:27 -05:00
Slava Pestov
4fc2182ac8
define-generic and define-simple-generic now take stack effect parameters; math-combination is a singleton instead of a tuple
2009-03-22 18:00:26 -05:00
Slava Pestov
c0154c1391
Change (:) to parse effect immediately, and remove ( parsing word
2009-03-21 03:17:35 -05:00
Slava Pestov
ea60f8ae93
Changing : foo ; parsing to SYNTAX: foo ;
2009-03-21 01:27:50 -05:00
Slava Pestov
786475102d
Make more code infer
2009-03-17 02:19:50 -05:00
Slava Pestov
be4fb1e7d9
Move call( and execute( to core
2009-03-16 20:11:36 -05:00
Slava Pestov
bfb6b4642a
Consultations now implement the definition protocol; removing one from a source file forgets consulted methods
2009-03-07 00:42:43 -06:00
Slava Pestov
e4a0396550
Add parse-quotation hook to parser which locals overrides. '[ and [ use this hook. Fixes locals bug reported by erg
2009-03-06 19:48:04 -06:00
Slava Pestov
4de41f94e9
Fixing wrappers with locals
2009-01-28 17:07:31 -06:00
Slava Pestov
c5160d76e9
Merge qualified, alias, symbols, constants into core
2008-12-17 18:10:01 -06:00