The chemical-compounds Reference Manual

This is the chemical-compounds Reference Manual, version 1.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:35:12 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 chemical-compounds

Author

Peter Scott

License

LLGPL

Version

1.0.1

Dependency

periodic-table (system).

Source

chemical-compounds.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 chemical-compounds/chemical-compounds.asd

Source

chemical-compounds.asd.

Parent Component

chemical-compounds (system).

ASDF Systems

chemical-compounds.

Packages

chemical-compounds-system.


3.1.2 chemical-compounds/parsing.lisp

Source

chemical-compounds.asd.

Parent Component

chemical-compounds (system).

Packages

compound-parsing.

Public Interface
Internals

3.1.3 chemical-compounds/compounds.lisp

Dependency

parsing.lisp (file).

Source

chemical-compounds.asd.

Parent Component

chemical-compounds (system).

Packages

compounds.

Public Interface
Internals

element-number-pair-p (function).


4 Packages

Packages are listed by definition order.


4.1 compounds

Source

compounds.lisp.

Use List
  • common-lisp.
  • elements.
Public Interface
Internals

element-number-pair-p (function).


4.2 chemical-compounds-system

Source

chemical-compounds.asd.

Use List
  • asdf/interface.
  • common-lisp.

4.3 compound-parsing

Source

parsing.lisp.

Use List

common-lisp.

Public Interface

parse-compound (function).

Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Ordinary functions

Function: formula-weight (compound)

The number of grams per mole of a compound

Package

compounds.

Source

compounds.lisp.

Function: get-compound (compound)

Return a compound designator given either a compound designator or a string in compound syntax

Package

compounds.

Source

compounds.lisp.

Function: parse-compound (string)

Parse a compound string, such as C6 H12 O6

Package

compounds.

Source

compounds.lisp.

Function: parse-compound (string &optional index end)
Package

compound-parsing.

Source

parsing.lisp.

Function: pprint-compound (compound &key stream parens)

Pretty print a compound, putting parens around it if ‘parens’ is t. This is so ugly that I’ve come to despise it, but it works. Don’t touch it unless you want it to shatter into a million little pieces.

Package

compounds.

Source

compounds.lisp.


5.1.2 Standalone methods

Method: print-object ((object meta) stream)
Source

parsing.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *meta-debug*

Should META output debugging information?

Package

compound-parsing.

Source

parsing.lisp.


5.2.2 Macros

Macro: defmeta (name other-args &body body)
Package

compound-parsing.

Source

parsing.lisp.

Macro: match (x)
Package

compound-parsing.

Source

parsing.lisp.

Macro: match-type (x v)
Package

compound-parsing.

Source

parsing.lisp.

Macro: matchit (x)
Package

compound-parsing.

Source

parsing.lisp.

Macro: meta-labels (functions &body body)
Package

compound-parsing.

Source

parsing.lisp.

Macro: with-string-accumulation (strings &body body)

Given a list of symbols, create character output streams bound to the symbols given in ‘strings’ with -STREAM appended, execute ‘body’ in this environment, and SETF all the symbol-values of the symbols in ‘strings’ to the values of their respective string output streams.

It also defines a local function FORCE-STRING-ACCUMULATION which will do the SETFing when it is called. It is called automatically at the end of the block, but you can call it earlier, as many times as you like. It clears the string streams, so be careful when using it.

The utility of this macro may not be readily apparent, but is can be very handy in META parsers which need to accumulate characters into strings.

Package

compound-parsing.

Source

parsing.lisp.


5.2.3 Ordinary functions

Function: compileit (x)
Package

compound-parsing.

Source

parsing.lisp.

Function: copy-meta (instance)
Package

compound-parsing.

Source

parsing.lisp.

Function: ctoi (d)
Package

compound-parsing.

Source

parsing.lisp.

Function: element-number-pair-p (compound)

Return t if ‘compound’ is a pair of an element and a number of that element, such as (C 6)

Package

compounds.

Source

compounds.lisp.

Function: end-of-string-p (string index)

Is index above the maximum index allowed for a given string?

Package

compound-parsing.

Source

parsing.lisp.

Function: make-meta (&key char form)
Package

compound-parsing.

Source

parsing.lisp.

Reader: meta-char (instance)
Writer: (setf meta-char) (instance)
Package

compound-parsing.

Source

parsing.lisp.

Target Slot

char.

Reader: meta-form (instance)
Writer: (setf meta-form) (instance)
Package

compound-parsing.

Source

parsing.lisp.

Target Slot

form.

Function: meta-p (object)
Package

compound-parsing.

Source

parsing.lisp.

Function: meta-reader (s c)
Package

compound-parsing.

Source

parsing.lisp.

Function: parse-int (string &optional index end)
Package

compound-parsing.

Source

parsing.lisp.

Function: parse-query-string (string &optional index end)
Package

compound-parsing.

Source

parsing.lisp.

Function: parse-x-and-y (string &optional index end)
Package

compound-parsing.

Source

parsing.lisp.

Function: strings->element-list (element number)

Convert an element (which may be a string or a compound designator) and a number given as a string into a proper compound designator.

Package

compound-parsing.

Source

parsing.lisp.


5.2.4 Structures

Structure: meta
Package

compound-parsing.

Source

parsing.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: char
Package

common-lisp.

Readers

meta-char.

Writers

(setf meta-char).

Slot: form
Readers

meta-form.

Writers

(setf meta-form).


5.2.5 Types

Type: digit ()
Package

compound-parsing.

Source

parsing.lisp.

Type: non-rparen-char ()
Package

compound-parsing.

Source

parsing.lisp.

Type: nonspace-char ()
Package

compound-parsing.

Source

parsing.lisp.

Type: number-char ()
Package

compound-parsing.

Source

parsing.lisp.

Type: space-char ()
Package

compound-parsing.

Source

parsing.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   E   F   G   M   P   S   W  
Index Entry  Section

(
(setf meta-char): Private ordinary functions
(setf meta-form): Private ordinary functions

C
compileit: Private ordinary functions
copy-meta: Private ordinary functions
ctoi: Private ordinary functions

D
defmeta: Private macros

E
element-number-pair-p: Private ordinary functions
end-of-string-p: Private ordinary functions

F
formula-weight: Public ordinary functions
Function, (setf meta-char): Private ordinary functions
Function, (setf meta-form): Private ordinary functions
Function, compileit: Private ordinary functions
Function, copy-meta: Private ordinary functions
Function, ctoi: Private ordinary functions
Function, element-number-pair-p: Private ordinary functions
Function, end-of-string-p: Private ordinary functions
Function, formula-weight: Public ordinary functions
Function, get-compound: Public ordinary functions
Function, make-meta: Private ordinary functions
Function, meta-char: Private ordinary functions
Function, meta-form: Private ordinary functions
Function, meta-p: Private ordinary functions
Function, meta-reader: Private ordinary functions
Function, parse-compound: Public ordinary functions
Function, parse-compound: Public ordinary functions
Function, parse-int: Private ordinary functions
Function, parse-query-string: Private ordinary functions
Function, parse-x-and-y: Private ordinary functions
Function, pprint-compound: Public ordinary functions
Function, strings->element-list: Private ordinary functions

G
get-compound: Public ordinary functions

M
Macro, defmeta: Private macros
Macro, match: Private macros
Macro, match-type: Private macros
Macro, matchit: Private macros
Macro, meta-labels: Private macros
Macro, with-string-accumulation: Private macros
make-meta: Private ordinary functions
match: Private macros
match-type: Private macros
matchit: Private macros
meta-char: Private ordinary functions
meta-form: Private ordinary functions
meta-labels: Private macros
meta-p: Private ordinary functions
meta-reader: Private ordinary functions
Method, print-object: Public standalone methods

P
parse-compound: Public ordinary functions
parse-compound: Public ordinary functions
parse-int: Private ordinary functions
parse-query-string: Private ordinary functions
parse-x-and-y: Private ordinary functions
pprint-compound: Public ordinary functions
print-object: Public standalone methods

S
strings->element-list: Private ordinary functions

W
with-string-accumulation: Private macros