The left hand side of rewriting rules contains a pattern.
Normal words are simply matched directly.
Metasyntax is introduced using a dollar sign.
The metasymbols are:
If any of these match,
they are assigned to the symbol
n for replacement on the right hand side,
n is the index in the LHS.
if the LHS:
$* Match zero or more tokens
$+ Match one or more tokens
$- Match exactly one token
$=x Match any phrase in class x
$~x Match any word not in class x
is applied to the input:
the rule will match, and the values passed to the RHS will be:
Additionally, the LHS can include
$@ to match zero tokens.
not bound to a
n on the RHS, and is normally only used when it stands alone
in order to match the null input.
[Contents] [Previous] [Next]
Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright © 1999 www.cotse.com. All rights reserved.
Last modified: Friday April 02, 1999.