parser/calc/lexer.l
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:50:39 +0200
changeset 68 d549894aa6a9
parent 39 46d7ec9d63bd
permissions -rw-r--r--
Trivial Changes I have made trivial changes to the fts component and renamed the set_limit function to set_proc_limit. It makes it clear that we are dealing with LIMIT_NPROC and not LIMIT_AS settings. committer: Markus Bröker <mbroeker@largo.homelinux.org>

/**
 * test/demos/parser/lexer.ll
 * Copyright (C) 2008 Markus Broeker
 */

%{
    #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); }
%%