Change <EBNF .. EBNF> to [EBNF .. EBNF]

db4
Chris Double 2008-03-20 17:13:27 +13:00
parent e7980ebc61
commit 44954753bd
2 changed files with 10 additions and 10 deletions

View File

@ -109,37 +109,37 @@ IN: peg.ebnf.tests
] unit-test
{ V{ "a" "b" } } [
"ab" <EBNF foo='a' 'b' EBNF> call parse-result-ast
"ab" [EBNF foo='a' 'b' EBNF] call parse-result-ast
] unit-test
{ V{ 1 "b" } } [
"ab" <EBNF foo=('a')[[ drop 1 ]] 'b' EBNF> call parse-result-ast
"ab" [EBNF foo=('a')[[ drop 1 ]] 'b' EBNF] call parse-result-ast
] unit-test
{ V{ 1 2 } } [
"ab" <EBNF foo=('a') [[ drop 1 ]] ('b') [[ drop 2 ]] EBNF> call parse-result-ast
"ab" [EBNF foo=('a') [[ drop 1 ]] ('b') [[ drop 2 ]] EBNF] call parse-result-ast
] unit-test
{ CHAR: A } [
"A" <EBNF foo=[A-Z] EBNF> call parse-result-ast
"A" [EBNF foo=[A-Z] EBNF] call parse-result-ast
] unit-test
{ CHAR: Z } [
"Z" <EBNF foo=[A-Z] EBNF> call parse-result-ast
"Z" [EBNF foo=[A-Z] EBNF] call parse-result-ast
] unit-test
{ f } [
"0" <EBNF foo=[A-Z] EBNF> call
"0" [EBNF foo=[A-Z] EBNF] call
] unit-test
{ CHAR: 0 } [
"0" <EBNF foo=[^A-Z] EBNF> call parse-result-ast
"0" [EBNF foo=[^A-Z] EBNF] call parse-result-ast
] unit-test
{ f } [
"A" <EBNF foo=[^A-Z] EBNF> call
"A" [EBNF foo=[^A-Z] EBNF] call
] unit-test
{ f } [
"Z" <EBNF foo=[^A-Z] EBNF> call
"Z" [EBNF foo=[^A-Z] EBNF] call
] unit-test

View File

@ -264,7 +264,7 @@ M: ebnf-non-terminal (transform) ( ast -- parser )
'ebnf' parse check-parse-result
parse-result-ast transform dup main swap at compile ;
: <EBNF "EBNF>" parse-multiline-string ebnf>quot nip parsed ; parsing
: [EBNF "EBNF]" parse-multiline-string ebnf>quot nip parsed ; parsing
: EBNF:
CREATE-WORD dup