The null-package Reference Manual

Table of Contents

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

The null-package Reference Manual

This is the null-package Reference Manual, version 1.3.11, generated automatically by Declt version 3.0 "Montgomery Scott" on Fri Jun 26 11:50:50 2020 GMT+0.


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

1 Introduction

NULL-PACKAGE 1.3.4

Current lisp world

Having strong package system.

Issues

When static lisp source analyzing or interacting to unreliable user with S-Expression, interning symbol becomes problem.

Propose

In such cases, not interning, just making symbol (i.e. uninterned symbol) is useful. NULL-PACKAGE provides such feature.

Usage

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

For details, see spec file.

Alternatives.

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.

Differences against SAFE-READ.

(with-input-from-string (s "nil")
  (read-with-null-package s))
=> NIL

(with-input-from-string (s "nil")
  (safe-read s))
:signals malformed-input

(with-input-from-string (s "()")
  (safe-read s))
=> NIL
   NIL
(with-input-from-string (s "(#(a))")
  (read-with-null-package s))
=> (#(#:A))

(with-input-from-string (s "(#(a))")
  (safe-read s))
:signals malformed-input
(with-input-from-string (s "(asdf:system)")
  (read-with-null-package s))
=> (#:SYSTEM)

(with-input-from-string (s "(asdf:system)")
  (safe-read s))
:signals malformed-input
(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)))

(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


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 null-package

Author

SATO Shinichi

License

MIT

Description

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

Version

1.3.11

Dependencies
Source

null-package.asd (file)

Component

null-package.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 null-package.asd

Location

null-package.asd

Systems

null-package (system)


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

3.1.2 null-package/null-package.lisp

Parent

null-package (system)

Location

null-package.lisp

Packages

null-package

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 null-package

Source

null-package.lisp (file)

Use List

common-lisp

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: *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 (file)

Special Variable: *target-symbols*
Package

null-package

Source

null-package.lisp (file)


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

5.1.2 Functions

Function: read-with-null-package &optional STREAM ERRORP RETURN RECURSIVEP
Package

null-package

Source

null-package.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *labels*
Package

null-package

Source

null-package.lisp (file)


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

5.2.2 Functions

Function: ##reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #'reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #'replacer STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #+reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #-reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #.reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #=reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #areplacer STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #paren-reader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #paren-replacer STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #sreader STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: #sreplacer STREAM CHARACTER NUMBER
Package

null-package

Source

null-package.lisp (file)

Function: 'reader STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: 'replacer STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: ,replacer STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: `reader STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: `replacer STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: always-same-case-p LIST
Package

null-package

Source

null-package.lisp (file)

Function: char-swapcase CHAR
Package

null-package

Source

null-package.lisp (file)

Function: convert-case STRING
Package

null-package

Source

null-package.lisp (file)

Function: num-notation-p STRING &aux LENGTH
Package

null-package

Source

null-package.lisp (file)

Function: paren-reader STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: paren-replacer STREAM CHARACTER
Package

null-package

Source

null-package.lisp (file)

Function: parse-token TOKEN
Package

null-package

Source

null-package.lisp (file)

Function: read-with-replace-token &optional *STANDARD-INPUT*
Package

null-package

Source

null-package.lisp (file)

Function: remove-escape STRING
Package

null-package

Source

null-package.lisp (file)

Function: symbol<=name NAME &optional *PACKAGE*
Package

null-package

Source

null-package.lisp (file)

Function: targetp STATUS
Package

null-package

Source

null-package.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   N  
Index Entry  Section

F
File, Lisp, null-package.asd: The null-package․asd file
File, Lisp, null-package/null-package.lisp: The null-package/null-package․lisp file

L
Lisp File, null-package.asd: The null-package․asd file
Lisp File, null-package/null-package.lisp: The null-package/null-package․lisp file

N
null-package.asd: The null-package․asd file
null-package/null-package.lisp: The null-package/null-package․lisp file

Jump to:   F   L   N  

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

A.2 Functions

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

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

'
'reader: Internal functions
'replacer: Internal functions

,
,replacer: Internal functions

`
`reader: Internal functions
`replacer: Internal functions

A
always-same-case-p: Internal functions

C
char-swapcase: Internal functions
convert-case: Internal functions

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

N
num-notation-p: Internal functions

P
paren-reader: Internal functions
paren-replacer: Internal functions
parse-token: Internal functions

R
read-with-null-package: Exported functions
read-with-replace-token: Internal functions
remove-escape: Internal functions

S
symbol<=name: Internal functions

T
targetp: Internal functions

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

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*labels*: Internal special variables
*only-junk-p*: Exported special variables
*target-symbols*: Exported special variables

S
Special Variable, *labels*: Internal special variables
Special Variable, *only-junk-p*: Exported special variables
Special Variable, *target-symbols*: Exported special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   N   P   S  
Index Entry  Section

N
null-package: The null-package system
null-package: The null-package package

P
Package, null-package: The null-package package

S
System, null-package: The null-package system

Jump to:   N   P   S