Doug Coleman
00fb574a8d
factor: SYMBOL: foo foo [ bar ] initialize -> INITIALIZED-SYMBOL: foo [ bar ]
2018-08-04 21:53:05 -04:00
Doug Coleman
e6715f41a5
core: Add factor[[ ]] and <factor> to hold Factor strings.
2018-08-04 09:48:42 -04:00
Doug Coleman
24929aadf1
core: <WINDOWS <MACOS <UNIX <LINUX in core.
2018-08-04 09:32:09 -04:00
Doug Coleman
0ae3ac3e8a
core: Add private word.
2018-08-04 09:04:51 -04:00
Doug Coleman
0a77f6c679
factor: fixing [[ ]] and some unit tests
2018-08-02 18:29:04 -04:00
Doug Coleman
343674189c
factor: Let url"" and sbuf"" work without spaces.
...
Also url[[]] if you define a url[[ word.
2018-08-02 10:37:02 -04:00
Doug Coleman
81d713f6e6
syntax: Add INITIALIZED-SYMBOL:, STARTUP-HOOK:, and SHUTDOWN-HOOK:
2018-01-28 01:34:51 -06:00
Doug Coleman
daa7be5b7f
core: fix bootstrap.
2018-01-02 22:31:08 -08:00
Doug Coleman
825891c7ef
syntax: add ': for fried words
2017-12-29 11:09:53 -08:00
Doug Coleman
7616f6e95d
factor: add inlined quotations in stack effects
2017-12-02 16:38:11 -06:00
Doug Coleman
f8c54fd2bf
core: Move new functors to core.
...
Also move enough to implement them in an ok style. I would prefer to use formatting in core, but it depends on calendar, etc.
2017-11-24 20:06:44 -06:00
Doug Coleman
bc285f7072
core: Move multiline and interpolate to core.
...
caveats: peg.ebnf needs to find :> and let[ in "syntax" not locals anymore.
- You have to define a word ``IN: syntax`` before Factor picks up syntax changes
- You have to add a syntax word to core/bootstrap/syntax.factor
2017-11-24 19:12:04 -06:00
Doug Coleman
43628c8340
core: Move more things to core.
...
Tricky things:
f props>> == @ _ are not defined in syntax
2017-11-24 18:42:30 -06:00
Doug Coleman
085dbe716f
core: Move hashtables.identity and hashtables.wrapped into core.
2017-11-24 16:46:47 -06:00
Doug Coleman
815591e10c
factor: m: { a b } -> M\\ a b
2017-10-12 21:22:41 -05:00
Doug Coleman
4b35f2e0d9
factor: fix bootstrap.
2017-10-04 22:39:20 -05:00
Doug Coleman
cada003d7f
factor: Rename ``M\ array generic`` to ``m: { array generic }``.
...
The problem with M\ is that it has an arity of 1 where we need it to have arity 2. Also, for multimethods, the \ disables parsing of the array that follows, e.g. ``M\ { string string } multimethod-name`` parses as ``M\ {`` and leaves the rest unparsed. This is obviously wrong.
An alternative syntax that should be implement and looks ok is ``m{ array generic }``
2017-10-01 09:51:31 -05:00
Doug Coleman
29708329ab
core: Fix how \words are parsed.
2017-08-31 21:21:15 -05:00
Doug Coleman
baa6af4831
factor: All RENAME: and FROM: and EXCLUDE: to have \foo as word names.
...
Grab bag of other cleanups. tests and docs parse!
2017-08-31 21:21:14 -05:00
Doug Coleman
5a119fa9f7
syntax: Allow postpone: \foo
2017-08-31 21:21:13 -05:00
Doug Coleman
a2eb7b854d
core: SYNTAX: should allow \FOO words.
2017-08-31 21:21:13 -05:00
Doug Coleman
c436f6dbad
factor: char: postpone: color: hexcolor: flexhexcolor: decimal:
2017-08-31 21:21:13 -05:00
Doug Coleman
7c7bb93c55
factor: Rename GENERIC# to GENERIC#:.
...
Fixes #1670 .
2017-06-01 13:58:58 -05:00
Doug Coleman
e93d8f82bc
core: Add TH{ for making assoc tuples.
...
See #1449 .
https://github.com/factor/factor/issues/1449
2017-05-30 20:14:29 -05:00
Björn Lindqvist
0142d0b078
basis/,extra/: using parse-array-def in a bunch of places
2016-12-03 13:23:24 +01:00
John Benediktsson
4d83867cb4
strings.parser: remove parse-short-string, everyone should parse-string.
2016-04-04 15:00:04 -07:00
John Benediktsson
77c256412d
lexer: make CHAR: ! work.
2016-03-30 21:21:40 -07:00
John Benediktsson
52a3f6f309
lexer: support universal comments.
2016-03-30 21:09:08 -07:00
John Benediktsson
59caf874a3
syntax: removing #! as a comment character.
...
We don't need two types of comments and shebang (#!) is handled
natively by the lexer, so the original reason for #! is not valid.
2015-09-09 18:28:08 -07:00
John Benediktsson
399d01f56e
strings.parser: finish removing triple-strings.
...
parse-string => parse-short-string (on the same line)
parse-multiline-string-until => parse-full-string
2015-08-17 19:49:12 -07:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
Doug Coleman
02008979d9
factor: Change ERROR: foo ; to define ``throw-foo`` instead of having ``foo`` throw implicitly. The old ``foo`` still throws implicitly because this is a big change to get right in one patch, but it should be removed soon.
2015-08-12 15:26:18 -05:00
Doug Coleman
3d4bc1de1a
core: rename parse-call( to parse-call-paren
2015-07-27 09:54:08 -07:00
Doug Coleman
1fcf96cada
factor: remove """ string syntax for now. there are HEREDOC:, STRING:, escaping \", and something else soon.
2015-07-25 22:59:56 -07:00
Doug Coleman
117727d444
parser, source-files: you need to bootstrap after this patch.
...
cleans up some file vs path naming.
file -> current-source-file
file -> current-test-file somewhere else
source-file -> path>source-file
source-file-tuple -> source-file
2015-07-23 22:03:43 -07:00
Doug Coleman
0a7bfd3635
syntax: Add a "syntax" word property for tracking which words are defined with SYNTAX: as opposed to generated syntax words.
2015-06-29 18:45:16 -07:00
Doug Coleman
44e8e7b344
primitives: Change PRIMITIVE: to check that the word is in that vocabulary and the stack effect is correct.
...
Use PRIMITIVE: in core/ and basis/
2015-06-25 18:02:03 -07:00
Doug Coleman
6e60c811ac
core: Rename create to create-word, create-in to create-word-in.
2015-06-08 12:47:35 -07:00
Doug Coleman
afcb610960
core: Throw an error when defining MAIN: with a stack effect other than ( -- ). Fixes #1060 .
2014-06-06 10:59:48 -07:00
John Benediktsson
5bc1567c05
syntax: adding \b \v and \f escape codes.
2014-06-03 18:04:51 -07:00
Doug Coleman
5fab749dcc
words: Change word -> last-word, set-word -> set-last-word.
2013-03-23 16:12:03 -07:00
Doug Coleman
5a9e7cd374
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
5487480126
core: cleanup USING lists.
2013-03-05 10:34:47 -08:00
Doug Coleman
8637c1c012
hashtables: Enforce shape on hashtable literals. Fixes #568 .
2012-08-24 15:11:03 -07:00
Doug Coleman
3507b9bad7
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
07abeee9d9
syntax: remove BIN: HEX: OCT:
2011-11-23 20:07:33 -08:00
Doug Coleman
82c5388f68
classes: add syntax for intersection{ and union{ anonymous classes. make classoid a mixin.
2011-11-22 18:49:42 -08:00
Doug Coleman
fac17c10ba
classes.maybe: move maybe definition from classes.union to classes.maybe
2011-11-22 02:46:36 -08:00
Doug Coleman
067f9830ef
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
c731dc6edb
Rename lookup to lookup-word.
2011-11-06 16:00:00 -08:00