Skip to content

Commit

Permalink
Applied patch from Pascal J. Bourguignon <pjb@informatimago.com>
Browse files Browse the repository at this point in the history
  • Loading branch information
John Williams authored and John Williams committed Aug 5, 2010
1 parent fb9241d commit cf46006
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion defpackage.lisp
Expand Up @@ -18,7 +18,7 @@
#:resolvable #:backlinkable #:root #:titular #:predecorative
#:prebibliographic #:bibliographic #:decorative #:body #:general
#:sequential #:abmonition #:special #:invisible #:part
#:referential #:targetable #: #:title #:subtitle #:rubric
#:referential #:targetable #:title #:subtitle #:rubric
#:docinfo #:author #:authors #:organization #:address #:contact
#:version #:revision #:status #:date #:copyright #:decoration
#:header #:footer #:structural #:section #:topic #:sidebar
Expand Down
2 changes: 1 addition & 1 deletion languages/translate.lisp
Expand Up @@ -17,7 +17,7 @@ containing an a-list mapping translated form to a cannonical form")

(eval-when(:compile-toplevel)
(setq *language-directory*
(merge-pathnames (make-pathname :name :wild :type :unspecific)
(merge-pathnames (make-pathname :name :wild #-clisp :type #-clisp :unspecific)
*compile-file-truename*)))
(defstruct translation
(translated (make-hash-table :test #'equalp) :type hash-table)
Expand Down
12 changes: 9 additions & 3 deletions parsers/rst.lisp
Expand Up @@ -166,7 +166,7 @@ content block and a callback to parse the content block")
runs, to parse nested document structures."))

(defmethod state-machine-run((state-machine nested-state-machine)
(input-lines simple-vector)
(input-lines vector)
&key
(input-offset 0)
node
Expand Down Expand Up @@ -303,6 +303,10 @@ back up the calling chain until the correct section level is reached."
(defun inline-text(text lineno)
(parse-inline rst-patterns text :line lineno ))



(eval-when (:compile-toplevel :load-toplevel :execute)

(defparameter +roman-numeral-map+
'(("M" . 1000) ("CM" . 900) ("D" . 500) ("CD" . 400)
("C" . 100) ("XC" . 90) ("L" . 50) ("XL" . 40)
Expand Down Expand Up @@ -393,7 +397,7 @@ ordinal and the type value to be given in html")
(anonymous "^__( +|$)")
(line line)
(text ,#'(lambda(s &key (start 0) (end (length s)))
(values start end)) 'body))))
(values start end)) 'body)))))

(defclass body(rst-state)
((initial-transitions :allocation :class :initform +rst-transitions+))
Expand Down Expand Up @@ -1479,10 +1483,12 @@ state should take over."))
than* bullet list items, so it inherits the transition list created in
`Body`."))


(eval-when (:compile-toplevel :load-toplevel :execute)
(defun select-rst-transitions(&rest rest)
(mapcan #'(lambda(trans) (when (member (transition-name trans) rest)
(list trans)))
+rst-transitions+))
+rst-transitions+)))

(defun invalid-specialised-input(state match)
"Not a compound element member. Abort this state machine."
Expand Down
3 changes: 2 additions & 1 deletion parsers/state-machine.lisp
Expand Up @@ -373,10 +373,11 @@ document structures.")
(:documentation "Handle an indented text block. Extend or override
in subclasses. Recursively run the state machine for indented blocks"))

(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter +wsp-transitions+
'((blank "^\\s*$" )
(indent "^ +" ))
"Transitons for a wsp state machine")
"Transitons for a wsp state machine"))

(defclass wsp-state(state)
((initial-transitions :allocation :class :initform +wsp-transitions+))
Expand Down

0 comments on commit cf46006

Please sign in to comment.