Commit Graph

49 Commits (6490391bfcf03dc1f1f92ee5f6c5d06d0ca44f6a)

Author SHA1 Message Date
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 57f9d78892 improve help by linking to types directly. 2014-05-23 20:20:15 -07: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 98935b7f15 docs: change ``{ $quotation "( x -- y )" }`` to ``{ $quotation ( x -- y ) }``. 2014-05-18 20:09:10 -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 18f3df9d4a more help-lint 2010-03-09 21:02:43 -08: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 2c5deba1d1 parse-tokens had two $notes sections. oops! 2010-03-01 11:50:16 -08:00
Joe Groff 51541bb35b lexer, parser: update docs on "parse-tokens" and add docs for "each-token", "map-tokens" 2010-03-01 11:47:57 -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
Keith Lazuka 405e5d015b docs: change $subsection to $subsections 2009-10-02 12:15:48 -04: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
Slava Pestov 9bf63b1613 New $quotation markup element 2008-11-16 09:03:30 -06:00
Slava Pestov 93e9e34175 Add $maybe markup element 2008-11-16 06:02:13 -06:00
Slava Pestov 79f3865f92 Add missing meta-data 2008-09-23 16:11:59 -05: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 8b855b2445 Help lint fixes 2008-08-22 23:00:35 -05:00
Slava Pestov 86f11713e3 Fixing some more bugs 2008-08-22 03:12:15 -05:00
Slava Pestov d66f887736 Create basis vocab root 2008-07-28 22:03:13 -05:00
Slava Pestov 537269447c Move mirrors out of the boot image 2008-07-02 00:20:01 -05:00
Slava Pestov b36e06d0d6 Builtinn types now use new slot accessors; tuple slot type declaration work in progress 2008-06-28 02:36:20 -05:00
Slava Pestov cf345df3f5 Bootstrap fix 2008-06-25 03:53:36 -05:00
Slava Pestov 6e0d35e615 Split up huge parser vocabulary 2008-06-25 03:25:08 -05:00