aboutsummaryrefslogtreecommitdiff
path: root/src/guile/skribilo/resolve.scm
AgeCommit message (Collapse)Author
2020-08-01Write '#:use-module', '#:export', etc. instead of ':use-module', etc.Ludovic Courtès
Changes made by running: for i in $(git ls-tree -r HEAD --name-only) ; do sed -i $i -e's/:use-module/#:use-module/g ; s/:autoload/#:autoload/g ; s/:export/#:export/g' ; done
2018-03-30Do not mutate lists that may be literal.Ludovic Courtès
On Guile 2.2 this would lead to a segmentation fault or a 'set-car!' error ("expecting mutable pair") on 2.2.3+. * src/guile/skribilo/engine.scm (engine-custom-set!): Do not mutate CUSTOMS. * src/guile/skribilo/resolve.scm (do-resolve! <pair>): Do not mutate AST. (do-resolve! <node>): Do not mutate OPTIONS. (do-resolve! <document>): Do not mutate the list of customs.
2012-05-17Switch to GPLv3+.Ludovic Courtès
2009-05-26Make sure to bind nodes that are in the body of non-markup nodes.Ludovic Courtès
* src/guile/skribilo/ast.scm (document-bind-nodes!): Traverse other nodes as well, such as processors. * src/guile/skribilo/resolve.scm (do-resolve!<unresolved>>): Likewise. * tests/resolve.test ("resolved nested document bindings"): New test.
2009-05-26Fix node binding in sub-documents returned from unresolved nodes.Ludovic Courtès
* src/guile/skribilo/resolve.scm (do-resolve!<unresolved>): Bind sub-nodes of RES in the innermost document rather than in the root document. * tests/resolve.test ("resolved nested document bindings"): New test.
2009-03-24Add `(skribilo-module-syntax)'.Ludovic Courtès
* src/guile/skribilo/utils/syntax.scm (skribilo-module-syntax): New macro. * src/guile/*/*.scm: Use `(skribilo-module-syntax)' instead of `(fluid-set! current-reader %skribilo-module-reader)'. The goal is to be more compilation-friendly.
2008-02-03Bind the nodes returned by <unresolved> nodes.Ludovic Courtès
* src/guile/skribilo/resolve.scm (do-resolve!<unresolved>): Use `ast-fold' to bind all nodes in RES and assign them the proper location.
2008-01-30Fix option resolution for <node> and <container>.Ludovic Courtès
* src/guile/skribilo/resolve.scm (do-resolve<node>): Don't resolve OPTIONS only when PARENT is `unspecified', otherwise nodes returned by `do-resolve<unresolved>' would always have their options unresolved. (do-resolve<container>): Likewise. In addition, make proper use of `*unresolved*' and set the `resolved?' slot accordingly. (do-resolve<unresolved>): Don't set the `parent' slot of RES at this point since we have to go for another resolution run anyway.
2008-01-29Really fix resolution of <unresolved> nodes.Ludovic Courtès
* src/guile/skribilo/resolve.scm (do-resolve!<unresolved>): Assign a valid parent to the AST returned by PROC.
2008-01-28Properly handle non-list pairs in `resolve' and `verify'.Ludovic Courtès
* src/guile/skribilo/resolve.scm (do-resolve!<pair>): Return N* if `pair?'. * src/guile/skribilo/verify.scm (verify<pair>): Add special treatment if OBJ is not a list.
2007-11-14Update the body of commands when resolving.Ludovic Courtès
* src/guile/skribilo/resolve.scm (do-resolve!<command>): Update the body of N with the resolved body.
2007-06-06Cleaned up the core modules.Ludovic Court`es
git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-65
2007-05-22Resolve <command>s too.Ludovic Court`es
* src/guile/skribilo/resolve.scm (do-resolve!<command>): New method. Allows arguments of a command (the command body) to be properly resolved. git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-53
2006-09-03Added error conditions in `ast.scm'.Ludovic Courtes
* src/guile/skribilo/ast.scm: Use `srfi-3[45]' and `condition' but not `lib'. (&ast-error): New. (&ast-orphan-error): New. (&ast-cycle-error): New. (&markup-unknown-option-error): New. (&markup-already-bound-error): New. (handle-ast-error): New. (markup-option): Use `raise' instead of `skribe-(type-)?error'. (markup-option-set!): Likewise. (markup-option-add!): Likewise. (markup-parent): Likewise. (document-bind-node!): Likewise. (find1-down): Likewise. * src/guile/skribilo/resolve.scm (&resolution-error): Removed. (&resolution-orphan-error): Removed. Moved as `&ast-orphan-error' in `ast.scm'. Updated users. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-58
2006-09-03Implemented per-document node identifiers.Ludovic Courtes
* src/guile/skribilo/ast.scm: Autoload `srfi-1' on `fold'. (*node-table*): Removed. (bind-markup!): Removed. (initialize<markup>): Removed. (find-markups): Removed. (write<markup>): Commented out debugging `format'. (<document>)[node-table]: New slot. [nodes-bound?]: New slot. (document-lookup-node): New. (document-bind-node!): New. (document-bind-nodes!): New. (ast-fold): New. (find-markup-ident): Removed. * src/guile/skribilo/output.scm (*document-being-output*): New. (out<document>): New. * src/guile/skribilo/resolve.scm (*document-being-resolved*): New. (resolve!): Invoke `document-bind-nodes!' before resolving the document. (do-resolve!<document>): Parameterize `*document-being-resolved*'. (resolve-ident): Use `document-lookup-node' instead of `find-markups'. * src/guile/skribilo/utils/compat.scm (bind-markup!): New. (find-markups): New. (find-markup-ident): New. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-57
2006-07-24Updated the FSF address.Ludovic Court`es
From "59 Temple Place - Suite 330, Boston, MA 02111-1307" to "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301". Magic command line: find . -type f -print0 | xargs -0 sed -i -e 's/51 Franklin Street, Fifth Floor/51 Franklin Street, Fifth Floor/;s/02110-1301/02110-1301/; git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-29
2006-07-11Use SRFI-35 error conditions in `resolve.scm' rather than the `error' ↵Ludovic Court`es
procedures. * src/guile/skribilo/resolve.scm: Don't use `(skribilo runtime)' (unneeded). Use `conditions' and SRFI-3[45]. (&resolution-error): New. (&resolution-orphan-error): New. (handle-resolution-error): New. Register it. (do-resolve!): Raise an invalid-arg condition instead of invoking `error'. (resolve-counter): Raise a `&resolution-orphan-error' condition instead of invoking `skribe-error'. (resolve-ident): Raise an invalid-arg condition rather than invoking `skribe-type-error'. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-5
2006-02-28Slightly optimized the resolution process (added `ast-resolved?').Ludovic Courtes
* src/guile/skribilo/ast.scm (<ast>): Added a `resolved?' slot, with accessor `ast-resolved?'. * src/guile/skribilo/resolve.scm (do-resolve!)[<node>]: Check whether `ast-resolved?' is true and set it once it's resolved. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-37
2006-01-18Various fixes: HTML engine, resolution, compatibility.Ludovic Court`es
* src/guile/skribilo/engine/html.scm: Load `(skribilo parameters)'. Use `*destination-file*' instead of `*skribe-dest*'. * src/guile/skribilo/parameters.scm (*ref-base*): Documented it. * src/guile/skribilo/prog.scm (extract-mark): Expect lists, not just pairs. (split-line): Likewise. * src/guile/skribilo/resolve.scm (do-resolve!)[<pair>]: Differentiate items matching `list?' and those just matching `pair?'. * src/guile/skribilo/utils/compat.scm: Load `(srfi srfi-13)'. (%skribe-known-files): Augmented. Fixed `web-book.skr'. (skribe-load): Produce output upon verbosity. (file-prefix): Fixed. (file-suffix): Fixed. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-30
2006-01-11Made compatible with the new `current-reader' as a fluid.Ludovic Court`es
* *.scm: Use `fluid-set! current-reader %skribilo-module-reader' instead of `set-current-reader'. * src/guile/skribilo/utils/syntax.scm: Use `(system reader compat)'. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-24
2005-12-03Fixed the resolution mechanism and converted it to SRFI-39.Ludovic Courtes
* src/guile/skribilo/output.scm: Cosmetic changes. * src/guile/skribilo/resolve.scm: Use SRFI-39. (*unresolved*): Became an SRFI-39 parameter object. (resolve!): Use `parameterize' over `*unresolved*'. (do-resolve!): For `<container>', resolve the body of NODE even if PARENT is not unspecified. A similar fix had gone into the Bigloo implementation of Skribe (the patch was never actually integrated as it seems). This makes it possible to use `numref'. For `<unresolved>', to not invoke `do-resolve!' on the result of PROC's invocation. Similarly, this had gone into Skribe. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-15
2005-11-28More `%skribilo-module-reader' fixes.Ludovic Court`es
* src/guile/skribilo.scm: Removed the executable bit. * configure.ac: Produce `src/guile/skribilo/utils/Makefile'. * src/guile/skribilo.scm: Call `set-current-reader' after the `use-modules' clause. (process-option-specs): Use `:kw'-style keywords. (*skribilo-output-port*): New. (doskribe): Use the above fluid. (main): Honor the `-o' option. * src/guile/skribilo/debug.scm: Use `(skribilo utils syntax)' and `%skribilo-module-reader'. * src/guile/skribilo/module.scm: Likewise. * src/guile/skribilo/output.scm: Likewise. * src/guile/skribilo/resolve.scm: Likewise. * src/guile/skribilo/verify.scm: Likewise. * src/guile/skribilo/parameters.scm (make-expect): New. (define-number-parameter): New. (define-list-parameter): New. * src/guile/skribilo/utils/Makefile.am (guilemoduledir): Fixed. * src/guile/skribilo/evaluator.scm (%evaluate): Commented out debugging statement. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-14
2005-11-25Overhaul: emphasized logical separation of the modules.Ludovic Court`es
* src/guile/skribilo/types.scm: Removed. Moved the class and method definitions in the relevant files. * src/guile/skribilo/ast.scm: New. * src/guile/skribilo/location.scm: New. * src/guile/skribilo/parameters.scm: Same as part of the former `vars.scm' except that it uses fluids instead of globals. * src/guile/skribilo/vars.scm: Renamed to `compat.scm'. * doc/Makefile: Removed (generated by `configure'). git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-11
2005-07-02Cosmetic changes.Ludovic Courtes
* src/guile/skribilo/resolve.scm: Minor cosmetic changes. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-6
2005-07-02Started relying on the per-module reader; first doc produced ever!Ludovic Courtes
First document compiled by Skribilo to HTML! * src/guile/skribilo/module.scm (define-skribe-module): Use the `#:reader' option of `define-module' (not yet integrated in Guile 1.7). Plus lots of other things... git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-3
2005-07-01Lots of changes, again.Ludovic Courtes
Lots of changes, notably the following: * skr/*.skr: Moved engines to `src/guile/skribilo/engine'. * src/guile/skribilo/engine.scm (lookup-engine): Rewritten. Don't use the auto-load alist. * src/guile/skribilo/evaluator.scm: New name of the `eval' module. `eval' couldn't be used as the module base-name because of Guile's recursive module name space. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-2
2005-07-01Lots of changes.Ludovic Courtes
Too many changes to describe here, among which, moving the `(skribe)' module namespace to `(skribilo)'. This is work in progress. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-1