Commit Graph

3160 Commits (39c228db6d14ae9229d712abb716489248c3dca8)

Author SHA1 Message Date
Chris Double 39c228db6d Update peg.pl0 to use range pattern syntax
This allows removing the words for ident and number, replacing them
with EBNF expressions.
2008-03-20 14:22:14 +13:00
Chris Double 68388fbed9 Updated peg.expr to use range-pattern for digits 2008-03-20 14:15:06 +13:00
Chris Double ec4f964e4f Fix pl0 for EBNF syntax changes 2008-03-20 14:06:21 +13:00
Chris Double 795ef0ae3b Add ranges to EBNF syntax
This works:
  <EBNF letter = [a-zA-Z] EBNF>
and
  <EBNF not-digit = [^0-9] EBNF>
2008-03-20 13:55:19 +13:00
Chris Double 264284d0c4 Add range-pattern parser 2008-03-20 13:40:22 +13:00
Chris Double 97b58580a7 Add expression evaluator example for EBNF 2008-03-20 03:30:53 +13:00
Chris Double 92d8140d87 Change ebnf-action to properly nest with attached parser
This allows removal of last-parser hack. Syntax of EBNF changes though.
Now an action must attach to a group:

  <EBNF foo = (a b c) [[ ...act on group... ]] EBNF>
2008-03-20 03:05:40 +13:00
Chris Double 65fabeec11 remove => action and replace it with [[ code ]] in EBNF
Previously the action had to be a factor word and could only appear at the end of a rule:

  : aword ( ast -- ast ) drop V{ 1 2 } ;
  <EBNF foo = "a" "b" => aword EBNF>

Now actions can appear anywhere after an element, and can be any factor code between [[ ... ]] delimiters:

  <EBNF foo = "a" "b" [[ drop V{ 1 2 } ]] EBNF>
  <EBNF foo = "a" [[ drop 1 ]] "b" [[ drop 2 ]] EBNF>

Unfortunately since this means the ebnf>quot code uses the equivalent of eval, it no longer compiles nicely since it can't be inferred. The generated parsers however do compile.
2008-03-20 02:16:30 +13:00
Chris Double c0b7bdf823 Add *, + and ? to list of non-allowed ebnf identifier characteres 2008-03-20 01:25:57 +13:00
Chris Double 82d54d3776 EBNF syntax change
[ ... ] is now ( ... )?
{ ... } is now ( ... )*
Added ( ... )+
2008-03-20 01:18:09 +13:00
Chris Double 64135b73e1 Add support for ensure-not and parsing any single character to EBNF
This allows, for example:
  foo = {!("_" | "-") .}

This will match zero or more of any character, except for _ or -
2008-03-19 19:15:52 +13:00
Chris Double 208c88c449 Update pl0 for ebnf changes, and add more tests 2008-03-19 18:35:45 +13:00
Chris Double eef6ae7827 Remove need for '.' to terminate rule lines in EBNF 2008-03-19 18:07:31 +13:00
Chris Double 9403d97e22 Add syntax-pack and grouped to ebnf refactoring 2008-03-19 17:52:22 +13:00
Chris Double 708d55fb8e Add syntax word for ebnf 2008-03-19 17:37:08 +13:00
Chris Double 7578538122 Minor tidyup of ebnf 2008-03-19 17:34:47 +13:00
Chris Double cc9a17b551 Use choice* and seq* in ebnf 2008-03-19 17:00:53 +13:00
Chris Double 4b37c9098e Use multiline for parsing EBNF string 2008-03-19 16:54:42 +13:00
Slava Pestov 290883f0e4 Fix DLL" 2008-03-18 18:02:24 -05:00
Slava Pestov f31c521c47 Assorted bug fixes 2008-03-18 17:46:25 -05:00
Slava Pestov 4b2368e99f Fix io.unix.launcher unit test 2008-03-18 03:27:14 -05:00
Slava Pestov 65c74d8404 Fix macosx/ppc bootstrap 2008-03-18 02:37:31 -05:00
Slava Pestov 48d9419912 Merge branch 'master' of git://factorcode.org/git/factor 2008-03-18 01:27:29 -05:00
Slava Pestov 6e7556242b Comment out compilation unit stuff for now 2008-03-18 01:26:30 -05:00
Slava Pestov 296a20767f Fix a race condition 2008-03-18 01:26:09 -05:00
Doug Coleman 880a3a2af4 before major refactoring 2008-03-17 14:14:04 -05:00
Doug Coleman 86221d57f3 fix cairo-demo
my commit did more than fix a using..oops
2008-03-17 09:03:24 -05:00
Slava Pestov 7bd91f68c9 Fix walker 2008-03-17 05:08:47 -05:00
Slava Pestov d4be6ea98c Working on HTTP server 2008-03-17 04:31:13 -05:00
Slava Pestov 604a895f99 Merge branch 'master' of git://factorcode.org/git/factor 2008-03-17 03:28:50 -05:00
Slava Pestov 9d2d1c5347 Fix serialize 2008-03-17 03:28:07 -05:00
Slava Pestov 7f11c9fe3a Fix delegate 2008-03-17 03:27:41 -05:00
Doug Coleman f0ef7dddcb Merge branch 'master' of git://factorcode.org/git/factor 2008-03-17 00:26:12 -05:00
Doug Coleman 16e6f36fc9 refactor db
start on random-id
2008-03-17 00:26:05 -05:00
Slava Pestov 2947297cef Reports 2008-03-16 23:42:21 -05:00
Slava Pestov ea2723a5a0 Fix serialization of circular structure 2008-03-16 23:41:26 -05:00
Eduardo Cavazos 4e0c0dab49 Merge branch 'master' of git://factorcode.org/git/factor 2008-03-16 15:58:14 -06:00
Eduardo Cavazos 3d2ee2a35c Add more gl-docs 2008-03-16 15:57:56 -06:00
Eduardo Cavazos 3cc32597f8 factor.el: minor additions 2008-03-16 15:57:37 -06:00
Eduardo Cavazos d46de0ae59 io.files: remove old code 2008-03-16 15:57:22 -06:00
Doug Coleman 11c0a9ebcd Merge branch 'master' of git://factorcode.org/git/factor 2008-03-16 11:22:31 -05:00
Slava Pestov 8a8a94206d Update unit tests 2008-03-16 03:51:43 -05:00
Slava Pestov fcee406c6f Merge branch 'master' of git://factorcode.org/git/factor 2008-03-16 03:44:20 -05:00
Slava Pestov 4a4eb8b7bb Fix :help 2008-03-16 03:43:30 -05:00
Slava Pestov 254d8455a3 load-library returns f if library not defined 2008-03-16 03:43:24 -05:00
Slava Pestov 7d3c590cfe Update logging for parser change 2008-03-16 02:45:45 -05:00
Slava Pestov d06db3f628 Fix bootstrap error exit code 2008-03-16 02:44:39 -05:00
Slava Pestov bc71849bf6 Fix bogus f variable in global namespace 2008-03-16 02:44:17 -05:00
Slava Pestov ec698b7f53 Parser overhaul 2008-03-16 02:43:00 -05:00
Slava Pestov 0d10b84614 Merge branch 'master' of git://factorcode.org/git/factor 2008-03-16 02:22:01 -05:00