|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T i
Length: 1402 (0x57a)
Types: TextFile
Names: »indexlex.l«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
└─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z«
└─⟦036c765ac⟧
└─⟦this⟧ »TeX3.0/LaTeX/LaTeXindex/indexlex.l«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
└─⟦this⟧ »./tex82/LaTeX/LaTeXindex/indexlex.l«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
└─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z«
└─⟦c58930e5c⟧
└─⟦this⟧ »TeX3.14/LaTeX/LaTeXindex/indexlex.l«
/* $Header: indexlex.l,v 1.3 87/08/25 13:45:14 control Exp $ */
/* Lex Lexical Analyzer for LaTeX index processor */
/* Roman numeral code written by John Renner (adobe!renner@decwrl.dec.com) */
%{
#undef input
#define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(InputFile)) \
==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
%}
letter [A-Za-z]
integer -?[0-9]{1,9}
roman [mdclxvi]+
whitespace [ \t\n]
%%
\\indexentry {
LineNo = EndLineNo;
return(INDEXENTRY);
}
{roman} {
LineNo = EndLineNo;
strcpy(yylval.value, yytext);
return(ROMAN);
}
\\{letter}+ { /* Control word */
LineNo = EndLineNo;
strcpy(yylval.value, yytext);
return(CONTROLSEQUENCE);
}
\\[^{letter}] { /* Control symbol */
LineNo = EndLineNo;
strcpy(yylval.value, yytext);
return(CONTROLSEQUENCE);
}
{integer} {
LineNo = EndLineNo;
strcpy(yylval.value, yytext);
return(INTEGER);
}
\{ |
\} |
\, {
LineNo = EndLineNo;
return(yytext[0]);
}
{whitespace}+ {
char *p; /* Utility variable */
LineNo = EndLineNo;
for (p = yytext; *p; p++)
if (*p == '\n')
EndLineNo++;
strcpy(yylval.value, yytext);
return(WHITESPACE);
}
[^\\\{\}\, \t\n0-9]+ {
LineNo = EndLineNo;
strcpy(yylval.value, yytext);
return(STRING);
}
%%