[climacs-devel] cl-automton's automaton objects may print incorrect state numbers

Aleksandar Bakic a_bakic at yahoo.com
Thu Sep 1 19:38:53 UTC 2005


Hi,

If I remember correctly, this state number "feature" is intentional. Please
take a look at variables *print-renumerate-states* (setting it to true will fix
the first problem) and *do-not-escape* (setting it to nil will solve the other
problem). The (indirect) reason for introducing the first variable is
automaton-equal, which disregards state numbers. Since my connection to sbcl
via slime frequently breaks when I work with Unicode characters, I set
*do-not-escape* to nil to get around the problem.

Regards,
Alex

--- Derek Peschel <dpeschel at eskimo.com> wrote:

> Do other people see this?  With SBCL 0.9.0:
> 
> * (regexp-automaton (string-regexp "abc"))
> initial state: 0
> state 0 [reject]: a -> 0
> state 0 [reject]: b -> 0
> state 0 [reject]: c -> 0
> state 0 [accept]: 
> 
> All the state numbers are 0 which makes no sense.  The automaton itself
> has the correct structure -- it succeeds with (run ... "abc") and fails
> with other strings.  So I suspect the print-object method.
> 
> Changing the "b" to a dot corrects the printout of state numbers:
> 
> * (regexp-automaton (string-regexp "a.c"))
> 
> initial state: 0
> state 0 [reject]: a -> 1
> state 1 [reject]: #| range from 0 to +max-char-code+ |# -> 2
> state 2 [reject]: c -> 3
> state 3 [accept]: 
> 
> No, LISP didn't print the comment.  The real printout contains UTF-8
> for character 0, dash, character 10FFFF.
> 
> -- Derek
> _______________________________________________
> climacs-devel mailing list
> climacs-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/climacs-devel
> 



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



More information about the climacs-devel mailing list