The null-package Reference Manual

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

The null-package Reference Manual

This is the null-package Reference Manual, version 1.4.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Nov 15 06:46:22 2022 GMT+0.

Table of Contents


1 Introduction

NULL-PACKAGE 1.3.4

Safe and robust S-Expression reader. Useful to read from unfailthfull stream/socket.

Alternatives and differences.

| | safe-read | eclector | null-package | | --- | ----------- | ----------- | ------------ | | NIL | * | * | * | | () | ERROR | * | * | | Read macro | ERROR | * | * | | Prefixed symbol | ERROR | Can recover | Can control | | Backquote | ERROR | Its own | Impl own |

NULL-PACKAGE aims to be used for static analyzing rather than security. If you want more strict one for security reason, SAFE-READ is recommended.

Usage

(with-input-from-string (s "hoge")
  (read-with-null-package s))
=> #:HOGE

For details, see spec file.

*ONLY-JUNK-P*

If NIL (the default), every symbols are uninterned. If T, only broken symbols are uninterned.

(let ((*only-junk-p* t))
  (with-input-from-string (s "(car (cdr (list a b no-such-package:c)))")
    (read-with-null-package s)))
=> (CAR (CDR (LIST A B #:C)))

*TARGET-SYMBOLS*

If *ONLY-JUNK-P* is the list of package designators, the symbol satisfies *TARGET-SYMBOLS* are only interned.

(defpackage test (:use :cl) (:export car cdr))

(let ((*terget-symbols* :external) ; The default though.
      (*only-junk-p* '(:test)))
  (with-input-from-string (s "(car (cdr (list a b no-such-package:c)))")
    (read-with-null-package s)))
=> (CAR (CDR (#:LIST #:A #:B #:C)))

Memo

In fact, ideal syntax was like below.

(let ((*package* (find-package :null)))
  (with-input-from-string (s "hoge")
    (read s)))

But there is no portable way to set default reader to readtable.

From developer

Product's goal

Already?

License

MIT

Developed with

SBCL

Tested with


2 Systems

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


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

2.1 null-package

Safe and robust S-Expression reader. Useful to read from unfailthfull stream/socket.

Author

SATO Shinichi

Source Control

(GIT git@github.com:hyotang666/null-package)

Bug Tracker

https://github.com/hyotang666/null-package/issues

License

MIT

Version

1.4.3

Dependencies
  • read-as-string (system).
  • alexandria (system).
  • core-reader (system).
  • named-readtables (system).
Source

null-package.asd.

Child Component

null-package.lisp (file).


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   [Contents][Index]

3.1.1 null-package/null-package.asd

Source

null-package.asd.

Parent Component

null-package (system).

ASDF Systems

null-package.


3.1.2 null-package/null-package.lisp

Source

null-package.asd.

Parent Component

null-package (system).

Packages

null-package.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


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

4.1 null-package

Source

null-package.lisp.

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 Special variables

Special Variable: *only-junk-p*

When NIL, all symbols are uninterned except boolean and keyword.
When list, included package’s symbols which satisfies TARGETP are not uninterned. When T, broken notation only uninterned.

Package

null-package.

Source

null-package.lisp.

Special Variable: *target-symbols*
Package

null-package.

Source

null-package.lisp.


5.1.2 Ordinary functions

Function: read-with-null-package (&optional stream errorp return recursivep)
Package

null-package.

Source

null-package.lisp.


5.2 Internals


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

5.2.1 Special variables

Special Variable: *labels*
Package

null-package.

Source

null-package.lisp.


5.2.2 Macros

Macro: do-string ((var string &optional return) &body body)

Like DOLIST but for STRING. Escaped chars are ignored.

Package

null-package.

Source

null-package.lisp.


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

5.2.3 Ordinary functions

Function: ##reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #'reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #'replacer (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #+reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #-reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #.reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #=reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #areplacer (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #paren-reader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #paren-replacer (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #sreader (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: #sreplacer (stream character number)
Package

null-package.

Source

null-package.lisp.

Function: 'reader (stream character)
Package

null-package.

Source

null-package.lisp.

Function: 'replacer (stream character)
Package

null-package.

Source

null-package.lisp.

Function: ,replacer (stream character)
Package

null-package.

Source

null-package.lisp.

Function: `reader (stream character)
Package

null-package.

Source

null-package.lisp.

Function: `replacer (stream character)
Package

null-package.

Source

null-package.lisp.

Function: always-same-case-p (string)
Package

null-package.

Source

null-package.lisp.

Function: char-swapcase (char)
Package

null-package.

Source

null-package.lisp.

Function: convert-case (string)
Package

null-package.

Source

null-package.lisp.

Function: num-notation-p (string)
Package

null-package.

Source

null-package.lisp.

Function: paren-reader (stream character)
Package

null-package.

Source

null-package.lisp.

Function: paren-replacer (stream character)
Package

null-package.

Source

null-package.lisp.

Function: parse-token (token)
Package

null-package.

Source

null-package.lisp.

Function: read-with-replace-token (&optional *standard-input*)
Package

null-package.

Source

null-package.lisp.

Function: symbol<=name (name &optional *package*)
Package

null-package.

Source

null-package.lisp.

Function: targetp (status)
Package

null-package.

Source

null-package.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   #   '   ,   `  
A   C   D   F   M   N   P   R   S   T  
Index Entry  Section

#
##reader: Private ordinary functions
#'reader: Private ordinary functions
#'replacer: Private ordinary functions
#+reader: Private ordinary functions
#-reader: Private ordinary functions
#.reader: Private ordinary functions
#=reader: Private ordinary functions
#areplacer: Private ordinary functions
#paren-reader: Private ordinary functions
#paren-replacer: Private ordinary functions
#sreader: Private ordinary functions
#sreplacer: Private ordinary functions

'
'reader: Private ordinary functions
'replacer: Private ordinary functions

,
,replacer: Private ordinary functions

`
`reader: Private ordinary functions
`replacer: Private ordinary functions

A
always-same-case-p: Private ordinary functions

C
char-swapcase: Private ordinary functions
convert-case: Private ordinary functions

D
do-string: Private macros

F
Function, ##reader: Private ordinary functions
Function, #'reader: Private ordinary functions
Function, #'replacer: Private ordinary functions
Function, #+reader: Private ordinary functions
Function, #-reader: Private ordinary functions
Function, #.reader: Private ordinary functions
Function, #=reader: Private ordinary functions
Function, #areplacer: Private ordinary functions
Function, #paren-reader: Private ordinary functions
Function, #paren-replacer: Private ordinary functions
Function, #sreader: Private ordinary functions
Function, #sreplacer: Private ordinary functions
Function, 'reader: Private ordinary functions
Function, 'replacer: Private ordinary functions
Function, ,replacer: Private ordinary functions
Function, always-same-case-p: Private ordinary functions
Function, char-swapcase: Private ordinary functions
Function, convert-case: Private ordinary functions
Function, num-notation-p: Private ordinary functions
Function, paren-reader: Private ordinary functions
Function, paren-replacer: Private ordinary functions
Function, parse-token: Private ordinary functions
Function, read-with-null-package: Public ordinary functions
Function, read-with-replace-token: Private ordinary functions
Function, symbol<=name: Private ordinary functions
Function, targetp: Private ordinary functions
Function, `reader: Private ordinary functions
Function, `replacer: Private ordinary functions

M
Macro, do-string: Private macros

N
num-notation-p: Private ordinary functions

P
paren-reader: Private ordinary functions
paren-replacer: Private ordinary functions
parse-token: Private ordinary functions

R
read-with-null-package: Public ordinary functions
read-with-replace-token: Private ordinary functions

S
symbol<=name: Private ordinary functions

T
targetp: Private ordinary functions

Jump to:   #   '   ,   `  
A   C   D   F   M   N   P   R   S   T