Looking for pattern matchers
VanZandt
jrv at sdimax2.mitre.org
Fri Mar 1 23:51:46 AEST 1991
In article <1156 at nikhefh.nikhef.nl> a38 at nikhefh.nikhef.nl (James Barr) writes:
>can anyone point me towards a regular expression matcher
>that acts like lex in that you can add a number of different
>expressions so that a token is returned on matching a
>particular expression.
Henry Spencer's regular expression routine initializes an array of pointers
corresponding to the open parentheses in the regular expression. How about
consolidating the REs into one big RE and determining which subexpressions
matched by testing which pointers are set:
(able)|(baker)|(charlie)
Note: I haven't tried this.
- Jim Van Zandt
More information about the Comp.lang.c
mailing list