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