parser/lexer.ll
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:58:00 +0100
changeset 8 96d16dfe787a
parent 5 d752cbe8208e
child 9 c3fecc82ade6
permissions -rw-r--r--
We use return EXIT_SUCCESS instead of return 0 committer: Markus Bröker <mbroeker@largo.homelinux.org>

/* 
 *  $Id$
 * $URL$
 */

%{
	#include <stdio.h>
	#include "parser.h"
%}

%%

[0-9]+			{ yylval = atoi(yytext); return DIGIT;    }
[a-zA-Z]		{ yylval = yytext[0]; return LETTER;      }
"+"			return PLUS;	     
"-"			return MINUS;       
"*"			return MUL;         
"/"			return DIV;       
"("|")"|"="		return yytext[0]; 
[ \t]+			;
\n			return yytext[0];
.			printf("FEHLER: %s\n", yytext);
%%