added grammar-style for the ::= and | in grammars in redex typesetting
This commit is contained in:
parent
bd799c3db9
commit
d4c68e7359
|
@ -18,6 +18,7 @@
|
||||||
lw->pict
|
lw->pict
|
||||||
basic-text
|
basic-text
|
||||||
metafunction-text
|
metafunction-text
|
||||||
|
grammar-style
|
||||||
default-style
|
default-style
|
||||||
label-style
|
label-style
|
||||||
non-terminal-style
|
non-terminal-style
|
||||||
|
@ -755,6 +756,7 @@
|
||||||
(define non-terminal-subscript-style (make-parameter `(subscript . ,(non-terminal-style))))
|
(define non-terminal-subscript-style (make-parameter `(subscript . ,(non-terminal-style))))
|
||||||
(define non-terminal-superscript-style (make-parameter `(superscript . ,(non-terminal-style))))
|
(define non-terminal-superscript-style (make-parameter `(superscript . ,(non-terminal-style))))
|
||||||
(define default-style (make-parameter 'roman))
|
(define default-style (make-parameter 'roman))
|
||||||
|
(define grammar-style (make-parameter 'roman))
|
||||||
(define metafunction-style (make-parameter 'swiss))
|
(define metafunction-style (make-parameter 'swiss))
|
||||||
(define (metafunction-text str) ((current-text) str (metafunction-style) (metafunction-font-size)))
|
(define (metafunction-text str) ((current-text) str (metafunction-style) (metafunction-font-size)))
|
||||||
(define literal-style (make-parameter 'swiss))
|
(define literal-style (make-parameter 'swiss))
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
basic-text
|
basic-text
|
||||||
|
|
||||||
default-style
|
default-style
|
||||||
|
grammar-style
|
||||||
label-style
|
label-style
|
||||||
literal-style
|
literal-style
|
||||||
metafunction-style
|
metafunction-style
|
||||||
|
@ -587,11 +588,11 @@
|
||||||
extensions))]
|
extensions))]
|
||||||
[else info]))))
|
[else info]))))
|
||||||
|
|
||||||
(define (make-::=) (basic-text " ::= " (default-style)))
|
(define (make-::=) (basic-text " ::= " (grammar-style)))
|
||||||
(define (make-bar)
|
(define (make-bar)
|
||||||
(basic-text " | " (default-style))
|
(basic-text " | " (grammar-style))
|
||||||
#;
|
#;
|
||||||
(let ([p (basic-text " | " (default-style))])
|
(let ([p (basic-text " | " (grammar-style))])
|
||||||
(dc
|
(dc
|
||||||
(λ (dc dx dy)
|
(λ (dc dx dy)
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -2057,6 +2057,7 @@ cases appear. If it is a list of numbers, then only the selected cases appear (c
|
||||||
|
|
||||||
@deftogether[[
|
@deftogether[[
|
||||||
@defparam[label-style style text-style/c]{}
|
@defparam[label-style style text-style/c]{}
|
||||||
|
@defparam[grammar-style style text-style/c]{}
|
||||||
@defparam[literal-style style text-style/c]{}
|
@defparam[literal-style style text-style/c]{}
|
||||||
@defparam[metafunction-style style text-style/c]{}
|
@defparam[metafunction-style style text-style/c]{}
|
||||||
@defparam[non-terminal-style style text-style/c]{}
|
@defparam[non-terminal-style style text-style/c]{}
|
||||||
|
@ -2076,7 +2077,8 @@ The @racket[label-style] is used for the reduction rule label
|
||||||
names. The @racket[literal-style] is used for names that aren't
|
names. The @racket[literal-style] is used for names that aren't
|
||||||
non-terminals that appear in patterns. The
|
non-terminals that appear in patterns. The
|
||||||
@racket[metafunction-style] is used for the names of
|
@racket[metafunction-style] is used for the names of
|
||||||
metafunctions.
|
metafunctions. The @racket[grammar-style] is used for the ``::='' and ``|''
|
||||||
|
in grammars.
|
||||||
|
|
||||||
The @racket[non-terminal-style] is used for the names of non-terminals.
|
The @racket[non-terminal-style] is used for the names of non-terminals.
|
||||||
Two parameters style the text in the (optional) "underscore" component
|
Two parameters style the text in the (optional) "underscore" component
|
||||||
|
@ -2093,7 +2095,7 @@ The
|
||||||
after the underscore in non-terminal references.
|
after the underscore in non-terminal references.
|
||||||
|
|
||||||
The @racket[default-style] is used for parenthesis, the dot in dotted
|
The @racket[default-style] is used for parenthesis, the dot in dotted
|
||||||
lists, spaces, the separator words in the grammar, the
|
lists, spaces, the
|
||||||
"where" and "fresh" in side-conditions, and other places
|
"where" and "fresh" in side-conditions, and other places
|
||||||
where the other parameters aren't used.
|
where the other parameters aren't used.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user