add identifier to parser

This commit is contained in:
2025-06-01 02:28:27 +01:00
parent b7e9493171
commit d2518afb8e
20 changed files with 733 additions and 251 deletions

View File

@@ -1,5 +1,5 @@
#include "lex.yy.h"
#include "lexer.h" #include "lexer.h"
#include "lex.yy.h"
void lexer(LexerState state) { void lexer(LexerState state) {
yyscan_t scanner; yyscan_t scanner;
@@ -12,12 +12,9 @@ void lexer(LexerState state) {
int token; int token;
while ((token = yylex(scanner)) != 0) { while ((token = yylex(scanner)) != 0) {
Token * token_struct = create_token( Token *token_struct =
token, create_token(token, yyget_lineno(scanner), state.current_column + 1,
yyget_lineno(scanner), yyget_text(scanner));
state.current_column+1,
yyget_text(scanner)
);
darray_push(state.tokens, token_struct); darray_push(state.tokens, token_struct);
free(token_struct); free(token_struct);
if (token == TOKEN_NEW_LINE) { if (token == TOKEN_NEW_LINE) {

View File

@@ -1,19 +1,18 @@
#ifndef LEXER_H #ifndef LEXER_H
#define LEXER_H #define LEXER_H
#include "token.h"
#include "../dynamic_array/darray.h" #include "../dynamic_array/darray.h"
#include "token.h"
#include <stdio.h> #include <stdio.h>
typedef struct { typedef struct {
const char *path; const char *path;
FILE *file; FILE *file;
int current_column; int current_column;
DArray* tokens; DArray *tokens;
// add more fields as needed // add more fields as needed
} LexerState; } LexerState;
void lexer(LexerState state); void lexer(LexerState state);
#endif // LEXER_H #endif // LEXER_H

View File

@@ -1,17 +1,17 @@
#include "token.h" #include "token.h"
#include <stdlib.h>
#include "../string/string.h" #include "../string/string.h"
#include <stdlib.h>
Token *create_token(TokenType type, int line, int column, char *value) { Token *create_token(TokenType type, int line, int column, char *value) {
Token * token = malloc(sizeof(Token)); Token *token = malloc(sizeof(Token));
token->type = type; token->type = type;
token->line=line; token->line = line;
token->column=column; token->column = column;
token->value=cloneString(value); token->value = cloneString(value);
return token; return token;
} }
void free_token(void * ptr) { void free_token(void *ptr) {
Token* token = ptr; Token *token = ptr;
free(token->value); free(token->value);
} }

View File

@@ -1,7 +1,7 @@
#include "list.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "list.h"
LinkedList *create_list(size_t data_size) { LinkedList *create_list(size_t data_size) {
LinkedList *list = malloc(sizeof(LinkedList)); LinkedList *list = malloc(sizeof(LinkedList));
@@ -21,14 +21,16 @@ void append(LinkedList *list, void *element) {
list->head = new_node; list->head = new_node;
} else { } else {
Node *temp = list->head; Node *temp = list->head;
while (temp->next) temp = temp->next; while (temp->next)
temp = temp->next;
temp->next = new_node; temp->next = new_node;
} }
list->length++; list->length++;
} }
void *get_element_at(LinkedList *list, size_t index) { void *get_element_at(LinkedList *list, size_t index) {
if (index >= list->length) return NULL; if (index >= list->length)
return NULL;
Node *current = list->head; Node *current = list->head;
for (size_t i = 0; i < index; ++i) for (size_t i = 0; i < index; ++i)
@@ -38,7 +40,8 @@ void *get_element_at(LinkedList *list, size_t index) {
} }
int set_element_at(LinkedList *list, size_t index, void *element) { int set_element_at(LinkedList *list, size_t index, void *element) {
if (index >= list->length) return 0; if (index >= list->length)
return 0;
Node *current = list->head; Node *current = list->head;
for (size_t i = 0; i < index; ++i) for (size_t i = 0; i < index; ++i)
@@ -49,7 +52,8 @@ int set_element_at(LinkedList *list, size_t index, void *element) {
} }
int remove_at(LinkedList *list, size_t index) { int remove_at(LinkedList *list, size_t index) {
if (index >= list->length) return 0; if (index >= list->length)
return 0;
Node *temp = list->head; Node *temp = list->head;
Node *prev = NULL; Node *prev = NULL;
@@ -70,9 +74,7 @@ int remove_at(LinkedList *list, size_t index) {
return 1; return 1;
} }
size_t list_length(LinkedList *list) { size_t list_length(LinkedList *list) { return list->length; }
return list->length;
}
void print_list(LinkedList *list, void (*print_func)(void *)) { void print_list(LinkedList *list, void (*print_func)(void *)) {
Node *current = list->head; Node *current = list->head;

View File

@@ -1,26 +1,23 @@
#include "dynamic_array/darray.h"
#include "lexer/lexer.h" #include "lexer/lexer.h"
#include "lexer/token.h" #include "lexer/token.h"
#include "parser/parser.h"
#include "memory.h" #include "memory.h"
#include "dynamic_array/darray.h" #include "parser/parser.h"
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
int main() { int main(int argc, char *argv[]) {
if (argc <= 1)
return -1;
ar_memory_init(); ar_memory_init();
char * path = "test.ar"; char *path = argv[1];
DArray tokens; DArray tokens;
darray_init(&tokens, sizeof(Token)); darray_init(&tokens, sizeof(Token));
LexerState state = { LexerState state = {path, fopen(path, "r"), 0, &tokens};
path,
fopen(path, "r"),
0,
&tokens
};
lexer(state); lexer(state);
fclose(state.file); fclose(state.file);
@@ -28,11 +25,10 @@ int main() {
darray_init(&ast, sizeof(ParsedValue)); darray_init(&ast, sizeof(ParsedValue));
parser(path, &ast, &tokens, false);
parser(path,&ast, &tokens, false);
darray_free(&tokens, free_token); darray_free(&tokens, free_token);
darray_free(&ast,free_parsed); darray_free(&ast, free_parsed);
return 0; return 0;
} }

View File

@@ -1,23 +1,17 @@
#include "memory.h" #include "memory.h"
#include <gc.h> #include <gc.h>
#include <string.h>
#include <stdlib.h> // for malloc/free (temp arena fallback) #include <stdlib.h> // for malloc/free (temp arena fallback)
#include <string.h>
void ar_memory_init() { void ar_memory_init() { GC_INIT(); }
GC_INIT();
}
void* ar_alloc(size_t size) { void *ar_alloc(size_t size) { return GC_MALLOC(size); }
return GC_MALLOC(size);
}
void* ar_alloc_atomic(size_t size) { void *ar_alloc_atomic(size_t size) { return GC_MALLOC_ATOMIC(size); }
return GC_MALLOC_ATOMIC(size);
}
char* ar_strdup(const char* str) { char *ar_strdup(const char *str) {
size_t len = strlen(str) + 1; size_t len = strlen(str) + 1;
char* copy = (char*)GC_MALLOC(len); char *copy = (char *)GC_MALLOC(len);
memcpy(copy, str, len); memcpy(copy, str, len);
return copy; return copy;
} }

View File

@@ -4,9 +4,9 @@
#include <stddef.h> // for size_t #include <stddef.h> // for size_t
// GC-managed allocations // GC-managed allocations
void* ar_alloc(size_t size); void *ar_alloc(size_t size);
void* ar_alloc_atomic(size_t size); void *ar_alloc_atomic(size_t size);
char* ar_strdup(const char* str); char *ar_strdup(const char *str);
// Memory init/shutdown // Memory init/shutdown
void ar_memory_init(); void ar_memory_init();

View File

@@ -5,7 +5,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
ParsedValue *parse_assign(char*file,DArray *parsed, DArray *tokens, ParsedValue *parse_assign(char *file, DArray *parsed, DArray *tokens,
ParsedValue *assign_to, size_t *index) { ParsedValue *assign_to, size_t *index) {
Token *token = darray_get(tokens, *index); Token *token = darray_get(tokens, *index);
ParsedAssign *assign = malloc(sizeof(ParsedAssign)); ParsedAssign *assign = malloc(sizeof(ParsedAssign));
@@ -28,16 +28,16 @@ ParsedValue *parse_assign(char*file,DArray *parsed, DArray *tokens,
default: default:
break; break;
} }
assign->from = parse_token(file,parsed, tokens, index, true); assign->from = parse_token(file, parsed, tokens, index, true);
ParsedValue *parsedValue = malloc(sizeof(ParsedValue)); ParsedValue *parsedValue = malloc(sizeof(ParsedValue));
parsedValue->type = AST_ASSIGN; parsedValue->type = AST_ASSIGN;
parsedValue->data = assign; parsedValue->data = assign;
return parsedValue; return parsedValue;
} }
void free_parse_assign(void*ptr) { void free_parse_assign(void *ptr) {
ParsedValue * parsedValue = ptr; ParsedValue *parsedValue = ptr;
ParsedAssign* parsedAssign = parsedValue->data; ParsedAssign *parsedAssign = parsedValue->data;
free_parsed(parsedAssign->to); free_parsed(parsedAssign->to);
free_parsed(parsedAssign->from); free_parsed(parsedAssign->from);
free(parsedAssign); free(parsedAssign);

View File

@@ -0,0 +1,12 @@
#include "identifier.h"
#include "../../lexer/token.h"
#include "../parser.h"
#include <stdlib.h>
#include <string.h>
ParsedValue *parse_identifier(Token *token) {
ParsedValue *parsedValue = malloc(sizeof(ParsedValue));
parsedValue->type = AST_IDENTIFIER;
parsedValue->data = strcpy(malloc(sizeof(token->value)), token->value);
return parsedValue;
}

View File

@@ -0,0 +1,11 @@
// parser.h
#ifndef IDENTIFIER_H
#define IDENTIFIER_H
#include "../parser.h"
#include "../../lexer/token.h" // for Token
// Function declaration for parsing an identifier
ParsedValue * parse_identifier(Token * token);
#endif // IDENTIFIER_H

View File

@@ -2,6 +2,7 @@
#include "../dynamic_array/darray.h" #include "../dynamic_array/darray.h"
#include "../lexer/token.h" #include "../lexer/token.h"
#include "assign/assign.h" #include "assign/assign.h"
#include "identifier/identifier.h"
#include "string/string.h" #include "string/string.h"
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
@@ -23,11 +24,11 @@ ParsedValue *parse_token(char *file, DArray *parsed, DArray *tokens,
(*index)++; (*index)++;
return parse_string(*token); return parse_string(*token);
case TOKEN_NEW_LINE: case TOKEN_NEW_LINE:
while (token->type == TOKEN_NEW_LINE && *index+1 <= tokens->size) { while (token->type == TOKEN_NEW_LINE && ++(*index) < tokens->size) {
(*index)++;
token = darray_get(tokens, *index); token = darray_get(tokens, *index);
} }
if (token->type == TOKEN_NEW_LINE) return NULL; if (token->type == TOKEN_NEW_LINE)
return NULL;
return parse_token(file, parsed, tokens, index, inline_flag); return parse_token(file, parsed, tokens, index, inline_flag);
case TOKEN_INDENT: case TOKEN_INDENT:
fprintf(stderr, "%s:%u:%u error: invalid indentation\n", file, token->line, fprintf(stderr, "%s:%u:%u error: invalid indentation\n", file, token->line,
@@ -47,9 +48,13 @@ ParsedValue *parse_token(char *file, DArray *parsed, DArray *tokens,
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
ParsedValue *assign_to = malloc(sizeof(ParsedValue)); ParsedValue *assign_to = malloc(sizeof(ParsedValue));
memcpy(assign_to, darray_get(parsed, parsed->size-1), sizeof(ParsedValue)); memcpy(assign_to, darray_get(parsed, parsed->size - 1),
darray_resize(parsed, parsed->size-1); sizeof(ParsedValue));
darray_resize(parsed, parsed->size - 1);
return parse_assign(file, parsed, tokens, assign_to, index); return parse_assign(file, parsed, tokens, assign_to, index);
case TOKEN_IDENTIFIER:
(*index)++;
return parse_identifier(token);
default: default:
fprintf(stderr, "Panic: unreachable\n"); fprintf(stderr, "Panic: unreachable\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
@@ -72,6 +77,7 @@ void parser(char *file, DArray *parsed, DArray *tokens, bool inline_flag) {
void free_parsed(void *ptr) { void free_parsed(void *ptr) {
ParsedValue *parsed = ptr; ParsedValue *parsed = ptr;
switch (parsed->type) { switch (parsed->type) {
case AST_IDENTIFIER:
case AST_STRING: case AST_STRING:
free(parsed->data); free(parsed->data);
break; break;

View File

@@ -1,29 +1,28 @@
#ifndef PARSER_H #ifndef PARSER_H
#define PARSER_H #define PARSER_H
#include "../dynamic_array/darray.h"
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include "../dynamic_array/darray.h"
typedef struct LinkedList LinkedList; typedef struct LinkedList LinkedList;
typedef enum { typedef enum {
AST_STRING, AST_STRING,
AST_ASSIGN, AST_ASSIGN,
AST_IDENTIFIER,
} ValueType; } ValueType;
typedef struct { typedef struct {
ValueType type; ValueType type;
void *data; void *data;
} ParsedValue; } ParsedValue;
void parser(char*file,DArray *parsed, DArray *tokens, bool inline_flag); void parser(char *file, DArray *parsed, DArray *tokens, bool inline_flag);
ParsedValue *parse_token(char*file,DArray *parsed, DArray *tokens, size_t *index, bool inline_flag); ParsedValue *parse_token(char *file, DArray *parsed, DArray *tokens,
size_t *index, bool inline_flag);
void free_parsed(void *ptr); void free_parsed(void *ptr);
#endif // PARSER_H #endif // PARSER_H

View File

@@ -42,6 +42,7 @@ char *unquote(char *str) {
cJSON *json = cJSON_Parse(str); cJSON *json = cJSON_Parse(str);
if (!json || !cJSON_IsString(json)) { if (!json || !cJSON_IsString(json)) {
cJSON_Delete(json);
if (swapped) if (swapped)
free(swapped); free(swapped);
return NULL; return NULL;
@@ -71,9 +72,8 @@ char *unquote(char *str) {
return unescaped; return unescaped;
} }
ParsedValue * parse_string(Token token) { ParsedValue *parse_string(Token token) {
ParsedValue * parsedValue = malloc(sizeof(ParsedValue)); ParsedValue *parsedValue = malloc(sizeof(ParsedValue));
parsedValue->type = AST_STRING; parsedValue->type = AST_STRING;
parsedValue->data = unquote(token.value); parsedValue->data = unquote(token.value);
return parsedValue; return parsedValue;

View File

@@ -6,18 +6,15 @@
const char *WHITE_SPACE = " \t\n\r\f\v"; const char *WHITE_SPACE = " \t\n\r\f\v";
char *cloneString(char *str) char *cloneString(char *str) {
{ if (str == NULL) {
if (str == NULL)
{
return NULL; return NULL;
} }
size_t len = strlen(str); size_t len = strlen(str);
char *clone = malloc((len + 1) * sizeof(char)); char *clone = malloc((len + 1) * sizeof(char));
if (clone == NULL) if (clone == NULL) {
{
return NULL; return NULL;
} }
@@ -25,46 +22,37 @@ char *cloneString(char *str)
return clone; return clone;
} }
void stripString(char *str, const char *chars) void stripString(char *str, const char *chars) {
{ if (str == NULL || chars == NULL) {
if (str == NULL || chars == NULL)
{
return; return;
} }
size_t len = strlen(str); size_t len = strlen(str);
size_t charsLen = strlen(chars); size_t charsLen = strlen(chars);
if (len == 0 || charsLen == 0) if (len == 0 || charsLen == 0) {
{
return; return;
} }
size_t i = 0; size_t i = 0;
while (i < len) while (i < len) {
{ if (strchr(chars, str[i]) == NULL) {
if (strchr(chars, str[i]) == NULL)
{
break; break;
} }
i++; i++;
} }
if (i > 0) if (i > 0) {
{
memmove(str, str + i, len - i + 1); memmove(str, str + i, len - i + 1);
} }
size_t j = len-i - 1; size_t j = len - i - 1;
while (j > 0) while (j > 0) {
{ if (strchr(chars, str[j]) == NULL) {
if (strchr(chars, str[j]) == NULL)
{
break; break;
} }
j--; j--;
} }
if (j < len) if (j < len) {
{
str[j + 1] = '\0'; str[j + 1] = '\0';
} }

View File

@@ -1,11 +1,10 @@
#ifndef CLONESTRING_H #ifndef CLONESTRING_H
#define CLONESTRING_H #define CLONESTRING_H
extern const char * WHITE_SPACE; extern const char *WHITE_SPACE;
char* cloneString(char* str); char *cloneString(char *str);
void stripString(char* str, const char* chars);
void stripString(char *str, const char *chars);
#endif // CLONESTRING_H #endif // CLONESTRING_H

View File

@@ -1,11 +1,12 @@
#include "translator.h" #include "translator.h"
#include "../dynamic_array/darray.h" #include "../dynamic_array/darray.h"
#include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
Translated * init_translator() { Translated *init_translator() {
Translated *translated = malloc(sizeof(Translated)); Translated *translated = malloc(sizeof(Translated));
if (!translated) return NULL; if (!translated)
return NULL;
darray_init(&translated->bytecode, sizeof(uint8_t)); darray_init(&translated->bytecode, sizeof(uint8_t));
return translated; return translated;

View File

@@ -1,14 +1,10 @@
#ifndef TRANSLATOR_H #ifndef TRANSLATOR_H
#define TRANSLATOR_H #define TRANSLATOR_H
#include <stddef.h>
#include "../dynamic_array/darray.h" #include "../dynamic_array/darray.h"
#include <stddef.h>
typedef enum { OP_INIT_STRING } OperationType;
typedef enum {
OP_INIT_STRING
} OperationType;
typedef struct { typedef struct {
size_t registerCount; size_t registerCount;

482
test.ar
View File

@@ -1 +1,483 @@
x="hello world" x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
x="hello world"
"hello world"