Common Lisp Package: DOCBROWSER-TEMPLATE

README:

FUNCTION

Public

ESCAPE-STRING-ALL (STRING S)

Escapes all characters in STRING which aren't in the 7-bit ASCII character set.

ESCAPE-STRING-MINIMAL (STRING S)

Escape only #<, #>, and #& in STRING.

ESCAPE-STRING-MINIMAL-PLUS-QUOTES (STRING S)

Like ESCAPE-STRING-MINIMAL but also escapes quotes.

EXEC-TEMPLATE-FILE (FILE DATA STREAM &KEY BINARY (ENCODING UTF-8))

Load and compile FILE and put it into the template cache if it was not already in the cache. Then run the template using DATA and write the output to STREAM.

PARSE-TEMPLATE (STREAM &KEY BINARY (ENCODING UTF-8) INCLUDE-ROOT-DIR)

Parses and compiles the template defition given as STREAM. If BINARY is NIL, the generated template will output its data as strings (using PRINC), otherwise the output will be converted to binary using the encoding specified by ENCODING. The binary output is the preferred method as that will allow constant strings in the template to be encoded during parsing instead of at runtime. INCLUDE-ROOT-DIR is used to specify a base directory from where the "include" command will search for files. The return value is a function that takes two arguments, DATA and OUTPUT. DATA is the data that will be used by the template, and OUTPUT is the output stream to which the result should be written.

Private

Undocumented

DEBUG-LEXER (STRING)

DEBUG-PARSER (S &OPTIONAL BINARY)

ESCAPE-STRING (STRING S &KEY (TEST *ESCAPE-CHAR-P*))

ESCAPE-STRING-SLASHES (STRING)

EXEC-TEMPLATE-TO-STRING (FILE DATA)

INNER-PARSE-STREAM-TO-FORM (STREAM)

MAKE-LEXER-ACTIONS-LIST (DEFINITIONS)

MAKE-STREAM-TEMPLATE-LEXER (INPUT-STREAM)

PARSE-STREAM-TO-FORM (STREAM BINARY ENCODING INCLUDE-ROOT-DIR)

PARSE-TEMPLATE-FILE (PATHNAME &KEY BINARY (ENCODING UTF-8))

SIGNAL-TEMPLATE-ERROR (MESSAGE &OPTIONAL COLUMN CONTENT CONTENT-INDEX)

STRING->SYMBOL (SYMBOL-NAME &OPTIONAL (PACKAGE *PACKAGE*))

MACRO

Private

Undocumented

MAKE-LEXER-ACTIONS (&REST DEFINITIONS)

SHORT-DEFINE-PARSER (NAME INITIALS &BODY DEFINITIONS)

GENERIC-FUNCTION

Public

Undocumented

TEMPLATE-ERROR-COLUMN (CONDITION)

TEMPLATE-ERROR-CONTENT (CONDITION)

TEMPLATE-ERROR-CONTENT-INDEX (CONDITION)

TEMPLATE-ERROR-LINE (CONDITION)

TEMPLATE-ERROR-MESSAGE (CONDITION)

SLOT-ACCESSOR

Private

Undocumented

PARSED-FILE-LAST-TIME-CHECK (OBJECT)

SETFPARSED-FILE-LAST-TIME-CHECK (NEW-VALUE OBJECT)

PARSED-FILE-MODIFIED-DATE (OBJECT)

PARSED-FILE-PATHSPEC (OBJECT)

PARSED-FILE-TEMPLATE (OBJECT)

VARIABLE

Public

*BEGIN-CODE*

The string that opens a script segment. The end of a script segment is specified by *END-CODE*.

*END-CODE*

The string that ends a script segment.

Undocumented

*CURRENT-CONTENT*

Private

*CURRENT-LINE-NUM*

Dynamic variable used to track the current line number during parsing

*CURRENT-STREAM*

The stream that the template output is written to.

Undocumented

*ACTIONS*

*CACHED-TEMPLATES*

*CACHED-TEMPLATES-LOCK*

*COMPILE-DECL*

*ESCAPE-CHAR-P*

*INCLUDE-ROOT-DIR*

*OUTPUT-BINARY*

*OUTPUT-ENCODING*

*SUBTEMPLATE-LIST*

*TEMPLATE-PARSER*

CLASS

Private

PARSED-FILE

Cached parse result

CONDITION

Public

TEMPLATE-ERROR

Error that is raised if there is an error parsing a template