racket / redex

Other
93 stars 36 forks source link

render-language doesn't properly typeset some non-terminals for extended language #227

Closed wilbowma closed 4 years ago

wilbowma commented 4 years ago
#lang scribble/base
@; meow.scrbl
@; scribble --html meow.scrbl

@(require
  redex/reduction-semantics
  redex/pict)

@(define-language L1
  [e ::= any])
@(define-language L2
  [e ::= any])

@(define-union-language tagL (S. L1) (T. L2))
@(define-extended-language multiL tagL
  [e ::= S.e T.e])

@(define-extended-language fixed-multiL tagL
  [S.e ::= .... ]
  [T.e ::= .... ]
  [e ::= S.e T.e])

@(render-language multiL)

@(render-language fixed-multiL)

In the first pict, T.e and S.e are typeset as literals. In the second, they are correctly typeset as non-terminals.