parser/c_compiler/lexer.l
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:49:12 +0200
changeset 42 83b8151b966d
parent 39 46d7ec9d63bd
permissions -rw-r--r--
Klassenhierarchie erneuert, Codebase erneuert * Object -> Drawable -> ... * Surface stellt eine SDL Schnittstelle bereit * namespace pmc wurde aufgegeben * DEBUG Option im Makefile Bekannte Fehler: * Jedes Drawable muss wissen und checken, ob es gezeichnet werden kann oder nicht * Diese *P[i] = *P[i] + location Konstrukte machen mich irgendwie nervös... -> operator* entfernt... committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
     1
%{
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
     2
    #include <prototypes.h>
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
     3
    #include "parser.h"
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
     4
    int column = 0;
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
     5
    int c;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
     6
%}
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
     7
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
     8
D                        [0-9]
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
     9
L                        [a-zA-Z_]
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    10
H                        [a-fA-F0-9]
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    11
E                        [Ee][+-]?{D}+
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    12
FS                       (f|F|l|L)
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    13
IS                       (u|U|l|L)*
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    14
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    15
%%
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    16
"/*"                     { comment(); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    17
"#include <"             { c = input(); while ( c != '>') c = input();  }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    18
"#include \""            { c = input(); while ( c != '\"') c = input(); }
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    19
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    20
"auto"                   { count(); return(AUTO); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    21
"break"                  { count(); return(BREAK); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    22
"case"                   { count(); return(CASE); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    23
"char"                   { count(); return(CHAR); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    24
"const"                  { count(); return(CONST); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    25
"continue"               { count(); return(CONTINUE); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    26
"default"                { count(); return(DEFAULT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    27
"do"                     { count(); return(DO); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    28
"double"                 { count(); return(DOUBLE); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    29
"else"                   { count(); return(ELSE); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    30
"enum"                   { count(); return(ENUM); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    31
"extern"                 { count(); return(EXTERN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    32
"float"                  { count(); return(FLOAT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    33
"for"                    { count(); return(FOR); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    34
"goto"                   { count(); return(GOTO); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    35
"if"                     { count(); return(IF); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    36
"int"                    { count(); return(INT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    37
"long"                   { count(); return(LONG); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    38
"register"               { count(); return(REGISTER); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    39
"return"                 { count(); return(RETURN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    40
"short"                  { count(); return(SHORT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    41
"signed"                 { count(); return(SIGNED); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    42
"sizeof"                 { count(); return(SIZEOF); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    43
"static"                 { count(); return(STATIC); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    44
"struct"                 { count(); return(STRUCT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    45
"switch"                 { count(); return(SWITCH); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    46
"typedef"                { count(); return(TYPEDEF); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    47
"union"                  { count(); return(UNION); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    48
"unsigned"               { count(); return(UNSIGNED); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    49
"void"                   { count(); return(VOID); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    50
"volatile"               { count(); return(VOLATILE); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    51
"while"                  { count(); return(WHILE); }
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    52
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    53
{L}({L}|{D})*            { count(); return(check_type()); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    54
0[xX]{H}+{IS}?           { count(); return(CONSTANT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    55
0{D}+{IS}?               { count(); return(CONSTANT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    56
{D}+{IS}?                { count(); return(CONSTANT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    57
'(\\.|[^\\'])+'          { count(); return(CONSTANT); }
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    58
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    59
{D}+{E}{FS}?             { count(); return(CONSTANT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    60
{D}*"."{D}+({E})?{FS}?   { count(); return(CONSTANT); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    61
{D}+"."{D}*({E})?{FS}?   { count(); return(CONSTANT); }
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    62
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    63
\"(\\.|[^\\"])*\"        { count(); return(STRING_LITERAL); }
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
    64
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    65
">>="                    { count(); return(RIGHT_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    66
"<<="                    { count(); return(LEFT_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    67
"+="                     { count(); return(ADD_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    68
"-="                     { count(); return(SUB_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    69
"*="                     { count(); return(MUL_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    70
"/="                     { count(); return(DIV_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    71
"%="                     { count(); return(MOD_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    72
"&="                     { count(); return(AND_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    73
"^="                     { count(); return(XOR_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    74
"|="                     { count(); return(OR_ASSIGN); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    75
">>"                     { count(); return(RIGHT_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    76
"<<"                     { count(); return(LEFT_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    77
"++"                     { count(); return(INC_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    78
"--"                     { count(); return(DEC_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    79
"->"                     { count(); return(PTR_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    80
"&&"                     { count(); return(AND_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    81
"||"                     { count(); return(OR_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    82
"<="                     { count(); return(LE_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    83
">="                     { count(); return(GE_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    84
"=="                     { count(); return(EQ_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    85
"!="                     { count(); return(NE_OP); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    86
";"                      { count(); return(';'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    87
"{"                      { count(); return('{'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    88
"}"                      { count(); return('}'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    89
","                      { count(); return(','); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    90
":"                      { count(); return(':'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    91
"="                      { count(); return('='); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    92
"("                      { count(); return('('); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    93
")"                      { count(); return(')'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    94
"["                      { count(); return('['); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    95
"]"                      { count(); return(']'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    96
"."                      { count(); return('.'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    97
"&"                      { count(); return('&'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    98
"!"                      { count(); return('!'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
    99
"~"                      { count(); return('~'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   100
"-"                      { count(); return('-'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   101
"+"                      { count(); return('+'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   102
"*"                      { count(); return('*'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   103
"/"                      { count(); return('/'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   104
"%"                      { count(); return('%'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   105
"<"                      { count(); return('<'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   106
">"                      { count(); return('>'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   107
"^"                      { count(); return('^'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   108
"|"                      { count(); return('|'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   109
"?"                      { count(); return('?'); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   110
[ \t\v\n\f]              { count(); }
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   111
.                        { printf ("Unknown Token: %s\n", yytext); }
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   112
%%
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   113
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   114
int yywrap()
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   115
{
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   116
    /* stop after eof */
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   117
    return 1;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   118
}
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   119
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   120
int count()
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   121
{
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   122
    int i;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   123
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   124
    for (i = 0; yytext[i] != '\0'; i++)
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   125
        if (yytext[i] == '\n')
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   126
            column = 0;
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   127
        else if (yytext[i] == '\t')
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   128
            column += 4 - (column % 4);
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   129
        else
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   130
            column++;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   131
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   132
    return column;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   133
}
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   134
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   135
int check_type()
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   136
{
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   137
    return IDENTIFIER;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   138
}
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   139
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   140
void comment()
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   141
{
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   142
    int c;
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   143
39
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   144
    c = input();
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   145
    do {
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   146
        while ( c != '*')
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   147
            c = input();
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   148
        c=input();
46d7ec9d63bd Project Parser
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 37
diff changeset
   149
    } while(c != '/');
37
0fbbe329c3a2 demos/parser
Markus Bröker <mbroeker@largo.localnet>
parents:
diff changeset
   150
}