Debian Codegraph @

test/T_SetParentChild/grammar.cg3

raw
1 DELIMITERS = "<$.>" ;
2 MAPPING-PREFIX = ยง ;
3
4 ADD (vis) _S_DELIMITERS_ ;
5 SETPARENT _S_DELIMITERS_ TO (@0 (*)) ;
6
7 # These two are equivalent
8 SETCHILD (N) TO (-1* (@>N)) ;
9 SETPARENT (@>N) TO (1* (N)) ;
10
11 SETPARENT (@P<) TO (-1* (PRP)) ;
12
13 SETPARENT (@ADVL) (0 (PRP)) TO (-1* (ADV)) (0 (@ADVL)) ;
14 # This one will only apply to things not matched by the previous one
15 SETPARENT SAFE (@ADVL) TO (1 (*)) ;
16
17 ADD (@notp) (*) (NOT p (*)) ;
18 ADD (@nonep) (*) (NONE p (*)) ;
19 ADD (@negatep) (*) (NEGATE p (*)) ;