]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing xmode use lines; adding fake reluctant ?*+ to make XMode work (they're actuall...
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Sun, 8 Mar 2009 23:50:41 +0000 (18:50 -0500)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Sun, 8 Mar 2009 23:50:41 +0000 (18:50 -0500)
basis/regexp/parser/parser.factor
basis/xmode/marker/marker.factor
basis/xmode/rules/rules.factor

index 1c001cdc572fc11281b184a33af5fdc7048e0fb9..adbf0c53d33f475c6537cc95bbdab89c8ce4379d 100644 (file)
@@ -158,6 +158,9 @@ Times = "," Number:n "}" => [[ 0 n <from-to> ]]
       | Number:n "," Number:m "}" => [[ n m <from-to> ]]
 
 Repeated = Element:e "{" Times:t => [[ e t <times> ]]
+         | Element:e "??" => [[ e <maybe> ]]
+         | Element:e "*?" => [[ e <star> ]]
+         | Element:e "+?" => [[ e <plus> ]]
          | Element:e "?" => [[ e <maybe> ]]
          | Element:e "*" => [[ e <star> ]]
          | Element:e "+" => [[ e <plus> ]]
index e106af79526eb2209de8a46fe9cbeb419df22c04..de1f4254ea510669202c8c7fb47cebfaa8e33b83 100755 (executable)
@@ -4,9 +4,8 @@ IN: xmode.marker
 USING: kernel namespaces make xmode.rules xmode.tokens
 xmode.marker.state xmode.marker.context xmode.utilities
 xmode.catalog sequences math assocs combinators strings
-regexp splitting ascii regexp.backend unicode.case
+regexp splitting ascii unicode.case regexp.matchers
 ascii combinators.short-circuit accessors ;
-! regexp.backend is for the regexp class
 
 ! Next two words copied from parser-combinators
 ! Just like head?, but they optionally ignore case
index 99364fe7cd605808e74a0815b10149c2870db86e..51f216fa44bd32e82bdf542999c885d0d77ec2e0 100644 (file)
@@ -1,6 +1,8 @@
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
 USING: accessors xmode.tokens xmode.keyword-map kernel
 sequences vectors assocs strings memoize unicode.case
-regexp regexp.backend ; ! regexp.backend has the regexp class
+regexp ;
 IN: xmode.rules
 
 TUPLE: string-matcher string ignore-case? ;