in reply to Parse::RecDescent Grammar Fun
although I have not tested it.punct: /[^\w\s]/ {print "<punct: $item[1]>" }
Otherwise, you may want to try something like (also untested):
punct: /(?:[^\w\s[]+|\[[^\w\s[]*|\[\[(?!.+?]]))+/ {print "<punct: $item[1]>"}
Note that your link rule consumes "[[]]]" completely, as a leading [[, a ] as the content, and a trailing ]]. Similary, "[[]] foo [[]]" is consumed by the link rule completely, with "]] foo [[" as the part inside the 'link'.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parse::RecDescent Grammar Fun
by ichimunki (Priest) on Jul 25, 2002 at 14:21 UTC |