mrossini-ethz / parseq

Parseq is a library for Common Lisp used for parsing sequences such as strings and lists using parsing expression grammars.
GNU General Public License v2.0
28 stars 3 forks source link

Unicode support #1

Open veer66 opened 2 years ago

veer66 commented 2 years ago

I cannot match unicode characters.

I wrote this code:

(defrule stream () (char "ก-ฮ"))
(trace-rule 'stream :recursive t)
(parseq 'stream "ก" :parse-error t)

, but it didn't work.

Execution of a form compiled with errors.
Form:
  (PARSEQ::WITH-EXPANSION ((#1=#:RESULT-596 #2=#:SUCCESS-597) #:SEQUENCE-593
                         (CHAR "ก-ฮ") #3=#:POS-594 NIL)
  (IF #2#
      (MULTIPLE-VALUE-BIND (#1# #2#)
          (VALUES #1# T)
        (IF #2#
            (VALUES #1# T #3#)
            (VALUES NIL NIL #4=#:OLDPOS-595)))
      (VALUES NIL NIL #4#)))
Compile-time error:
  during macroexpansion of
(PARSEQ::WITH-EXPANSION (# #:SEQUENCE-593 # ...)
  (IF #:SUCCESS-597
      #
      ...)).
Use *BREAK-ON-SIGNALS* to intercept.

 The value
   NIL
 is not of type
   REAL
   [Condition of type SB-INT:COMPILED-PROGRAM-ERROR]