The parse-number Reference Manual

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

The parse-number Reference Manual

This is the parse-number Reference Manual, version 1.7, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:32:57 2022 GMT+0.

Table of Contents


1 Introduction

-*- Outline -*-

PARSE-NUMBER is a library of functions which accept an arbitrary
string and attempt to parse it, if possible into one of the standard
Common Lisp number types without using the reader, or else signal an
error of type INVALID-NUMBER

* Functions

 PARSE-NUMBER (string &key start end radix)

 PARSE-REAL-NUMBER (string &key start end radix)

 PARSE-POSITIVE-REAL-NUMBER (string &key start end radix)

* Error conditions

 INVALID-NUMBER (inherits PARSE-ERROR)

** Accessors

 INVALID-NUMBER-VALUE
 INVALID-NUMBER-REASON


2 Systems

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


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

2.1 parse-number

Number parsing library

Maintainer

Sharp Lispers <sharplispers@googlegroups.com>

Author

Matthew Danish <mrd@debian.org>

License

BSD 3-Clause

Version

1.7

Source

parse-number.asd.

Child Components

3 Files

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


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

3.1 Lisp


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

3.1.1 parse-number/parse-number.asd

Source

parse-number.asd.

Parent Component

parse-number (system).

ASDF Systems

parse-number.


3.1.2 parse-number/parse-number.lisp

Source

parse-number.asd.

Parent Component

parse-number (system).

Packages

org.mapcar.parse-number.

Public Interface
Internals

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

3.2 Static


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

3.2.1 parse-number/version.sexp

Source

parse-number.asd.

Parent Component

parse-number (system).


4 Packages

Packages are listed by definition order.


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

4.1 org.mapcar.parse-number

Source

parse-number.lisp.

Nickname

parse-number

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


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

5.1 Public Interface


5.1.1 Ordinary functions

Function: parse-number (string &key start end radix float-format)

Given a string, and start, end, and radix parameters, produce a number according to the syntax definitions in the Common Lisp Hyperspec.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: parse-positive-real-number (string &key start end radix float-format)

Given a string, and start, end, and radix parameters, produce a number according to the syntax definitions in the Common Lisp Hyperspec – except for complex numbers and negative numbers.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: parse-real-number (string &key start end radix float-format)

Given a string, and start, end, and radix parameters, produce a number according to the syntax definitions in the Common Lisp Hyperspec – except for complex numbers.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.


5.1.2 Generic functions

Generic Reader: invalid-number-reason (condition)
Package

org.mapcar.parse-number.

Methods
Reader Method: invalid-number-reason ((condition invalid-number))
Source

parse-number.lisp.

Target Slot

reason.

Generic Reader: invalid-number-value (condition)
Package

org.mapcar.parse-number.

Methods
Reader Method: invalid-number-value ((condition invalid-number))
Source

parse-number.lisp.

Target Slot

value.


5.1.3 Conditions

Condition: invalid-number
Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Direct superclasses

parse-error.

Direct methods
Direct slots
Slot: value
Initform

(quote nil)

Initargs

:value

Readers

invalid-number-value.

Writers

This slot is read-only.

Slot: reason
Initform

(quote "not specified")

Initargs

:reason

Readers

invalid-number-reason.

Writers

This slot is read-only.


5.2 Internals


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

5.2.1 Special variables

Special Variable: *white-space-characters*

A list of all of the whitespace characters.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.


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

5.2.2 Ordinary functions

Function: base-for-exponent-marker (char)

Return the base for an exponent-marker.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: make-float/frac (radix exp-marker whole-place frac-place exp-place)

Create a float using EXP-MARKER as the exponent-marker and the parsed-integers WHOLE-PLACE, FRAC-PLACE, and EXP-PLACE as the integer part, fractional part, and exponent respectively.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: make-float/whole (exp-marker whole-place exp-place)

Create a float where EXP-MARKER is the exponent-marker and the parsed-integers WHOLE-PLACE and EXP-PLACE as the integer part and the exponent respectively.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: number-value (x)

Get the value of a parsed-integer.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: parse-integer-and-places (string start end &key radix)

Parse an integer and return a ’parsed-integer’. This is an object whose numerical value can be accessed with the function number-value and whose length can be accessed with the function place.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: parse-integers (string start end splitting-points &key radix)

Parse a string containing multiple integers where SPLITTING-POINTS is a list of locations where each location is inbetween consecutive integers. This will return a list of parsed-integers. The last parsed-integer will have a negative value for its length.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: places (x)

Get the length of a parsed-integer.

Package

org.mapcar.parse-number.

Source

parse-number.lisp.

Function: white-space-p (x)

Is the given character a whitespace character?

Package

org.mapcar.parse-number.

Source

parse-number.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   B   F   G   I   M   N   P   W  
Index Entry  Section

B
base-for-exponent-marker: Private ordinary functions

F
Function, base-for-exponent-marker: Private ordinary functions
Function, make-float/frac: Private ordinary functions
Function, make-float/whole: Private ordinary functions
Function, number-value: Private ordinary functions
Function, parse-integer-and-places: Private ordinary functions
Function, parse-integers: Private ordinary functions
Function, parse-number: Public ordinary functions
Function, parse-positive-real-number: Public ordinary functions
Function, parse-real-number: Public ordinary functions
Function, places: Private ordinary functions
Function, white-space-p: Private ordinary functions

G
Generic Function, invalid-number-reason: Public generic functions
Generic Function, invalid-number-value: Public generic functions

I
invalid-number-reason: Public generic functions
invalid-number-reason: Public generic functions
invalid-number-value: Public generic functions
invalid-number-value: Public generic functions

M
make-float/frac: Private ordinary functions
make-float/whole: Private ordinary functions
Method, invalid-number-reason: Public generic functions
Method, invalid-number-value: Public generic functions

N
number-value: Private ordinary functions

P
parse-integer-and-places: Private ordinary functions
parse-integers: Private ordinary functions
parse-number: Public ordinary functions
parse-positive-real-number: Public ordinary functions
parse-real-number: Public ordinary functions
places: Private ordinary functions

W
white-space-p: Private ordinary functions

Jump to:   B   F   G   I   M   N   P   W