Lines 1-122
Link Here
|
1 |
--- detex.l.orig Thu Aug 12 08:54:46 1993 |
|
|
2 |
+++ detex.l Mon Feb 17 23:01:15 1997 |
3 |
@@ -76,7 +76,7 @@ |
4 |
|
5 |
<Normal>"\\begin"{S}"{"{S}"document"{S}"}" {fLatex = !fForcetex; IGNORE;} |
6 |
|
7 |
-<Normal>"\\begin" /* environment start */ {LaBEGIN LaBegin; IGNORE;} |
8 |
+<Normal>"\\begin" {/* environment start */ LaBEGIN LaBegin; IGNORE;} |
9 |
|
10 |
<LaBegin>{S}"{"{S}"verbatim"{S}"}" { if (BeginEnv("verbatim")) |
11 |
BEGIN LaEnv; |
12 |
@@ -85,8 +85,8 @@ |
13 |
IGNORE; |
14 |
} |
15 |
|
16 |
-<LaVerbatim>"\\end"{S}"{"{S}"verbatim"{S}"}" /* verbatim mode */ |
17 |
- {BEGIN Normal; IGNORE;} |
18 |
+<LaVerbatim>"\\end"{S}"{"{S}"verbatim"{S}"}" {/* verbatim mode */ |
19 |
+ BEGIN Normal; IGNORE;} |
20 |
<LaVerbatim>. ECHO; |
21 |
|
22 |
<LaBegin>{W} { if (BeginEnv(yytext)) |
23 |
@@ -98,11 +98,11 @@ |
24 |
<LaBegin>"\n" NEWLINE; |
25 |
<LaBegin>. ; |
26 |
|
27 |
-<LaEnv>"\\end" /* absorb some environments */ {LaBEGIN LaEnd; IGNORE;} |
28 |
+<LaEnv>"\\end" {/* absorb some environments */ LaBEGIN LaEnd; IGNORE;} |
29 |
<LaEnv>"\n" NEWLINE; |
30 |
<LaEnv>. ; |
31 |
|
32 |
-<LaEnd>{W} /* end environment */ { if (EndEnv(yytext)) |
33 |
+<LaEnd>{W} {/* end environment */ if (EndEnv(yytext)) |
34 |
BEGIN Normal; |
35 |
IGNORE; |
36 |
} |
37 |
@@ -110,8 +110,8 @@ |
38 |
<LaEnd>"\n" NEWLINE; |
39 |
<LaEnd>. ; |
40 |
|
41 |
-<Normal>"\\bibitem" /* ignore args */ {LaBEGIN LaMacro2; IGNORE;} |
42 |
-<Normal>"\\bibliography" /* of these \cs */ {LaBEGIN LaMacro; IGNORE;} |
43 |
+<Normal>"\\bibitem" {/* ignore args */ LaBEGIN LaMacro2; IGNORE;} |
44 |
+<Normal>"\\bibliography" {/* of these \cs */ LaBEGIN LaMacro; IGNORE;} |
45 |
<Normal>"\\bibstyle" {LaBEGIN LaMacro; IGNORE;} |
46 |
<Normal>"\\cite" {CITEBEGIN LaMacro2; IGNORE;} |
47 |
<Normal>"\\documentstyle" {LaBEGIN LaMacro; IGNORE;} |
48 |
@@ -122,8 +122,8 @@ |
49 |
<Normal>"\\pagestyle" {LaBEGIN LaMacro; IGNORE;} |
50 |
<Normal>"\\ref" {CITEBEGIN LaMacro; IGNORE;} |
51 |
<Normal>"\\setcounter" {LaBEGIN LaMacro; IGNORE;} |
52 |
-<Normal>"\\verb" /* ignore \verb<char>...<char> */ |
53 |
- { if (fLatex) { |
54 |
+<Normal>"\\verb" {/* ignore \verb<char>...<char> */ |
55 |
+ if (fLatex) { |
56 |
char verbchar, c; |
57 |
verbchar = input(); |
58 |
while ((c = input()) != verbchar) |
59 |
@@ -143,33 +143,33 @@ |
60 |
<LaMacro2>"\n" NEWLINE; |
61 |
<LaMacro2>. ; |
62 |
|
63 |
-<Normal>"\\def" /* ignore def begin */ {BEGIN Define; IGNORE;} |
64 |
+<Normal>"\\def" {/* ignore def begin */ BEGIN Define; IGNORE;} |
65 |
<Define>"{" BEGIN Normal; |
66 |
<Define>"\n" NEWLINE; |
67 |
<Define>. ; |
68 |
|
69 |
-<Normal>"\\(" /* formula mode */ {LaBEGIN LaFormula; IGNORE;} |
70 |
+<Normal>"\\(" {/* formula mode */ LaBEGIN LaFormula; IGNORE;} |
71 |
<LaFormula>"\\)" BEGIN Normal; |
72 |
<LaFormula>"\n" NEWLINE; |
73 |
<LaFormula>. ; |
74 |
|
75 |
-<Normal>"\\[" /* display mode */ {LaBEGIN LaDisplay; IGNORE;} |
76 |
+<Normal>"\\[" {/* display mode */ LaBEGIN LaDisplay; IGNORE;} |
77 |
<LaDisplay>"\\]" BEGIN Normal; |
78 |
<LaDisplay>"\n" NEWLINE; |
79 |
<LaDisplay>. ; |
80 |
|
81 |
-<Normal>"$$" /* display mode */ {BEGIN Display; IGNORE;} |
82 |
+<Normal>"$$" {/* display mode */ BEGIN Display; IGNORE;} |
83 |
<Display>"$$" BEGIN Normal; |
84 |
<Display>"\n" NEWLINE; |
85 |
<Display>. ; |
86 |
|
87 |
-<Normal>"$" /* math mode */ {BEGIN Math; IGNORE;} |
88 |
+<Normal>"$" {/* math mode */ BEGIN Math; IGNORE;} |
89 |
<Math>"$" BEGIN Normal; |
90 |
<Math>"\n" NEWLINE; |
91 |
<Math>"\\$" ; |
92 |
<Math>. ; |
93 |
|
94 |
-<Normal>"\\include" /* process files */ {LaBEGIN LaInclude; IGNORE;} |
95 |
+<Normal>"\\include" {/* process files */ LaBEGIN LaInclude; IGNORE;} |
96 |
<LaInclude>[^{ \t\n}]+ { IncludeFile(yytext); |
97 |
BEGIN Normal; |
98 |
} |
99 |
@@ -192,11 +192,11 @@ |
100 |
<Input>"\n" NEWLINE; |
101 |
<Input>. ; |
102 |
|
103 |
-<Normal>\\(aa|AA|ae|AE|oe|OE|ss)[ \t]*[ \t\n}] /* handle ligatures */ |
104 |
- {(void)printf("%.2s", yytext+1);} |
105 |
+<Normal>\\(aa|AA|ae|AE|oe|OE|ss)[ \t]*[ \t\n}] {/* handle ligatures */ |
106 |
+ (void)printf("%.2s", yytext+1);} |
107 |
<Normal>\\[OoijLl][ \t]*[ \t\n}] {(void)printf("%.1s", yytext+1);} |
108 |
|
109 |
-<Normal>\\[a-zA-Z@]+ /* ignore other \cs */ {BEGIN Control; IGNORE;} |
110 |
+<Normal>\\[a-zA-Z@]+ {/* ignore other \cs */ BEGIN Control; IGNORE;} |
111 |
<Normal>"\\ " SPACE; |
112 |
<Normal>\\. IGNORE; |
113 |
<Control>\\[a-zA-Z@]+ IGNORE; |
114 |
@@ -205,7 +205,7 @@ |
115 |
<Control>[ \t]*[{]* {BEGIN Normal; IGNORE;} |
116 |
<Control>. {yyless(0);BEGIN Normal;} |
117 |
|
118 |
-<Normal>[{}\\|] /* special characters */ IGNORE; |
119 |
+<Normal>[{}\\|] {/* special characters */ IGNORE;} |
120 |
<Normal>[!?]"`" IGNORE; |
121 |
<Normal>~ SPACE; |
122 |
|