|
Lines 26-31
Link Here
|
| 26 |
|
26 |
|
| 27 |
#include <string.h> |
27 |
#include <string.h> |
| 28 |
#include <stdlib.h> |
28 |
#include <stdlib.h> |
|
|
29 |
#include <locale.h> |
| 29 |
|
30 |
|
| 30 |
struct symbol |
31 |
struct symbol |
| 31 |
{ |
32 |
{ |
|
Lines 286-292
Link Here
|
| 286 |
{hexinteger} { count(); yylval.number = strtol(yytext+2, NULL, 16); return B256INTEGER; } |
287 |
{hexinteger} { count(); yylval.number = strtol(yytext+2, NULL, 16); return B256INTEGER; } |
| 287 |
{octalinteger} { count(); yylval.number = strtol(yytext+2, NULL, 8); return B256INTEGER; } |
288 |
{octalinteger} { count(); yylval.number = strtol(yytext+2, NULL, 8); return B256INTEGER; } |
| 288 |
{binaryinteger} { count(); yylval.number = strtol(yytext+2, NULL, 2); return B256INTEGER; } |
289 |
{binaryinteger} { count(); yylval.number = strtol(yytext+2, NULL, 2); return B256INTEGER; } |
| 289 |
{floatnum} { count(); yylval.floatnum = atof(yytext); return B256FLOAT; } |
290 |
{floatnum} { count(); setlocale(LC_NUMERIC, "POSIX"); yylval.floatnum = atof(yytext); return B256FLOAT; } |
| 290 |
{string} { int len; count(); len = strlen(yytext); |
291 |
{string} { int len; count(); len = strlen(yytext); |
| 291 |
yylval.string = strdup(yytext + 1); |
292 |
yylval.string = strdup(yytext + 1); |
| 292 |
yylval.string[len - 2] = 0; |
293 |
yylval.string[len - 2] = 0; |