www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

extensible-parser-specifications.scrbl (1844B)


      1 #lang scribble/manual
      2 @require[scribble/example
      3          "utils.rkt"
      4          @for-label[phc-toolkit/untyped
      5                     extensible-parser-specifications
      6                     generic-syntax-expanders
      7                     racket/base
      8                     syntax/parse
      9                     (only-in racket/base [... …])]]
     10 
     11 @title{extensible-parser-specifications}
     12 @author{@author+email["Suzanne Soy" "racket@suzanne.soy"]}
     13 
     14 Caveat: the mixins defined with @racket[define-eh-alternative-mixin] cannot be
     15 provided and used in a separate module. Unfortunately, I cannot think of an
     16 acceptable fix for this problem, as solving this would require extracting parts
     17 of the mixin while preserving the bindings of some identifiers, but altering the
     18 bindings of others. This means that for the foreseeable future, once a mixin is
     19 defined, can only be used via @racket[~mixin] (or by directly invoking it)
     20 within the same module.
     21 
     22 The regular and splicing syntax classes defined with
     23 @racket[#:define-syntax-class] and @racket[#:define-splicing-syntax-class] will
     24 work fine across module boundaries, however. Manually defined syntax classes,
     25 splicing syntax classes or ellipsis-head syntax classes will also work fine
     26 across module boundaries, even if they contain uses of @racket[~no-order] and
     27 @racket[~seq-no-order], and even if those special forms contain uses of mixins
     28 defined within the same module. In other words, as long as a definition of a
     29 mixin and all its uses via @racket[~mixin] are within the same module,
     30 everything else should work without surprises.
     31 
     32 @defmodule[extensible-parser-specifications]
     33 
     34 @include-section{defining-reusable-mixins.scrbl}
     35 @include-section{no-order.scrbl}
     36 @include-section{rest.scrbl}
     37 
     38 @include-section{pre-global-post-section.scrbl}
     39 
     40 @include-section{misc.scrbl}
     41 @include-section{forward-attributes.scrbl}
     42