X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=glafp-utils%2Fsgmlverb%2Fsgmlverb.lex;fp=glafp-utils%2Fsgmlverb%2Fsgmlverb.lex;h=0000000000000000000000000000000000000000;hb=0065d5ab628975892cea1ec7303f968c3338cbe1;hp=812cb8416c1fb32622824c7d40d2774de79061bb;hpb=28a464a75e14cece5db40f2765a29348273ff2d2;p=ghc-hetmet.git diff --git a/glafp-utils/sgmlverb/sgmlverb.lex b/glafp-utils/sgmlverb/sgmlverb.lex deleted file mode 100644 index 812cb84..0000000 --- a/glafp-utils/sgmlverb/sgmlverb.lex +++ /dev/null @@ -1,68 +0,0 @@ - - /* This Lex script acts as a filter to pre-process Latex files. - - It surrounds groups of lines beginning with a ">" sign, and - preceded and followed by a blank line, with \begin{verbatim} - and \end{verbatim}. The ">" may be preceded by a digit or digit - range (eg 4>, 2-5>, 3->); in this case the digits are removed. - They are meant to be used for filtering out versions. - - It takes words surrounded with @ signs (thus @letrec@) and makes them - come out in typewriter font, regardless of the current mode. - */ - -%START NORM VERB VERBENV -sp [ \t]* -nl {sp}\n{sp} -comment \%.*$ -miranda ([0-9]+(\-([0-9]+)?)?)?> -%{ -#define PUSH states[top++] = -#define POP BEGIN states[--top] -#define yywrap() 1 -#define YY_SKIP_YYWRAP -%} -%% - int states[256]; - int top; - BEGIN NORM; - top = 0; -@@ { printf ("@"); } -@ { printf (""); PUSH NORM; BEGIN VERB; } -\\% { printf ("%"); } -{comment} { } -@ { printf (""); POP; } -@@ { printf ("@"); } -\> { printf (">"); } -\< { printf ("<"); } -\# { printf ("#"); } -\$ { printf ("$"); } -\% { printf ("%"); } -\& { printf ("&"); } -\~ { printf ("˜"); } -\^ { printf ("ˆ"); } - -\ { printf (""); PUSH NORM; BEGIN VERBENV; } -\ { printf (""); PUSH NORM; BEGIN VERBENV; } -\\begin\{code\} { printf (""); PUSH NORM; BEGIN VERBENV; } -\<\/verb\> { printf (""); POP; } -\<\/code\> { printf (""); POP; } -\<\\end\{code\} { printf (""); POP; } -\&\& { printf ("&"); } -\& { printf ("&ero;"); } -\<\/ { printf ("&etago;"); } - -%% -int -main() -{ - yylex(); - return(0); -} - -/* -\_ { printf ("{\\char'137}"); } -\\ { printf ("{\\char'134}"); } -\{ { printf ("{\\char'173}"); } -\} { printf ("{\\char'175}"); } -*/