| 1 |
DELIMITERS = "<$.>" ; |
| 2 |
PARENTHESES = ("<$(>" "<$)>") ("<$[>" "<$]>") ("<${>" "<$}>") ("<$<>" "<$>>") ("<$«>" "<$»>") (<pleft> <pright>) ; |
| 3 |
|
| 4 |
# Special sets _ENCL_, _LEFT_, _RIGHT_, and _PAREN_ |
| 5 |
ADD (@encl) _ENCL_ ; |
| 6 |
ADD (@left) _LEFT_ ; |
| 7 |
ADD (@right) _RIGHT_ ; |
| 8 |
ADD (@left-or-right) _PAREN_ ; |
| 9 |
|
| 10 |
# Special tags _LEFT_ and _RIGHT_ |
| 11 |
ADD (@left-paren) (_LEFT_) + ("<$(>") ; |
| 12 |
ADD (@right-sqbrck) (_RIGHT_) + ("<$]>") ; |
| 13 |
|
| 14 |
# The special positions L and R which are only valid inside an enclosure |
| 15 |
ADD (@enclosed) (*) (L (*)) ; |
| 16 |
ADD (@sqbrck) (*) (L ("<$[>")) ; |
| 17 |
ADD (@paren) (*) (R ("<$)>")) ; |
| 18 |
ADD (@clbrck) (*) (R ("<$}>")) ; |
| 19 |
|
| 20 |
# Rule options |
| 21 |
# In this case, they have to be substitute since the reading may already be mapped |
| 22 |
SUBSTITUTE ENCL_INNER (word) (word @inner) (*) ; |
| 23 |
SUBSTITUTE ENCL_OUTER (word) (word @outer) (*) ; |
| 24 |
SUBSTITUTE ENCL_FINAL (word) (word @final) (*) ; |
| 25 |
|
| 26 |
END |
| 27 |
# Marking the order of application |
| 28 |
MAP (@sixth) (*) (0** (@fifth)) ; |
| 29 |
MAP (@fifth) (*) (0** (@fourth)) ; |
| 30 |
MAP (@fourth) (*) (0** (@third)) ; |
| 31 |
MAP (@third) (*) (0** (@second)) ; |
| 32 |
MAP (@second) (*) (0** (@first)) ; |
| 33 |
MAP (@first) (*) ; |
| 34 |
|