Chris Double
970f0055c2
Fix failing ebnf unit test
2008-04-03 17:33:37 +13:00
Chris Double
cc7d945a80
Change ebnf variables to not use namespaces
2008-04-03 17:28:09 +13:00
Chris Double
27f2992dc5
Add failing ebnf test
2008-04-03 16:09:03 +13:00
Chris Double
eac450bdcf
Add ebnf rule word
2008-04-02 15:55:18 +13:00
Chris Double
34a1505d95
PL0 whitespace handling improvement
2008-04-02 15:47:30 +13:00
Chris Double
bbcc84862f
Tweak ast from sequences in ebnf
2008-04-02 15:47:21 +13:00
Chris Double
1b58ba404e
Fix peg.pl0 test failures
2008-04-02 13:50:29 +13:00
Chris Double
9d0485cd8a
Merge commit 'origin/master'
2008-04-02 13:02:47 +13:00
Chris Double
6b454eed36
Various peg/ebnf fixes
...
- Box parsers were broken when involved in left recursion detection
- ebnf no longer implicitly ignores white space between terminates/non-terminals
- ebnf now handles \t and \n in grammars so productions to detect white space work
- reset-delegates is now reset-pegs
2008-04-02 12:59:12 +13:00
Chris Double
122fd50d4a
Throw error when ebnf uses a non-existant non-terminal
2008-04-01 14:49:20 +13:00
Eduardo Cavazos
4f07aefc97
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
core/classes/tuple/tuple.factor
2008-03-31 19:42:21 -06:00
Eduardo Cavazos
aa40350aa7
replace add* and add with prefix and suffix
2008-03-31 18:18:05 -06:00
Chris Double
72bfd57f30
Make ebnf forgiving of whitespace at end of expression
2008-04-01 11:28:14 +13:00
Chris Double
a41f8ef733
Mention how to fail from action in pegs
2008-03-31 17:26:42 +13:00
Chris Double
f66774e875
Add tests for semantic and add syntax for it to ebnf
...
Syntax is ?[ ...]?
For example:
[EBNF num=. ?[ number? ]? list=list:x num:y => [[ drop x y + ]] | num EBNF] { 1 2 3 4 5 6 } swap call .
2008-03-31 16:50:05 +13:00
Chris Double
c45eba6898
Add semantic parser
2008-03-31 16:34:59 +13:00
Chris Double
8a800361df
Merge commit 'origin/master'
2008-03-31 15:01:22 +13:00
Chris Double
729ac1d6dc
Some ebnf tweaks and tests to do with variables
2008-03-31 14:59:22 +13:00
Chris Double
ee2194d1dc
Allow variable names on elements
2008-03-31 14:03:16 +13:00
Chris Double
55a69392fa
First cut at variables in ebnf
2008-03-31 13:52:42 +13:00
Chris Double
5989680a7b
Ensure box parsers are never cached
2008-03-31 00:53:33 +13:00
Chris Double
bb8198d3d0
Declare stack effects for compiled parsers
2008-03-30 23:24:02 +13:00
Chris Double
78633e03a0
Allow var names in ebnf but ignore them for now
2008-03-30 19:01:47 +13:00
Slava Pestov
f9779f5c38
Fix conflict
2008-03-29 23:48:01 -05:00
Chris Double
a23e0ce15c
Fix hashcode* on parsers
2008-03-30 17:35:47 +13:00
Chris Double
d002e02948
Use left recursive grammar in peg.expr
2008-03-30 17:23:11 +13:00
Chris Double
af9e27823a
Add => action rule for an entire sequence
2008-03-30 17:17:31 +13:00
Slava Pestov
c22af5c7a6
Rename 2apply to bi@
2008-03-29 20:36:58 -05:00
Chris Double
691d26068d
Refactor peg compiler cache
...
Instead of a cache stored in a global variable, the compiled parser is stored in a slot in the parser delegate.
2008-03-30 14:00:45 +13:00
Slava Pestov
2aafe074b2
Merge branch 'master' of git://double.co.nz/git/factor
2008-03-29 00:38:31 -05:00
Chris Double
ca4f775756
Fix PEG:
2008-03-29 18:33:37 +13:00
Chris Double
8105e66aec
Add box parser to docs
2008-03-29 17:45:21 +13:00
Chris Double
86653e7a46
Don't use 'delay' parser in ebnf
2008-03-29 17:42:21 +13:00
Slava Pestov
2c3c66c6af
Update peg for words being moved
2008-03-28 23:37:52 -05:00
Chris Double
0db0d9cd44
Move towards having ebnf infer
2008-03-29 16:24:13 +13:00
Chris Double
5f37b4fc72
compiled pegs infer
2008-03-29 16:11:08 +13:00
Chris Double
7bf27a5eb2
EBNF test using Java Primary production
2008-03-29 03:41:40 +13:00
Chris Double
25eea7ea1b
Fix ebnf tests for left recursion
2008-03-29 02:51:49 +13:00
Chris Double
261539a86a
Unit test for left recursive grammar
2008-03-29 02:47:03 +13:00
Chris Double
dd979c8b3b
Indirect Left recursive grammars working
2008-03-29 02:45:21 +13:00
Chris Double
68cbdf76aa
Handle direct left recusion
2008-03-29 01:17:54 +13:00
Chris Double
010ce80076
Handle left recursion by failing again
2008-03-29 00:49:39 +13:00
Chris Double
cca4700e49
Fix ebnf for peg changes
2008-03-29 00:41:41 +13:00
Chris Double
4b353c7529
Rewrite peg internals
2008-03-29 00:37:40 +13:00
Chris Double
1d87e513f5
lr2 wip
2008-03-28 21:17:08 +13:00
Chris Double
d2190fd1ec
Direct left recurson working
2008-03-28 14:30:10 +13:00
Chris Double
749f10ba9f
Implement direct left recursion
...
As per VPRI Technical Report TR-2007-002 section 3.2
2008-03-28 14:30:10 +13:00
Chris Double
f596aa2d71
Handle compilation of circular parsers
2008-03-28 14:26:05 +13:00
Chris Double
f96a251f8a
Refactor pegs to remove MEMO: and use unique id's
2008-03-28 12:35:47 +13:00
Chris Double
89c7698738
Fix MEMO problem with seq* and choice*
2008-03-28 11:30:46 +13:00