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 - download
Index: ┃ T s

⟦843d831fb⟧ TextFile

    Length: 879 (0x36f)
    Types: TextFile
    Names: »scan.l«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/untamo/scan.l« 

TextFile


%{
/*
 *  Lex grammer to scan input file for untamo
 */
#include <stdio.h>
#include "y.tab.h"
#define makestr(Z)	((char *)strcpy(malloc(strlen(Z)+1),Z))
int linenum = 1;	/* current line number for error messages */
%}

%%
exempt		return EXEMPT;
timeout		return TIMEOUT;
sleep		return SLEEP;
login		return LOGIN;
group		return GROUP;
tty		return TTY;
rld		return RLD;
cluster		return CLUSTER;
default		return DEFAULT;
idle		return IDLE;
multiple	return MULTIPLE;
session		return SESSION;
threshold	return THRESHOLD;
all		return ALL;

[/A-Za-z][/A-Za-z0-9_]*	{   
		    yylval.sb = makestr(yytext);
		    return NAME; 
		}

[0-9]+		{
		    yylval.nb = atoi(yytext);
		    return NUM;
		}

"*".*		;
"\n"		{ 
		    linenum++; 
		    return NL;
		}
[ \t]*		;
.		{
		    static char *errormsg ="Illegal character ' '.";

		    errormsg[19] = yytext[0];
		    yyerror( errormsg );
		}