[project @ 1998-02-19 20:52:19 by sof]
authorsof <unknown>
Thu, 19 Feb 1998 20:52:19 +0000 (20:52 +0000)
committersof <unknown>
Thu, 19 Feb 1998 20:52:19 +0000 (20:52 +0000)
- Handle \begin{code} ... \end{code} + <code> ... </code>

glafp-utils/sgmlverb/sgmlverb.lex

index daa20ae..d6ce058 100644 (file)
@@ -40,11 +40,15 @@ miranda                     ([0-9]+(\-([0-9]+)?)?)?>
 <VERB>\~               { printf ("&tilde;"); }
 <VERB>\^               { printf ("&circ;"); }
 
-<NORM>\<verb\>         { printf ("<verb>"); PUSH NORM; BEGIN VERBENV; }
-<VERBENV>\<\/verb\>    { printf ("</verb>"); POP; }
-<VERBENV>\&\&          { printf ("&"); }
-<VERBENV>\&            { printf ("&ero;"); }
-<VERBENV>\<\/          { printf ("&etago;"); }
+<NORM>\<verb\>          { printf ("<verb>"); PUSH NORM; BEGIN VERBENV; }
+<NORM>\<code\>          { printf ("<code>"); PUSH NORM; BEGIN VERBENV; }
+<NORM>\\begin\{code\}   { printf ("<code>"); PUSH NORM; BEGIN VERBENV; }
+<VERBENV>\<\/verb\>     { printf ("</verb>"); POP; }
+<VERBENV>\<\/code\>     { printf ("</code>"); POP; }
+<VERBENV>\<\\end\{code\} { printf ("</code>"); POP; }
+<VERBENV>\&\&           { printf ("&"); }
+<VERBENV>\&             { printf ("&ero;"); }
+<VERBENV>\<\/           { printf ("&etago;"); }
 
 %%
 int