Use the builtin 'integer'
parent
3fc47bae3a
commit
8d84a81141
|
@ -1,6 +1,6 @@
|
||||||
USING: combinators kernel lazy-lists math math.parser
|
USING: combinators kernel lazy-lists math math.parser
|
||||||
namespaces parser parser-combinators promises sequences
|
namespaces parser parser-combinators parser-combinators.simple
|
||||||
strings ;
|
promises sequences strings ;
|
||||||
USING: continuations io prettyprint ;
|
USING: continuations io prettyprint ;
|
||||||
IN: regexp
|
IN: regexp
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@ IN: regexp
|
||||||
|
|
||||||
: 'string' 'char' <+> [ >string token ] <@ ;
|
: 'string' 'char' <+> [ >string token ] <@ ;
|
||||||
|
|
||||||
: 'integer' [ digit? ] satisfy <+> [ string>number ] <@ ;
|
|
||||||
|
|
||||||
: exactly-n ( parser n -- parser' )
|
: exactly-n ( parser n -- parser' )
|
||||||
swap <repetition> and-parser construct-boa ;
|
swap <repetition> and-parser construct-boa ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue