#include "stdlib.h"
#include "stddef.h"
#include "string.h"
#include "ctype.h"
#include "stdio.h"
#include "tokenizer.h"
gehe zum Quellcode dieser Datei
#define DEBUG_PRINTF |
( |
|
...) | |
|
static int get_next_token |
( |
void |
) | |
|
|
static |
Definiert in Zeile 316 der Datei tokenizer.c.
324 while(*
ptr ==
' ' || *
ptr ==
'\t' || *
ptr ==
'\r')
ptr++;
340 DEBUG_PRINTF(
"get_next_token: error due to too short number\n");
345 DEBUG_PRINTF(
"get_next_token: error due to malformed number\n");
349 DEBUG_PRINTF(
"get_next_token: error due to too long number\n");
351 }
else if(*
ptr ==
':') {
366 while(*
ptr ==
' ' || *
ptr ==
'\t' || *
ptr ==
'\r')
ptr++;
374 }
else if(*
ptr ==
'"') {
393 if((*
ptr >=
'a' && *
ptr <=
'z') || (*
ptr >=
'A' && *
ptr <=
'Z')) {
static int singlechar |
( |
void |
) | |
|
|
static |
Definiert in Zeile 281 der Datei tokenizer.c.
285 }
else if(*
ptr ==
',') {
287 }
else if(*
ptr ==
';') {
289 }
else if(*
ptr ==
'+') {
291 }
else if(*
ptr ==
'-') {
293 }
else if(*
ptr ==
'&') {
295 }
else if(*
ptr ==
'|') {
297 }
else if(*
ptr ==
'^') {
299 }
else if(*
ptr ==
'*') {
301 }
else if(*
ptr ==
'/') {
303 }
else if(*
ptr ==
'%') {
305 }
else if(*
ptr ==
'(') {
307 }
else if(*
ptr ==
')') {
309 }
else if(*
ptr ==
'=') {
void tokenizer_error_print |
( |
void |
) | |
|
int tokenizer_finished |
( |
void |
) | |
|
void tokenizer_init |
( |
const char * |
program) | |
|
void tokenizer_label |
( |
char * |
dest, |
|
|
int |
len |
|
) |
| |
Definiert in Zeile 463 der Datei tokenizer.c.
474 if(string_end ==
NULL) {
477 string_len = string_end -
ptr - 1;
478 if(
len < string_len) {
481 memcpy(dest, ptr + 1, string_len);
482 dest[string_len] = 0;
int tokenizer_line_number |
( |
void |
) | |
|
void tokenizer_next |
( |
void |
) | |
|
int tokenizer_num |
( |
void |
) | |
|
void tokenizer_string |
( |
char * |
dest, |
|
|
int |
len |
|
) |
| |
Definiert in Zeile 442 der Datei tokenizer.c.
451 if(string_end ==
NULL) {
454 string_len = string_end -
ptr - 1;
455 if(
len < string_len) {
458 memcpy(dest, ptr + 1, string_len);
459 dest[string_len] = 0;
int tokenizer_token |
( |
void |
) | |
|
int tokenizer_variable_num |
( |
void |
) | |
|