]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/tests/peg-regression-2.factor
7929d9e6f6c13b6f211fad969f604d419d725e34
[factor.git] / basis / compiler / tests / peg-regression-2.factor
1 IN: compiler.tests.peg-regression-2
2 USING: peg.ebnf strings tools.test ;
3
4 GENERIC: <times> ( times -- term' )
5 M: string <times> ;
6
7 EBNF: parse-regexp
8
9 Times = .* => [[ "foo" ]]
10
11 Regexp = Times:t => [[ t <times> ]]
12
13 ;EBNF
14
15 [ "foo" ] [ "a" parse-regexp ] unit-test