DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T d

⟦e38d75363⟧ TextFile

    Length: 956 (0x3bc)
    Types: TextFile
    Names: »doc2sty.l«

Derivation

└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./babel/swedish/SLaTeX/doc2sty/doc2sty.l« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦23cd347d5⟧ »unix3.0/babel.tar.Z« 
        └─⟦2fb9f645a⟧ 
            └─⟦this⟧ »babel/swedish/SLaTeX/doc2sty/doc2sty.l« 

TextFile

%{
#ifndef lint
static char *copyright = "Copyright (C) 1985, Sven Mattisson.";
#endif


/*
 * $Log:	doc2sty.l,v $
 * Revision 1.1  86/01/15  22:17:59  sven
 * Initial revision
 * 
 */

%}
%START	BOL INL
S	[ \t]+
T	[ \t]*
W	[ \t\f\n]
X	[^{W}]
%%
<BOL>^{T}%.*\n		;   /* comment line(s) */
<INL>{S}%.*\n		|
<INL>%.*\n/{W}		{putchar ('\n'); BEGIN BOL;}	/* trailing comment */
<INL>%.*\n/{X}		{printf ("%%\n"); BEGIN BOL;}	/* tricky comment */
<BOL>^{T}\n		;   /* empty line */
<BOL>^{S}		;   /* strip leading spaces */
<INL>{S}$		;   /* strip trailing spaces */
<INL>{S}/[^%]		{putchar (' ');}	/* compress spaces */
\\" "			|
.			{ECHO; BEGIN INL;}
\n			{ECHO; BEGIN BOL;}
%%
main(argc,argv)
	char **argv;
{
    int i;

    BEGIN BOL;
    if (argc==1) {
	yyin = stdin;
	yylex();
    } else for (i=1; i<argc; i++) {
	yyin = fopen(argv[i],"r");
	if (yyin==NULL) {
	    fprintf(stderr,"can't open %s\n",argv[i]);
	    exit(1);
	}
	yylex();
    }
    exit(0);
}