The read-as-string Reference Manual

Table of Contents

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

The read-as-string Reference Manual

This is the read-as-string Reference Manual, version 2.2.5, generated automatically by Declt version 3.0 "Montgomery Scott" on Fri Jun 26 12:06:58 2020 GMT+0.


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

1 Introduction

READ-AS-STRING 2.1.3

What is this?

Reading S-Expression string from stream.

Current lisp world

Unlike UNIX, Lisp has READ. Lisp programmer does not make effort to make S-Expression parser (UNIX has awk though).

Issues

Sometime we need to analyze S-Expression statically. In this context, 'static' means does not construct lisp object but string. But lisp does not have such feature.

Proposal

READ-AS-STRING do it.

Usage

(let ((sexp "(CAR (liSt :a 45.))"))
  (print (read-from-string sexp))
  (with-input-from-string (s sexp)
    (print (read-as-string s))))
(CAR (LIST :A 45))    ; <--- Output of CL:READ-FROM-STRING.
"(CAR (liSt :a 45.))" ; <--- Output of READ-AS-STRING.

Usually (read-from-string (read-as-string stream)) is same with (read stream).

From developer

Product's goal

Eliminate bugs.

License

MIT

Tested with


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 read-as-string

Author

Shinichi Sato

License

MIT

Description

Reading S-Expression string from stream.

Long Description

# READ-AS-STRING 2.1.3
## What is this?
Reading S-Expression string from stream.

## Current lisp world
Unlike UNIX, Lisp has READ.
Lisp programmer does not make effort to make S-Expression parser (UNIX has awk though).

## Issues
Sometime we need to analyze S-Expression statically.
In this context, ’static’ means does not construct lisp object but string.
But lisp does not have such feature.

## Proposal
READ-AS-STRING do it.

## Usage
“‘lisp
(let ((sexp "(CAR (liSt :a 45.))"))
(print (read-from-string sexp))
(with-input-from-string (s sexp)
(print (read-as-string s))))
(CAR (LIST :A 45)) ; <— Output of CL:READ-FROM-STRING.
"(CAR (liSt :a 45.))" ; <— Output of READ-AS-STRING.
“‘
Usually ‘(read-from-string (read-as-string stream))‘ is same with ‘(read stream)‘.

## From developer

### Product’s goal
Eliminate bugs.
### License
MIT

### Tested with
* SBCL/2.0.2
* CCL/1.12
* ECL/20.4.24
* CLISP/2.49

Version

2.2.5

Dependencies
Source

read-as-string.asd (file)

Component

read-as-string.lisp (file)


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

3 Files

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


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

3.1 Lisp


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

3.1.1 read-as-string.asd

Location

read-as-string.asd

Systems

read-as-string (system)


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

3.1.2 read-as-string/read-as-string.lisp

Parent

read-as-string (system)

Location

read-as-string.lisp

Packages

read-as-string

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 read-as-string

Source

read-as-string.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Special variables

Special Variable: *muffle-reader-error*
Package

read-as-string

Source

read-as-string.lisp (file)


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

5.1.2 Functions

Function: get-dispatcher CHAR &optional *READTABLE*
Package

read-as-string

Source

read-as-string.lisp (file)

Function: read-as-string &optional STREAM EOF-ERROR-P EOF-VALUE RECURSIVE-P
Package

read-as-string

Source

read-as-string.lisp (file)

Function: read-token &optional STREAM &aux *STANDARD-INPUT*
Package

read-as-string

Source

read-as-string.lisp (file)

Function: set-dispatcher CHAR FUN &optional READTABLE
Package

read-as-string

Source

read-as-string.lisp (file)


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

5.1.3 Conditions

Condition: no-dispatch-function ()
Package

read-as-string

Source

read-as-string.lisp (file)

Direct superclasses
  • cell-error (condition)
  • reader-error (condition)
Condition: read-unreadable-object ()
Package

read-as-string

Source

read-as-string.lisp (file)

Direct superclasses

reader-error (condition)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *dispatch-macros*
Package

read-as-string

Source

read-as-string.lisp (file)


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

5.2.2 Functions

Function: "reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: ##reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #+reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #<reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #=reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #\reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #paren-reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: #|reader STREAM CHARACTER NUMBER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: 'reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: ,reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: ;reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: `reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: paren-reader STREAM CHARACTER
Package

read-as-string

Source

read-as-string.lisp (file)

Function: whitecharp CHAR
Package

read-as-string

Source

/home/quickref/quicklisp/dists/quicklisp/software/core-reader-20200610-git/core-reader.lisp


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   R  
Index Entry  Section

F
File, Lisp, read-as-string.asd: The read-as-string․asd file
File, Lisp, read-as-string/read-as-string.lisp: The read-as-string/read-as-string․lisp file

L
Lisp File, read-as-string.asd: The read-as-string․asd file
Lisp File, read-as-string/read-as-string.lisp: The read-as-string/read-as-string․lisp file

R
read-as-string.asd: The read-as-string․asd file
read-as-string/read-as-string.lisp: The read-as-string/read-as-string․lisp file

Jump to:   F   L   R  

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

A.2 Functions

Jump to:   "   #   '   ,   ;   `  
F   G   P   R   S   W  
Index Entry  Section

"
"reader: Internal functions

#
##reader: Internal functions
#+reader: Internal functions
#<reader: Internal functions
#=reader: Internal functions
#paren-reader: Internal functions
#reader: Internal functions
#\reader: Internal functions
#|reader: Internal functions

'
'reader: Internal functions

,
,reader: Internal functions

;
;reader: Internal functions

`
`reader: Internal functions

F
Function, "reader: Internal functions
Function, ##reader: Internal functions
Function, #+reader: Internal functions
Function, #<reader: Internal functions
Function, #=reader: Internal functions
Function, #paren-reader: Internal functions
Function, #reader: Internal functions
Function, #\reader: Internal functions
Function, #|reader: Internal functions
Function, 'reader: Internal functions
Function, ,reader: Internal functions
Function, ;reader: Internal functions
Function, get-dispatcher: Exported functions
Function, paren-reader: Internal functions
Function, read-as-string: Exported functions
Function, read-token: Exported functions
Function, set-dispatcher: Exported functions
Function, whitecharp: Internal functions
Function, `reader: Internal functions

G
get-dispatcher: Exported functions

P
paren-reader: Internal functions

R
read-as-string: Exported functions
read-token: Exported functions

S
set-dispatcher: Exported functions

W
whitecharp: Internal functions

Jump to:   "   #   '   ,   ;   `  
F   G   P   R   S   W  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*dispatch-macros*: Internal special variables
*muffle-reader-error*: Exported special variables

S
Special Variable, *dispatch-macros*: Internal special variables
Special Variable, *muffle-reader-error*: Exported special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   C   N   P   R   S  
Index Entry  Section

C
Condition, no-dispatch-function: Exported conditions
Condition, read-unreadable-object: Exported conditions

N
no-dispatch-function: Exported conditions

P
Package, read-as-string: The read-as-string package

R
read-as-string: The read-as-string system
read-as-string: The read-as-string package
read-unreadable-object: Exported conditions

S
System, read-as-string: The read-as-string system

Jump to:   C   N   P   R   S