lee@uhccux.UUCP (Greg Lee) (05/05/88)
Flex is great, and I'm really happy to have it. Here's a little
incompatibility with lex that I ran across. Would you expect
the following flex statment to match a ^ character? (There
are 2 tabs after the pattern.)
\^ printf("I saw a hat.");
It doesn't -- it matches a tab character instead.
Greg, lee@uhccux.uhcc.hawaii.eduvern%lbl-pistachio@LBL-RTSG.ARPA (Vern Paxson) (05/06/88)
Greg Lee mentioned a bug regarding "\^" not correctly matching a caret
in the input. This is due to a throw-back to the dark ages, and the
fix follows.
Vern
RCS/scan.l,v --> stdout
revision 1.3
*** scan.l Thu May 5 14:32:53 1988
--- /tmp/da1563 Thu May 5 14:36:11 1988
***************
*** 48,54 ****
SCNAME {NAME}
! ESCSEQ \\([^\n]|0[0-9]{1,3})
%%
static int bracelevel, didadef;
--- 48,54 ----
SCNAME {NAME}
! ESCSEQ \\([^^\n]|"^".|0[0-9]{1,3})
%%
static int bracelevel, didadef;