factor/basis/compiler/tests/peg-regression-2.factor

16 lines
263 B
Factor
Raw Normal View History

2009-04-26 01:51:47 -04:00
IN: compiler.tests.peg-regression-2
USING: peg.ebnf strings tools.test ;
GENERIC: <times> ( times -- term' )
M: string <times> ;
EBNF: parse-regexp
Times = .* => [[ "foo" ]]
Regexp = Times:t => [[ t <times> ]]
;EBNF
2009-04-26 01:51:47 -04:00
[ "foo" ] [ "a" parse-regexp ] unit-test