Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Flex/examples/manual/   (Fast Lexical Analyzer Version 2.6©)  Datei vom 6.11.2012 mit Größe 1 kB image not shown  

Quelle  front.lex   Sprache: Lex

 
%{
#include <stdio.h>
#include <string.h>
#include "y.tab.h"                 /* this comes from bison        */

#define TRUE  1
#define FALSE 0

#define copy_and_return(token_type) { strcpy(yylval.name,yytext); \
                                      return(token_type); }

int             yylexlinenum = 0;  /* so we can count lines        */
%}

%%
                            /* Lexical scanning rules begin from here.  */

MEN|WOMEN|STOCKS|TREES      copy_and_return(NOUN)
MISTAKES|GNUS|EMPLOYEES     copy_and_return(NOUN)
LOSERS|USERS|CARS|WINDOWS   copy_and_return(NOUN)

DATABASE|NETWORK|FSF|GNU    copy_and_return(PROPER_NOUN)
COMPANY|HOUSE|OFFICE|LPF    copy_and_return(PROPER_NOUN)

THE|THIS|THAT|THOSE         copy_and_return(DECLARATIVE)

ALL|FIRST|LAST              copy_and_return(CONDITIONAL)

FIND|SEARCH|SORT|ERASE|KILL copy_and_return(VERB)
ADD|REMOVE|DELETE|PRINT     copy_and_return(VERB)

QUICKLY|SLOWLY|CAREFULLY    copy_and_return(ADVERB)

IN|AT|ON|AROUND|INSIDE|ON   copy_and_return(POSITIONAL)

"."                         return(PERIOD);                             
"\n"                        yylexlinenum++; return(NEWLINE);            
.                                                                       
%%


¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.