Commit Graph

54 Commits (4a86d45c17e89c1392daac72583fa3d526b49b99)

Author SHA1 Message Date
Doug Coleman d635604026 modern: Removing ch'a syntax.
It's cool but I don't like it right now.
2019-09-28 10:59:07 -05:00
Doug Coleman cbfdf2cfa8 factor: Add more parser guts. 2018-08-10 18:01:19 -05:00
Doug Coleman 24d266c1f1 lexer: Add #hashtag support. 2018-08-10 10:42:00 -05:00
Doug Coleman f05c7e8cd8 factor: char: a -> ch'a.
Also all contractions are not allowed in word names anymore. Even Data cannot use contractions...
2018-08-09 18:02:38 -04:00
Doug Coleman bd329c7497 lexer: Add char: \' support. Fix ch'\' support 2018-08-09 16:13:50 -04:00
Doug Coleman 59f406b64e parser: Add ``tag'payload`` and ``tag: payload`` 2018-08-09 15:59:12 -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 b0858e48b8 core: \foo is literally just foo. To escape it, do ``\ foo`` instead.
Fix smalltalk too.
2017-08-31 21:21:14 -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 c436f6dbad factor: char: postpone: color: hexcolor: flexhexcolor: decimal: 2017-08-31 21:21:13 -05:00
Björn Lindqvist 20711a0fd3 Adding escaping to CHAR: " -> CHAR: \"
It is not necessary to escape the " character, but it doesn't hurt and
is necessary for syntax-highlighting (FUEL) to work correctly.
2016-09-04 06:40:43 +02: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 eaa65bc66f lexer: change shebang handling to be in skip-blank.
It previously required "#!" to be defined like "!", now it doesn't.
2015-09-10 17:53:04 -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
John Benediktsson 527c4ea2f8 lexer: change with-lexer to use with-variable. 2015-06-29 19:31:24 -07:00
John Benediktsson ab3f3173af change errors to use "object" instead of "obj". 2014-12-01 08:04:49 -08:00
John Benediktsson 8afe2dfe37 lexer: change skip back to public interface. 2014-05-20 09:42:41 -07:00
John Benediktsson a38524eb99 lexer/parser: rename (scan-token) to ?scan-token, (scan-datum) to ?scan-datum. 2014-05-20 09:13:58 -07:00
John Benediktsson 98abd95040 lexer: more type checking. 2014-05-20 08:53:41 -07:00
John Benediktsson a0c5e492dd lexer: change line-text to always be a string. 2014-05-19 14:31:08 -07:00
John Benediktsson d3acf4d482 lexer: cleanup a bit. 2014-02-21 08:36:31 -08:00
Doug Coleman 2d9a15c7c1 lexer, parser: Rename unexpected-eof. 2013-03-23 21:35:50 -07:00
John Benediktsson 5487480126 core: cleanup USING lists. 2013-03-05 10:34:47 -08:00
John Benediktsson 8c69ea5562 lexer: typed slots. 2012-07-27 16:05:28 -07:00
John Benediktsson 4e72d80256 Using "same?" in more places. 2012-07-21 10:22:44 -07:00
Joe Groff 2cf8b32bda lexer: skip #! as a single token at front of line
Fixes #370
2011-11-27 14:59:54 -08:00
Doug Coleman dc0a921866 Remove the lexer-factory because nothing uses it. Update usages. 2011-10-29 01:11:19 -07:00
John Benediktsson d61de12011 Cleanup more lint warnings. 2011-10-14 12:31:46 -07:00
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 842327f3df lexer: more clear code. 2011-09-17 08:14:13 -07: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 627295f094 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
Slava Pestov dde21c3cc4 lexer: fix output type of map-tokens 2010-03-26 16:31:48 -04:00
Slava Pestov a566d8cc6b lexer: each-token and map-tokens did not handle EOF properly 2010-03-26 03:42:07 -04:00
Joe Groff 10ca2ba695 add polymorphic effects for lexer:each-token, map-tokens 2010-03-08 18:55:46 -08:00
Joe Groff afaaf30679 Merge branch 'lexer-parsing-word-errors' 2010-03-02 20:46:23 -08:00
Joe Groff 9bf5c76771 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
Joe Groff 163c26ad72 lexer, parser: show initial parsing word line as part of lexer-errors 2010-02-28 13:01:03 -08:00
Doug Coleman 308d383ccd small fix for lexer 2009-08-18 00:10:23 -05:00
Slava Pestov 3b2fd98e7c Refactor source-file-errors a little bit to remove some code duplication, and so that clicking 'Edit' in error list tool works for parse errors in unit tests 2009-08-04 21:01:21 -05:00
Samuel Tardieu cb03fe43db Forbid tabs in source code 2009-06-16 20:49:28 +02:00
Doug Coleman 0ad6d1fb7b add a few usages of iota, remove most 1+ and 1- from core 2009-05-01 19:58:24 -05:00
Slava Pestov 669548e62e Clean up some usages of tuck, and add Joe's curried cleave/spread/apply combinators to kernel vocabulary 2009-02-02 13:43:54 -06:00
Slava Pestov a4d9cdfeb3 Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov 9628bcd646 New 'expect' word, which is a more correct version of the 'scan assert=' idiom 2008-11-22 17:27:40 -06:00
Doug Coleman 4d8f64822a ugly accessor 2008-08-29 16:52:10 -05:00
Doug Coleman 44ad8b5f3f new accessors 2008-08-29 16:16:43 -05:00
Slava Pestov 86f11713e3 Fixing some more bugs 2008-08-22 03:12:15 -05:00