(a2ps.info)Syntax for the P-Rules
7.6.5 Syntax for the P-Rules
----------------------------
Note: P-Rules, for the definition of "P-rule".
Because of various short cuts, there are many ways to declare a rule:
RULES ::= RULE_1 ',' RULE_2...
RULE ::= '(' LHS RHS ')'
| LHS SRHS ;
LHS ::= STRING | REGEX ;
RHS ::= SRHS ',' ...
SRHS ::= LATEX-KEYWORD | EXPANSION FACE
EXPANSION ::= STRING | '\'NUM | <nothing>;
FACE ::= FACE-KEYWORD | <nothing>;
The rules are the following:
- If the left-hand side (lhs) is a regular expression, then it is
compiled with the following syntax bits:
#define RE_SYNTAX_A2PS \
(/* Allow char classes. */ \
RE_CHAR_CLASSES \
/* Be picky. */ \
| RE_CONTEXT_INVALID_OPS \
/* Allow intervals with `{' and `}', forbid invalid ranges. */\
| RE_INTERVALS | RE_NO_BK_BRACES | RE_NO_EMPTY_RANGES \
/* `(' and `)' are the grouping operators. */ \
| RE_NO_BK_PARENS \
/* `|' is the alternation. */ \
| RE_NO_BK_VBAR)
Basically it means that all of the possible operators are used, and
that they are in non-backslashed form. For instance '(' and ')'
stand for the group operator, while '\\(' stands for the character
'('. Note: Regular Expression Syntax,
for a detailed description of the regular expressions.
- If no EXPANSION is specified, then the matched string is used. For
instance '(/fo*/, NULL, Keyword)' applied on the source 'fooooo'
produces 'fooooo' in 'Keyword'.
- If no FACE is given, then
- if the context defines the default face, then this face is
used;
- if no default face is given, 'PLAIN' is used.
automatically generated by info2www version 1.2.2.9