%{
static char AlarmSpec_lex_id[] = "$Header: /usr/tiburon/unix/gui/tmacs/RCS/AlarmSpec.l,v 1.1 1998/03/18 16:33:54 oreilly Exp $";

/*
$Log: AlarmSpec.l,v $
Revision 1.1  1998/03/18 16:33:54  oreilly
Initial revision

 * Revision 1.4  97/08/13  08:44:39  08:44:39  oreilly (Thomas C. O'Reilly)
 * Added threshold and target keywords
 * 
 * Revision 1.3  97/05/20  16:31:33  16:31:33  oreilly (Thomas C. O'Reilly)
 * *** empty log message ***
 * 
 * Revision 1.2  96/07/22  10:46:09  10:46:09  oreilly (Thomas C. O'Reilly)
 * Added RCS stuff
 * 
*/
#include <string.h>
#include "AlarmSpec.tab.cc.h"

extern int lineNo = 1;
%}

word [^ \t\n]+


%%

[ \t]+        ;
#.*           ;
"priority"    { return PriorityKeyword; }
"mnemonic"    { return MnemonicKeyword; }
"ackAll"      { return AckAllKeyword; }
"forward"     { return ForwardKeyword; }
"threshold"   { return ThresholdKeyword; }
"target"      { return MonitorKeyword; }
[0-9]         { yylval.integer = atoi(yytext); return NumberToken; }
[a-zA-Z]+[a-zA-Z0-9_\.\-]* { yylval.string = strdup(yytext); return WordToken; }
\{            { return '{'; }
\}            { return '}'; }
=             { return '='; }
\n            { lineNo++; }
.             { return yytext[0]; }
%%

int alarmFileLineNo() {
  return lineNo;
}

int yywrap()
{
  return 1;
}

