The cl-html-parse Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-html-parse Reference Manual

This is the cl-html-parse Reference Manual, version 1.0, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:06:35 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Introduction

CL-HTML-PARSE is a slash and burn port of Franz's phtml HTML parser.

I made a few small changes to the source mainly involving the call to excl:intern* in collect-tag. In particular, all tags are now string-upcased before being interned. There is probably a better solution but I'm not very Allegro savvy.

Any questions or concerns should be directed to me, Gary Warren King at gwking@metabang.com.

If the feature :use-acl-compat is set, then cl-html-parse will depend on it; otherwise, it will use its own package and if* definitions.

Example #1

(html-parse:parse-html
 "<html>
<head><title>Parsing HTML is Phun</title></head>
<body>
<h1>Why is it phun?</h1>
<p>Parsing HTML is phun because angle brackets are better than parentheses.</p>
</body>
</html>")

==>

((:HTML (:HEAD (:TITLE "Parsing HTML is Phun"))
  (:BODY (:H1 "Why is it phun?")
   (:P
    "Parsing HTML is phun because angle brackets are better than parentheses."))))

Example #2

(html-parse:parse-html <file>)

==>

((:HTML ...))

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-html-parse

Maintainer

Gary Warren King <gwking@metabang.com>

Author

Gary Warren King <gwking@metabang.com>

License

MIT Style license for the packaging, AllegroServe license for the code.

Description

HTML Parser

Long Description

Franz’s HTML Parser packaged up separately for ASDF.

Version

1.0

Source

cl-html-parse.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-html-parse/dev

Parent

cl-html-parse (system)

Location

dev/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Next: , Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-html-parse.asd

Location

cl-html-parse.asd

Systems

cl-html-parse (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-html-parse/dev/if-star.lisp

Parent

dev (module)

Location

dev/if-star.lisp

Packages

if-star-for-cl-html-parse

Exported Definitions

if* (macro)

Internal Definitions

if*-keyword-list (special variable)


Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-html-parse/dev/cl-html-parse.lisp

Dependency

if-star.lisp (file)

Parent

dev (module)

Location

dev/cl-html-parse.lisp

Packages

net.html.parser

Exported Definitions
Internal Definitions

Previous: , Up: Files   [Contents][Index]

4.2 Other


Next: , Previous: , Up: Other files   [Contents][Index]

4.2.1 cl-html-parse/COPYING

Parent

cl-html-parse (system)

Location

COPYING


Next: , Previous: , Up: Other files   [Contents][Index]

4.2.2 cl-html-parse/dev/README

Parent

dev (module)

Location

dev/README


Previous: , Up: Other files   [Contents][Index]

4.2.3 cl-html-parse/dev/examples/contacts.html

Parent

dev (module)

Location

dev/examples/contacts.html


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 if-star-for-cl-html-parse

Source

if-star.lisp (file)

Use List

common-lisp

Used By List

net.html.parser

Exported Definitions

if* (macro)

Internal Definitions

if*-keyword-list (special variable)


Previous: , Up: Packages   [Contents][Index]

5.2 net.html.parser

Source

cl-html-parse.lisp (file)

Nicknames
Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Macros

Macro: if* &rest ARGS
Package

if-star-for-cl-html-parse

Source

if-star.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: phtml-internal P READ-SEQUENCE-FUNC CALLBACK-ONLY CALLBACKS COLLECT-ROGUE-TAGS NO-BODY-TAGS PARSE-ENTITIES
Package

net.html.parser

Source

cl-html-parse.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Generic functions

Generic Function: parse-html P &key CALLBACK-ONLY CALLBACKS COLLECT-ROGUE-TAGS NO-BODY-TAGS PARSE-ENTITIES
Package

net.html.parser

Methods
Method: parse-html (STR string) &key CALLBACK-ONLY CALLBACKS COLLECT-ROGUE-TAGS NO-BODY-TAGS PARSE-ENTITIES
Source

cl-html-parse.lisp (file)

Method: parse-html FILE &key CALLBACK-ONLY CALLBACKS COLLECT-ROGUE-TAGS NO-BODY-TAGS PARSE-ENTITIES
Source

cl-html-parse.lisp (file)

Method: parse-html (P stream) &key CALLBACK-ONLY CALLBACKS COLLECT-ROGUE-TAGS NO-BODY-TAGS PARSE-ENTITIES
Source

cl-html-parse.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Constants

Constant: char-attribnamechar
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: char-attribundelimattribvalue
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: char-spacechar
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: char-tagcharacter
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-attribname
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-attribstartvalue
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-attribvaluedelim
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-attribvaluenodelim
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-findattribname
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-findvalue
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-pcdata
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-rawdata
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-readcomment
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-readcomment-one
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-readcomment-two
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-readtag
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Constant: state-readtagfirst
Package

net.html.parser

Source

cl-html-parse.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Special variables

Special Variable: *ch-format*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *characteristics*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *collectors*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *html-entity-to-code*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *in-line*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *known-tags*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *kwd-package*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: *tokenbufs*
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Special Variable: if*-keyword-list
Package

if-star-for-cl-html-parse

Source

if-star.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Macros

Macro: tag-auto-close TAG
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Macro: tag-auto-close-stop TAG
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Macro: tag-callback TAG
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Macro: tag-name EXPR
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Macro: tag-no-end TAG
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Macro: tag-no-pcdata TAG
Package

net.html.parser

Source

cl-html-parse.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Functions

Function: char-characteristic CHAR BIT
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: coll-has-comment COLL
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: collector-data INSTANCE
Function: (setf collector-data) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: collector-max INSTANCE
Function: (setf collector-max) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: collector-next INSTANCE
Function: (setf collector-next) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: collector-p OBJECT
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: compute-coll-string COLL
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: compute-tag COLL
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: copy-collector INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: copy-tokenbuf INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: current-case-mode ()
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: get-collector ()
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: get-tokenbuf ()
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: grow-and-add COLL CH
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: make-collector &key (NEXT NEXT) (MAX MAX) (DATA DATA)
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: make-tokenbuf &key (CUR CUR) (MAX MAX) (DATA DATA) (FIRST-PASS FIRST-PASS)
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: next-token STREAM IGNORE-STRINGS RAW-MODE-DELIMITER READ-SEQUENCE-FUNC TOKENBUF PARSE-ENTITIES
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: put-back-collector COL
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: put-back-tokenbuf BUF
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: to-preferred-case CH
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: tokenbuf-cur INSTANCE
Function: (setf tokenbuf-cur) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: tokenbuf-data INSTANCE
Function: (setf tokenbuf-data) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: tokenbuf-first-pass INSTANCE
Function: (setf tokenbuf-first-pass) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: tokenbuf-max INSTANCE
Function: (setf tokenbuf-max) VALUE INSTANCE
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Function: tokenbuf-p OBJECT
Package

net.html.parser

Source

cl-html-parse.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Structures

Structure: collector ()
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: next
Readers

collector-next (function)

Writers

(setf collector-next) (function)

Slot: max
Readers

collector-max (function)

Writers

(setf collector-max) (function)

Slot: data
Readers

collector-data (function)

Writers

(setf collector-data) (function)

Structure: tokenbuf ()
Package

net.html.parser

Source

cl-html-parse.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: cur
Readers

tokenbuf-cur (function)

Writers

(setf tokenbuf-cur) (function)

Slot: max
Readers

tokenbuf-max (function)

Writers

(setf tokenbuf-max) (function)

Slot: data
Readers

tokenbuf-data (function)

Writers

(setf tokenbuf-data) (function)

Slot: first-pass
Readers

tokenbuf-first-pass (function)

Writers

(setf tokenbuf-first-pass) (function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M   O  
Index Entry  Section

C
cl-html-parse.asd: The cl-html-parse<dot>asd file
cl-html-parse/COPYING: The cl-html-parse/copying file
cl-html-parse/dev: The cl-html-parse/dev module
cl-html-parse/dev/cl-html-parse.lisp: The cl-html-parse/dev/cl-html-parse<dot>lisp file
cl-html-parse/dev/examples/contacts.html: The cl-html-parse/dev/examples/contacts<dot>html file
cl-html-parse/dev/if-star.lisp: The cl-html-parse/dev/if-star<dot>lisp file
cl-html-parse/dev/README: The cl-html-parse/dev/readme file

F
File, Lisp, cl-html-parse.asd: The cl-html-parse<dot>asd file
File, Lisp, cl-html-parse/dev/cl-html-parse.lisp: The cl-html-parse/dev/cl-html-parse<dot>lisp file
File, Lisp, cl-html-parse/dev/if-star.lisp: The cl-html-parse/dev/if-star<dot>lisp file
File, other, cl-html-parse/COPYING: The cl-html-parse/copying file
File, other, cl-html-parse/dev/examples/contacts.html: The cl-html-parse/dev/examples/contacts<dot>html file
File, other, cl-html-parse/dev/README: The cl-html-parse/dev/readme file

L
Lisp File, cl-html-parse.asd: The cl-html-parse<dot>asd file
Lisp File, cl-html-parse/dev/cl-html-parse.lisp: The cl-html-parse/dev/cl-html-parse<dot>lisp file
Lisp File, cl-html-parse/dev/if-star.lisp: The cl-html-parse/dev/if-star<dot>lisp file

M
Module, cl-html-parse/dev: The cl-html-parse/dev module

O
Other File, cl-html-parse/COPYING: The cl-html-parse/copying file
Other File, cl-html-parse/dev/examples/contacts.html: The cl-html-parse/dev/examples/contacts<dot>html file
Other File, cl-html-parse/dev/README: The cl-html-parse/dev/readme file

Jump to:   C   F   L   M   O  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   F   G   I   M   N   P   T  
Index Entry  Section

(
(setf collector-data): Internal functions
(setf collector-max): Internal functions
(setf collector-next): Internal functions
(setf tokenbuf-cur): Internal functions
(setf tokenbuf-data): Internal functions
(setf tokenbuf-first-pass): Internal functions
(setf tokenbuf-max): Internal functions

C
char-characteristic: Internal functions
coll-has-comment: Internal functions
collector-data: Internal functions
collector-max: Internal functions
collector-next: Internal functions
collector-p: Internal functions
compute-coll-string: Internal functions
compute-tag: Internal functions
copy-collector: Internal functions
copy-tokenbuf: Internal functions
current-case-mode: Internal functions

F
Function, (setf collector-data): Internal functions
Function, (setf collector-max): Internal functions
Function, (setf collector-next): Internal functions
Function, (setf tokenbuf-cur): Internal functions
Function, (setf tokenbuf-data): Internal functions
Function, (setf tokenbuf-first-pass): Internal functions
Function, (setf tokenbuf-max): Internal functions
Function, char-characteristic: Internal functions
Function, coll-has-comment: Internal functions
Function, collector-data: Internal functions
Function, collector-max: Internal functions
Function, collector-next: Internal functions
Function, collector-p: Internal functions
Function, compute-coll-string: Internal functions
Function, compute-tag: Internal functions
Function, copy-collector: Internal functions
Function, copy-tokenbuf: Internal functions
Function, current-case-mode: Internal functions
Function, get-collector: Internal functions
Function, get-tokenbuf: Internal functions
Function, grow-and-add: Internal functions
Function, make-collector: Internal functions
Function, make-tokenbuf: Internal functions
Function, next-token: Internal functions
Function, phtml-internal: Exported functions
Function, put-back-collector: Internal functions
Function, put-back-tokenbuf: Internal functions
Function, to-preferred-case: Internal functions
Function, tokenbuf-cur: Internal functions
Function, tokenbuf-data: Internal functions
Function, tokenbuf-first-pass: Internal functions
Function, tokenbuf-max: Internal functions
Function, tokenbuf-p: Internal functions

G
Generic Function, parse-html: Exported generic functions
get-collector: Internal functions
get-tokenbuf: Internal functions
grow-and-add: Internal functions

I
if*: Exported macros

M
Macro, if*: Exported macros
Macro, tag-auto-close: Internal macros
Macro, tag-auto-close-stop: Internal macros
Macro, tag-callback: Internal macros
Macro, tag-name: Internal macros
Macro, tag-no-end: Internal macros
Macro, tag-no-pcdata: Internal macros
make-collector: Internal functions
make-tokenbuf: Internal functions
Method, parse-html: Exported generic functions
Method, parse-html: Exported generic functions
Method, parse-html: Exported generic functions

N
next-token: Internal functions

P
parse-html: Exported generic functions
parse-html: Exported generic functions
parse-html: Exported generic functions
parse-html: Exported generic functions
phtml-internal: Exported functions
put-back-collector: Internal functions
put-back-tokenbuf: Internal functions

T
tag-auto-close: Internal macros
tag-auto-close-stop: Internal macros
tag-callback: Internal macros
tag-name: Internal macros
tag-no-end: Internal macros
tag-no-pcdata: Internal macros
to-preferred-case: Internal functions
tokenbuf-cur: Internal functions
tokenbuf-data: Internal functions
tokenbuf-first-pass: Internal functions
tokenbuf-max: Internal functions
tokenbuf-p: Internal functions

Jump to:   (  
C   F   G   I   M   N   P   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
C   D   F   I   M   N   S  
Index Entry  Section

*
*ch-format*: Internal special variables
*characteristics*: Internal special variables
*collectors*: Internal special variables
*html-entity-to-code*: Internal special variables
*in-line*: Internal special variables
*known-tags*: Internal special variables
*kwd-package*: Internal special variables
*tokenbufs*: Internal special variables

C
char-attribnamechar: Internal constants
char-attribundelimattribvalue: Internal constants
char-spacechar: Internal constants
char-tagcharacter: Internal constants
Constant, char-attribnamechar: Internal constants
Constant, char-attribundelimattribvalue: Internal constants
Constant, char-spacechar: Internal constants
Constant, char-tagcharacter: Internal constants
Constant, state-attribname: Internal constants
Constant, state-attribstartvalue: Internal constants
Constant, state-attribvaluedelim: Internal constants
Constant, state-attribvaluenodelim: Internal constants
Constant, state-findattribname: Internal constants
Constant, state-findvalue: Internal constants
Constant, state-pcdata: Internal constants
Constant, state-rawdata: Internal constants
Constant, state-readcomment: Internal constants
Constant, state-readcomment-one: Internal constants
Constant, state-readcomment-two: Internal constants
Constant, state-readtag: Internal constants
Constant, state-readtagfirst: Internal constants
cur: Internal structures

D
data: Internal structures
data: Internal structures

F
first-pass: Internal structures

I
if*-keyword-list: Internal special variables

M
max: Internal structures
max: Internal structures

N
next: Internal structures

S
Slot, cur: Internal structures
Slot, data: Internal structures
Slot, data: Internal structures
Slot, first-pass: Internal structures
Slot, max: Internal structures
Slot, max: Internal structures
Slot, next: Internal structures
Special Variable, *ch-format*: Internal special variables
Special Variable, *characteristics*: Internal special variables
Special Variable, *collectors*: Internal special variables
Special Variable, *html-entity-to-code*: Internal special variables
Special Variable, *in-line*: Internal special variables
Special Variable, *known-tags*: Internal special variables
Special Variable, *kwd-package*: Internal special variables
Special Variable, *tokenbufs*: Internal special variables
Special Variable, if*-keyword-list: Internal special variables
state-attribname: Internal constants
state-attribstartvalue: Internal constants
state-attribvaluedelim: Internal constants
state-attribvaluenodelim: Internal constants
state-findattribname: Internal constants
state-findvalue: Internal constants
state-pcdata: Internal constants
state-rawdata: Internal constants
state-readcomment: Internal constants
state-readcomment-one: Internal constants
state-readcomment-two: Internal constants
state-readtag: Internal constants
state-readtagfirst: Internal constants

Jump to:   *  
C   D   F   I   M   N   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   I   N   P   S   T  
Index Entry  Section

C
cl-html-parse: The cl-html-parse system
collector: Internal structures

I
if-star-for-cl-html-parse: The if-star-for-cl-html-parse package

N
net.html.parser: The net<dot>html<dot>parser package

P
Package, if-star-for-cl-html-parse: The if-star-for-cl-html-parse package
Package, net.html.parser: The net<dot>html<dot>parser package

S
Structure, collector: Internal structures
Structure, tokenbuf: Internal structures
System, cl-html-parse: The cl-html-parse system

T
tokenbuf: Internal structures

Jump to:   C   I   N   P   S   T