► |  | Syntax: Meta-Programming Helpers

1 | Syntax Object Helpers
2 | Module-Processing Helpers
3 | Macro Transformer Helpers
4 | Reader Helpers
5 | Non-Module Compilation And Expansion
6 | Trusting Standard Recertifying Transformers
7 | Attaching Documentation to Exports
8 | Parsing and classifying syntax
| Index

▼ | 8 | Parsing and classifying syntax

8.1 | Quick Start
8.2 | Parsing and classifying syntax
8.3 | Syntax patterns
8.4 | Literal sets and Conventions
8.5 | Library syntax classes and literal sets

► | 8.5 | Library syntax classes and literal sets

8.5.1 | Syntax classes
8.5.2 | Literal sets

On this page:

8.5.1`` Syntax classes
expr
identifier
boolean
str
char
keyword
number
integer
exact-integer
exact-nonnegative-integer
exact-positive-integer
id
nat
static
atom-in-list
8.5.2`` Literal sets
kernel-literals

top← prev up next →

#### 8.5`` Library syntax classes and literal sets

##### 8.5.1`` Syntax classes

expr

Matches anything except a keyword literal (to distinguish expressions from the start of a keyword argument sequence). The term is not otherwise inspected, and no guarantee is made that the term is actually a valid expression.

identifier

boolean

str

char

keyword

number

integer

exact-integer

exact-nonnegative-integer

exact-positive-integer

Match syntax satisfying the corresponding predicates.

id

Alias for identifier.

nat

Alias for exact-nonnegative-integer.

(static predicate description)

Matches an identifier that is bound in the syntactic environment to static information (see syntax-local-value) satisfying the given predicate. If the term does not match, the description argument is used to describe the expected syntax.

When used outside of the dynamic extent of a macro transformer (see syntax-transforming?), matching fails.

The attribute value contains the value the name is bound to.

(atom-in-list atoms description)

Matches a syntax object whose inner datum is eqv? to some atom in the given list.

Use atom-in-list instead of a literals list when recognizing identifier based on their symbolic names rather than their bindings.

##### 8.5.2`` Literal sets

kernel-literals

Literal set containing the identifiers for fully-expanded code (Fully Expanded Programs). The set contains all of the forms listed by kernel-form-identifier-list, plus module, #%plain-module-begin, #%require, and #%provide.

Note that the literal-set uses the names #%plain-lambda and #%plain-app, not lambda and #%app.

top← prev up next →