The polisher Reference Manual

This is the polisher Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri Sep 15 06:18:29 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 polisher

Infix notation to S-expression translator

Author

mrcdr

Home Page

https://github.com/mrcdr/polisher

License

MIT

Version

0.1

Dependency

cl-ppcre (system).

Source

polisher.asd.

Child Components

3 Modules

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


3.1 polisher/src

Dependency

package.lisp (file).

Source

polisher.asd.

Parent Component

polisher (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 polisher/polisher.asd

Source

polisher.asd.

Parent Component

polisher (system).

ASDF Systems

polisher.


4.1.2 polisher/package.lisp

Source

polisher.asd.

Parent Component

polisher (system).

Packages

polisher.


4.1.3 polisher/src/types-svalues.lisp

Source

polisher.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 polisher/src/tokenizer.lisp

Dependency

types-svalues.lisp (file).

Source

polisher.asd.

Parent Component

src (module).

Internals

4.1.5 polisher/src/transformer.lisp

Dependency

tokenizer.lisp (file).

Source

polisher.asd.

Parent Component

src (module).

Internals

4.1.6 polisher/src/interface.lisp

Dependency

transformer.lisp (file).

Source

polisher.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 polisher

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: polish (formula-str)

Convert given infix-style formula into S-expression, which will be evaluated as usual lisp form.

Package

polisher.

Source

interface.lisp.


6.1.2 Ordinary functions

Function: activate-infix-syntax (&optional activate dispatch-char)

Activate infix reader-macro #i{...} by default. If the argument "activate" is nil,
deactivate (unregister) #i macro (regardless of whether or not it has been registered by this function). The macro character "i" can be changed by the argument "dispatch-char".

Package

polisher.

Source

interface.lisp.

Function: add-operator (op)

Add infix-style operator, which should be a polisher:operator instance.

Package

polisher.

Source

types-svalues.lisp.

Function: list-operators ()

Return information of registered operators as string.

Package

polisher.

Source

interface.lisp.


6.1.3 Standalone methods

Method: initialize-instance :after ((this operator) &rest args)
Source

types-svalues.lisp.

Method: print-object ((this operator) stream)
Source

types-svalues.lisp.


6.1.4 Classes

Class: operator

Operator class, whose instance will usually be registered by polisher:add-operator function.

Package

polisher.

Source

types-svalues.lisp.

Direct methods
Direct slots
Slot: symbol

Symbol used in infix-style.

Package

common-lisp.

Type

(quote symbol)

Initargs

:symbol

Slot: function

Function to be called, which must receive exactly two arguments.

Package

common-lisp.

Initargs

:function

Slot: priority

Operator priority. Operators will be evaluated from ones having larger priority.

Type

(quote number)

Initargs

:priority

Slot: left-associative

If t, this operator will be left associative (e.g. addition operator +). If nil, this operator will be right associative (e.g. power operator **).

Type

(quote boole)

Initform

t

Initargs

:left-associative


6.2 Internals


6.2.1 Special variables

Special Variable: *left-paren*
Package

polisher.

Source

types-svalues.lisp.

Special Variable: *max-priority*
Package

polisher.

Source

types-svalues.lisp.

Special Variable: *operator-list*
Package

polisher.

Source

types-svalues.lisp.

Special Variable: *right-paren*
Package

polisher.

Source

types-svalues.lisp.

Special Variable: *separator*
Package

polisher.

Source

types-svalues.lisp.


6.2.2 Macros

Macro: acond (&rest clauses)
Package

polisher.

Source

tokenizer.lisp.


6.2.3 Ordinary functions

Function: create-operator-regex ()
Package

polisher.

Source

tokenizer.lisp.

Function: find-split-point (formula begin end)
Package

polisher.

Source

transformer.lisp.

Function: infix-to-sexp (formula-str)
Package

polisher.

Source

interface.lisp.

Function: match-length (regex target-string &optional group-index)
Package

polisher.

Source

tokenizer.lisp.

Function: parse-formula (formula begin end)
Package

polisher.

Source

transformer.lisp.

Function: parse-value-or-function (formula begin end)
Package

polisher.

Source

transformer.lisp.

Function: read-formula (stream end-char)
Package

polisher.

Source

interface.lisp.

Function: read-safely (str)
Package

polisher.

Source

tokenizer.lisp.

Function: should-be-peeled (formula begin end)
Package

polisher.

Source

transformer.lisp.

Function: symbol-to-operator (symbol)
Package

polisher.

Source

types-svalues.lisp.

Function: tokenize (formula-str)
Package

polisher.

Source

tokenizer.lisp.

Function: transform-into-sexp (formula)
Package

polisher.

Source

transformer.lisp.


6.2.4 Generic functions

Generic Function: readable-string (object)
Package

polisher.

Source

types-svalues.lisp.

Methods
Method: readable-string ((object operator))

Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   C   F   G   I   L   M   P   R   S   T  
Index Entry  Section

A
acond: Private macros
activate-infix-syntax: Public ordinary functions
add-operator: Public ordinary functions

C
create-operator-regex: Private ordinary functions

F
find-split-point: Private ordinary functions
Function, activate-infix-syntax: Public ordinary functions
Function, add-operator: Public ordinary functions
Function, create-operator-regex: Private ordinary functions
Function, find-split-point: Private ordinary functions
Function, infix-to-sexp: Private ordinary functions
Function, list-operators: Public ordinary functions
Function, match-length: Private ordinary functions
Function, parse-formula: Private ordinary functions
Function, parse-value-or-function: Private ordinary functions
Function, read-formula: Private ordinary functions
Function, read-safely: Private ordinary functions
Function, should-be-peeled: Private ordinary functions
Function, symbol-to-operator: Private ordinary functions
Function, tokenize: Private ordinary functions
Function, transform-into-sexp: Private ordinary functions

G
Generic Function, readable-string: Private generic functions

I
infix-to-sexp: Private ordinary functions
initialize-instance: Public standalone methods

L
list-operators: Public ordinary functions

M
Macro, acond: Private macros
Macro, polish: Public macros
match-length: Private ordinary functions
Method, initialize-instance: Public standalone methods
Method, print-object: Public standalone methods
Method, readable-string: Private generic functions

P
parse-formula: Private ordinary functions
parse-value-or-function: Private ordinary functions
polish: Public macros
print-object: Public standalone methods

R
read-formula: Private ordinary functions
read-safely: Private ordinary functions
readable-string: Private generic functions
readable-string: Private generic functions

S
should-be-peeled: Private ordinary functions
symbol-to-operator: Private ordinary functions

T
tokenize: Private ordinary functions
transform-into-sexp: Private ordinary functions