8 Parsing and classifying syntax

The syntax/parse library provides a framework for describing and parsing syntax. Using syntax/parse, macro writers can define new syntactic categories, specify their legal syntax, and use them to write clear, concise, and robust macros. The library also provides a pattern-matching form, syntax-parse, which offers many improvements over syntax-case.

 (require syntax/parse)

    8.1 Quick Start

    8.2 Parsing and classifying syntax

      8.2.1 Parsing syntax

      8.2.2 Classifying syntax

      8.2.3 Pattern directives

      8.2.4 Pattern variables and attributes

      8.2.5 Inspection tools

    8.3 Syntax patterns

      8.3.1 Single-term patterns

      8.3.2 Head patterns

      8.3.3 Ellipsis-head patterns

      8.3.4 Action patterns

    8.4 Literal sets and Conventions

    8.5 Library syntax classes and literal sets

      8.5.1 Syntax classes

      8.5.2 Literal sets