~groovestomp/c-parser

87b91f3294f999c82eac1e3d2b5c1df9e081063d — Aaron Oman 2 years ago 3a834a3
Complete style overhaul

- Added STYLEGUIDE to illustrate
8 files changed, 1954 insertions(+), 1945 deletions(-)

A STYLEGUIDE
M TODO
M src/gs.h
A src/gs.h.gch
M src/lexer.c
M src/main.c
M src/parse_tree.c
M src/parser.c
A STYLEGUIDE => STYLEGUIDE +24 -0
@@ 0,0 1,24 @@
// type: InterlockingCaps
// var: snake_case
// func: InterlockingCaps
// namespace: snake_case
org_MyType my_type;
org_MyTypeInit(my_type);

org_scope_MyOtherType my_other_type;
org_scope_MyOtherTypeInit(my_other_type);

// Enum
typedef enum MyEnum {
    MyEnum_ValueOne,
    MyEnum_ValueTwo,
} MyEnum;

// Struct
typedef struct MyStruct {
    int attribute_one;
    char *attribute_two;
} MyStruct;

// Constants
#define SCREAMING_UPPER_CASE

M TODO => TODO +3 -6
@@ 1,12 1,9 @@
- Integer lexing is not correct? Double check C reference and
  integer-constants.txt test file.

- Support the C preprocessor.

- Standard arg parsing.

- Changelog.

- Commit hook for updating changelog as part of release.

- Processing for doing a release.
\ No newline at end of file
- Processing for doing a release.
- Remove dependency on stdio.h in lexer.c and remove printfs; instead returning errors appropriately.
  See how parse_tree.c handles errors.
\ No newline at end of file

M src/gs.h => src/gs.h +237 -238
@@ 11,17 11,16 @@
 * Standard library for personal use. Heavily influenced by Sean Barrett's stb.
 *
 ******************************************************************************/
#ifndef GS_H
#define GS_H
#ifndef GS_VERSION
#define GS_VERSION 0.2.0-dev

#define GSArraySize(Array) (sizeof((Array)) / sizeof((Array)[0]))
#define gs_ArraySize(Array) (sizeof((Array)) / sizeof((Array)[0]))

/******************************************************************************
 * Usage:
 *
 * i32 Numbers[] = { 1, 2, 3, 4, 5 };
 * GSArrayForEach(i32 *Number, Numbers) {
 * gs_ArrayForEach(i32 *Number, Numbers) {
 *         printf("Number[%i]: %i\n", Index, *Number);
 * }
 *


@@ 31,7 30,7 @@
 *
 * Implementation taken from: http://stackoverflow.com/a/400970
 ******************************************************************************/
#define GSArrayForEach(Item, Array) \
#define gs_ArrayForEach(Item, Array) \
        for (i32 Keep##__LINE__ = 1, \
                Count##__LINE__ = 0, \
                Index = 0, \


@@ 40,11 39,11 @@
            Keep##__LINE__ = !Keep##__LINE__, Count##__LINE__++) \
                for (Item = (Array) + Count##__LINE__; Keep##__LINE__; Keep##__LINE__ = !Keep##__LINE__, Index++)

#define GSMax(A, B) ((A) < (B) ? (B) : (A))
#define GSMin(A, B) ((A) < (B) ? (A) : (B))
#define gs_Max(A, B) ((A) < (B) ? (B) : (A))
#define gs_Min(A, B) ((A) < (B) ? (A) : (B))

// TODO: Move to platform-specific header
/* #define GSAbortWithMessage(...) \ */
/* #define gs_AbortWithMessage(...) \ */
/*         { \ */
/*                 char String##__LINE__[256];                             \ */
/*                 sprintf(String##__LINE__, "In %s() at line #%i: ", __func__, __LINE__); \ */


@@ 54,7 53,7 @@
/*         } */

// TODO: Move to platform-specific header
/* #define GSLog(...) \ */
/* #define gs_Log(...) \ */
/*         { \ */
/*                 char String##__LINE__[256];                             \ */
/*                 sprintf(String##__LINE__, "In %s() at line #%i: ", __func__, __LINE__); \ */


@@ 62,23 61,23 @@
/*                 fprintf(stdout, __VA_ARGS__); \ */
/*         } */

#define GS1024Inverse 1.0/1024
#define GSBytesToKilobytes(X) (X) * GS1024Inverse
#define GSBytesToMegabytes(X) GSBytesToKilobytes((X)) * GS1024Inverse
#define GSBytesToGigabytes(X) GSBytesToMegabytes((X)) * GS1024Inverse
#define GS_1024_INVERSE 1.0/1024
#define gs_BytesToKilobytes(X) (X) * GS_1024_INVERSE
#define gs_BytesToMegabytes(X) gs_BytesToKilobytes((X)) * GS_1024_INVERSE
#define gs_BytesToGigabytes(X) gs_BytesToMegabytes((X)) * GS_1024_INVERSE

/******************************************************************************
 * Primitive Type Definitions
 * TODO: Conditionally do typedefs?
 ******************************************************************************/

#define GSNullChar '\0'
#define GS_NULL_CHAR '\0'

#ifndef NULL
#define NULL 0
#endif

#define GSNullPtr NULL
#define GS_NULL_PTR NULL

typedef int bool;
#ifndef false


@@ 105,12 104,12 @@ typedef long double f128;
 * Allocator
 ******************************************************************************/

typedef struct gs_allocator {
        void *(*Alloc)(u64);
        void (*Free)(void *);
        void *(*Realloc)(void *, u64);
        void *(*ArrayAlloc)(u64, u64);
} gs_allocator;
typedef struct gs_Allocator {
        void *(*malloc)(u64);
        void (*free)(void *);
        void *(*realloc)(void *, u64);
        void *(*calloc)(u64, u64);
} gs_Allocator;

/******************************************************************************
 * Character Definitions


@@ 118,52 117,52 @@ typedef struct gs_allocator {
 * Functions to interact with C's basic ASCII char type.
 ******************************************************************************/

bool GSCharIsEndOfStream(char c) {
bool gs_CharIsEndOfStream(char c) {
	return c == '\0';
}

bool GSCharIsEndOfLine(char c) {
bool gs_CharIsEndOfLine(char c) {
	return (c == '\n') || (c == '\r');
}

bool GSCharIsWhitespace(char c) {
bool gs_CharIsWhitespace(char c) {
	return (c == ' ') ||
	       (c == '\t') ||
	       (c == '\v') ||
	       (c == '\f') ||
	       GSCharIsEndOfLine(c);
	       gs_CharIsEndOfLine(c);
}

bool GSCharIsOctal(char c) {
bool gs_CharIsOctal(char c) {
	return (c >= '0' && c <= '7');
}

bool GSCharIsDecimal(char c) {
bool gs_CharIsDecimal(char c) {
	return (c >= '0' && c <= '9');
}

bool GSCharIsHexadecimal(char c) {
bool gs_CharIsHexadecimal(char c) {
	return ((c >= '0' && c <= '9') ||
                (c >= 'a' && c <= 'f') ||
                (c >= 'A' && c <= 'F'));
}

bool GSCharIsAlphabetical(char c) {
bool gs_CharIsAlphabetical(char c) {
	return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}

bool GSCharIsAlphanumeric(char c) {
        return GSCharIsAlphabetical(c) || GSCharIsDecimal(c);
bool gs_CharIsAlphanumeric(char c) {
        return gs_CharIsAlphabetical(c) || gs_CharIsDecimal(c);
}

bool GSCharIsUpcase(char c) {
        return GSCharIsAlphabetical(c) && (c >= 'A') && (c <= 'z');
bool gs_CharIsUpcase(char c) {
        return gs_CharIsAlphabetical(c) && (c >= 'A') && (c <= 'z');
}

char GSCharUpcase(char c) {
char gs_CharUpcase(char c) {
        char Result = c;

        if (GSCharIsAlphabetical(c) && (c >= 'a' && c <= 'z')) {
        if (gs_CharIsAlphabetical(c) && (c >= 'a' && c <= 'z')) {
                i32 Delta = c - 'a';
                Result = Delta + 'A';
        }


@@ 171,14 170,14 @@ char GSCharUpcase(char c) {
        return Result;
}

bool GSCharIsDowncase(char c) {
        return GSCharIsAlphabetical(c) && (c >= 'a') && (c <= 'z');
bool gs_CharIsDowncase(char c) {
        return gs_CharIsAlphabetical(c) && (c >= 'a') && (c <= 'z');
}

char GSCharDowncase(char c) {
char gs_CharDowncase(char c) {
        char Result = c;

        if (GSCharIsAlphabetical(c) && (c >= 'A' && c <= 'Z')) {
        if (gs_CharIsAlphabetical(c) && (c >= 'A' && c <= 'Z')) {
                i32 Delta = c - 'A';
                Result = Delta + 'a';
        }


@@ 192,10 191,10 @@ char GSCharDowncase(char c) {
 * C string type. That is, ASCII characters with terminating NULL.
 ******************************************************************************/

bool GSStringIsEqual(char *LeftString, char *RightString, i32 MaxNumToMatch) {
bool gs_StringIsEqual(char *LeftString, char *RightString, i32 MaxNumToMatch) {
	i32 NumMatched = 0;

        if (*LeftString == GSNullChar || *RightString == GSNullChar && *LeftString != *RightString) {
        if (*LeftString == GS_NULL_CHAR || *RightString == GS_NULL_CHAR && *LeftString != *RightString) {
                return false;
        }



@@ 212,13 211,13 @@ bool GSStringIsEqual(char *LeftString, char *RightString, i32 MaxNumToMatch) {
	return true;
}

u32 GSStringLength(char *String) {
u32 gs_StringLength(char *String) {
	char *c = String;
	while (*c != '\0') c++;
	return c - String;
}

bool GSStringCopy(char *Source, char *Dest, i32 Max) {
bool gs_StringCopy(char *Source, char *Dest, i32 Max) {
        if (Source == NULL || Dest == NULL) {
                return false;
        }


@@ 232,7 231,7 @@ bool GSStringCopy(char *Source, char *Dest, i32 Max) {
        return true;
}

bool GSStringCopyNoNull(char *Source, char *Dest, i32 Max) {
bool gs_StringCopyNoNull(char *Source, char *Dest, i32 Max) {
        if (Source == NULL || Dest == NULL) {
                return false;
        }


@@ 246,15 245,15 @@ bool GSStringCopyNoNull(char *Source, char *Dest, i32 Max) {

/* NOTE: Assumes a maximum string length of 512 bytes. */
/* Returns number of bytes copied. */
u32 GSStringTrimWhitespace(char *Source, u32 MaxLength) {
u32 gs_StringTrimWhitespace(char *Source, u32 MaxLength) {
        char Dest[512];
        MaxLength = GSMin(512, MaxLength);
        MaxLength = gs_Min(512, MaxLength);

        i32 FirstChar, LastChar;
        for (FirstChar = 0; GSCharIsWhitespace(Source[FirstChar]); FirstChar++);
        for (FirstChar = 0; gs_CharIsWhitespace(Source[FirstChar]); FirstChar++);

        i32 StringLength = GSStringLength(Source);
        for (LastChar = StringLength - 1; GSCharIsWhitespace(Source[LastChar]); LastChar--);
        i32 StringLength = gs_StringLength(Source);
        for (LastChar = StringLength - 1; gs_CharIsWhitespace(Source[LastChar]); LastChar--);

        i32 Count = 0;
        for (i32 i = FirstChar; i <= LastChar && Count < MaxLength; Count++, i++) {


@@ 264,7 263,7 @@ u32 GSStringTrimWhitespace(char *Source, u32 MaxLength) {
        for (i32 i = 0; i < Count; i++) {
                Source[i] = Dest[i];
        }
        Source[Count] = GSNullChar;
        Source[Count] = GS_NULL_CHAR;

        return Count;
}


@@ 275,24 274,24 @@ u32 GSStringTrimWhitespace(char *Source, u32 MaxLength) {
  This function assumes a maximum string size of 512 bytes.
  The first character is capitalized.
*/
u32 GSStringSnakeCaseToCamelCase(char *Source, u32 SourceLength) {
u32 gs_StringSnakeCaseToCamelCase(char *Source, u32 SourceLength) {
        char Dest[512]; /* Scratch buffer. */
        i32 i = 0, j = 0; /* Iterable indices for Source and Dest. */

        if ((Source[i] == '_') && (i + 1 < SourceLength) && GSCharIsAlphabetical(Source[i+1])) {
        if ((Source[i] == '_') && (i + 1 < SourceLength) && gs_CharIsAlphabetical(Source[i+1])) {
                i++;
        }

        Dest[j] = GSCharUpcase(Source[i]);
        Dest[j] = gs_CharUpcase(Source[i]);
        i++;
        j++;

        SourceLength = GSMin(512, SourceLength);
        SourceLength = gs_Min(512, SourceLength);

        for (i, j; i<SourceLength; i++, j++) {
                if ((Source[i] == '_') && (i + 1 < SourceLength) && GSCharIsAlphabetical(Source[i+1])) {
                if ((Source[i] == '_') && (i + 1 < SourceLength) && gs_CharIsAlphabetical(Source[i+1])) {
                        /* Replace any '_*' with 'upcase(*)' where * is an ascii char. */
                        Dest[j] = GSCharUpcase(Source[i + 1]);
                        Dest[j] = gs_CharUpcase(Source[i + 1]);
                        i++;
                } else {
                        /* Copy chars normally. */


@@ 304,7 303,7 @@ u32 GSStringSnakeCaseToCamelCase(char *Source, u32 SourceLength) {
        for (i32 k = 0; k < j; k++) {
                Source[k] = Dest[k];
        }
        Source[j] = GSNullChar;
        Source[j] = GS_NULL_CHAR;

        return j;
}


@@ 317,25 316,25 @@ u32 GSStringSnakeCaseToCamelCase(char *Source, u32 SourceLength) {
  the lowercase version of that character. This does not apply to leading char.
  eg.: CamelCase -> Camel_case
*/
u32 GSStringCamelCaseToSnakeCase(char *Source, char *Dest, u32 SourceLength) {
u32 gs_StringCamelCaseToSnakeCase(char *Source, char *Dest, u32 SourceLength) {
        i32 i = 0, j = 0; /* Iterable indices for Source and Dest. */
        Dest[i] = GSCharDowncase(Source[i]);
        Dest[i] = gs_CharDowncase(Source[i]);
        i++;
        j++;

        for (i, j; i<SourceLength && Source[i] != GSNullChar; i++, j++) {
        for (i, j; i<SourceLength && Source[i] != GS_NULL_CHAR; i++, j++) {
                /* Replace upcase ascii char with '_' and downcase ascii char. */
                if (GSCharIsUpcase(Source[i])) {
                if (gs_CharIsUpcase(Source[i])) {
                        Dest[j] = '_';
                        j++;
                        Dest[j] = GSCharDowncase(Source[i]);
                        Dest[j] = gs_CharDowncase(Source[i]);
                }
                /* Copy chars normally. */
                else {
                        Dest[j] = Source[i];
                }
        }
        Dest[j] = GSNullChar;
        Dest[j] = GS_NULL_CHAR;

        return j;
}


@@ 347,28 346,28 @@ u32 GSStringCamelCaseToSnakeCase(char *Source, char *Dest, u32 SourceLength) {
  eg.: hello -> Hello
       123foos -> 123Foos
*/
char *GSStringCapitalize(char *Source, u32 Length) {
char *gs_StringCapitalize(char *Source, u32 Length) {
        i32 i = 0;

        while (true) {
                if (i >= Length) break;
                if (Source[i] == GSNullChar) break;
                if (GSCharIsAlphabetical(Source[i])) break;
                if (Source[i] == GS_NULL_CHAR) break;
                if (gs_CharIsAlphabetical(Source[i])) break;

                i++;
        }

        if (i >= Length) return Source;

        Source[i] = GSCharUpcase(Source[i]);
        Source[i] = gs_CharUpcase(Source[i]);

        return Source;
}

typedef bool (*GSStringFilterFn)(char C);
typedef bool (*gs_StringFilterFn)(char C);

/* Returns length of new string */
i32 GSStringKeep(char *Source, char *Dest, u32 MaxLength, GSStringFilterFn FilterFn) {
i32 gs_StringKeep(char *Source, char *Dest, u32 MaxLength, gs_StringFilterFn FilterFn) {
        i32 i = 0;
        i32 j = 0;



@@ 379,13 378,13 @@ i32 GSStringKeep(char *Source, char *Dest, u32 MaxLength, GSStringFilterFn Filte
                }
                i++;
        }
        Dest[j] = GSNullChar;
        Dest[j] = GS_NULL_CHAR;

        return j + 1;
}

/* Returns length of new string */
i32 GSStringReject(char *Source, char *Dest, u32 MaxLength, GSStringFilterFn FilterFn) {
i32 gs_StringReject(char *Source, char *Dest, u32 MaxLength, gs_StringFilterFn FilterFn) {
        i32 i = 0;
        i32 j = 0;



@@ 396,7 395,7 @@ i32 GSStringReject(char *Source, char *Dest, u32 MaxLength, GSStringFilterFn Fil
                }
                i++;
        }
        Dest[j] = GSNullChar;
        Dest[j] = GS_NULL_CHAR;

        return j + 1;
}


@@ 409,111 408,111 @@ i32 GSStringReject(char *Source, char *Dest, u32 MaxLength, GSStringFilterFn Fil
 *     char *Value = "value";
 *     i32 StringLength = 256;
 *     i32 NumElements = 13;
 *     u32 BytesRequired = GSHashMapBytesRequired(StringLength, NumElements);
 *     gs_hash_map *Map = GSHashMapInit(alloca(BytesRequired), StringLength, NumElements);
 *     GSHashMapSet(Map, "key", Value);
 *     u32 BytesRequired = gs_HashMapBytesRequired(StringLength, NumElements);
 *     gs_hash_map *Map = gs_HashMapInit(alloca(BytesRequired), StringLength, NumElements);
 *     gs_HashMapSet(Map, "key", Value);
 *     if (GSHashMapHasKey(Map, "key")) {
 *         char *Result = (char *)GSHashMapGet(Map, "key");
 *         printf("Key(%s), Value(%s)\n", "key", Result);
 *     }
 ******************************************************************************/

typedef struct gs_hash_map {
        u32 Count;
        u32 AllocatedBytes;
        u32 Capacity;
        u32 MaxKeyLength;
typedef struct gs_HashMap {
        u32 count;
        u32 allocated_bytes;
        u32 capacity;
        u32 max_key_length;

        char *Keys;
        void **Values;
} gs_hash_map;
        char *keys;
        void **values;
} gs_HashMap;

/* String must be a NULL-terminated string */
u32 __GSHashMapComputeHash(gs_hash_map *Self, char *String) {
u32 __gs_HashMapComputeHash(gs_HashMap *self, char *string) {
        /* sdbm hash function: http://stackoverflow.com/a/14409947 */
        u32 HashAddress = 0;
        for (u32 i = 0; String[i] != GSNullChar; i++) {
                HashAddress = String[i] +
                        (HashAddress << 6) +
                        (HashAddress << 16) -
                        HashAddress;
        u32 hash_address = 0;
        for (u32 i = 0; string[i] != GS_NULL_CHAR; i++) {
                hash_address = string[i] +
                        (hash_address << 6) +
                        (hash_address << 16) -
                        hash_address;
        }
        u32 Result = HashAddress % Self->Capacity;
        u32 result = hash_address % self->capacity;

        return Result;
        return result;
}

u32 GSHashMapBytesRequired(u32 MaxKeyLength, u32 NumEntries) {
        i32 AllocSize =
                sizeof(gs_hash_map) +
                (sizeof(char) * MaxKeyLength * NumEntries) +
                (sizeof(void *) * NumEntries);
u32 gs_HashMapBytesRequired(u32 max_key_length, u32 num_entries) {
        i32 alloc_size =
                sizeof(gs_HashMap) +
                (sizeof(char) * max_key_length * num_entries) +
                (sizeof(void *) * num_entries);

        return AllocSize;
        return alloc_size;
}

gs_hash_map *GSHashMapInit(void *Memory, u32 MaxKeyLength, u32 NumEntries) {
        gs_hash_map *Self = (gs_hash_map *)Memory;
gs_HashMap *gs_HashMapInit(void *memory, u32 max_key_length, u32 num_entries) {
        gs_HashMap *self = (gs_HashMap *)memory;

        char *KeyValueMemory = (char *)Memory + sizeof(gs_hash_map);
        char *key_value_memory = (char *)memory + sizeof(gs_HashMap);

        Self->MaxKeyLength = MaxKeyLength;
        Self->Capacity = NumEntries;
        Self->AllocatedBytes = GSHashMapBytesRequired(MaxKeyLength, NumEntries);
        Self->Count = 0;
        self->max_key_length = max_key_length;
        self->capacity = num_entries;
        self->allocated_bytes = gs_HashMapBytesRequired(max_key_length, num_entries);
        self->count = 0;

        i32 KeysMemLength = MaxKeyLength * NumEntries;
        i32 keys_mem_length = max_key_length * num_entries;

        Self->Keys = KeyValueMemory;
        for (i32 i = 0; i < KeysMemLength; i++) {
                Self->Keys[i] = 0;
        self->keys = key_value_memory;
        for (i32 i = 0; i < keys_mem_length; i++) {
                self->keys[i] = 0;
        }

        Self->Values = (void **)(Self->Keys + KeysMemLength);
        for (i32 i = 0; i < NumEntries; i++) {
                Self->Values[i] = 0;
        self->values = (void **)(self->keys + keys_mem_length);
        for (i32 i = 0; i < num_entries; i++) {
                self->values[i] = 0;
        }

        return Self;
        return self;
}

bool __GSHashMapUpdate(gs_hash_map *Self, char *Key, void *Value) {
        u32 KeyLength = GSStringLength(Key);
        u32 HashIndex = __GSHashMapComputeHash(Self, Key);
bool __gs_HashMapUpdate(gs_HashMap *self, char *key, void *value) {
        u32 key_length = gs_StringLength(key);
        u32 hash_index = __gs_HashMapComputeHash(self, key);

        u32 StartHash = HashIndex;
        u32 start_hash = hash_index;

        do {
                if (GSStringIsEqual(&Self->Keys[HashIndex * Self->MaxKeyLength], Key, GSStringLength(Key))) {
                        Self->Values[HashIndex] = Value;
                if (gs_StringIsEqual(&self->keys[hash_index * self->max_key_length], key, gs_StringLength(key))) {
                        self->values[hash_index] = value;
                        return true;
                }
                HashIndex = (HashIndex + 1) % Self->Capacity;
        } while (HashIndex != StartHash);
                hash_index = (hash_index + 1) % self->capacity;
        } while (hash_index != start_hash);

        /* Couldn't find Key to update. */
        return false;
}

/* Wanted must be a NULL terminated string */
bool GSHashMapHasKey(gs_hash_map *Self, char *Wanted) {
        u32 HashIndex = __GSHashMapComputeHash(Self, Wanted);
        char *Key = &Self->Keys[HashIndex * Self->MaxKeyLength];
        if (GSStringIsEqual(Wanted, Key, GSStringLength(Wanted))) {
/* wanted must be a NULL terminated string */
bool gs_HashMapHasKey(gs_HashMap *self, char *wanted) {
        u32 hash_index = __gs_HashMapComputeHash(self, wanted);
        char *key = &self->keys[hash_index * self->max_key_length];
        if (gs_StringIsEqual(wanted, key, gs_StringLength(wanted))) {
                return true;
        }

        u32 StartHash = HashIndex;
        HashIndex = (HashIndex + 1) % Self->Capacity;
        u32 start_hash = hash_index;
        hash_index = (hash_index + 1) % self->capacity;

        while (true) {
                if (HashIndex == StartHash) break;
                if (hash_index == start_hash) break;

                Key = &Self->Keys[HashIndex * Self->MaxKeyLength];
                if (GSStringIsEqual(Wanted, Key, GSStringLength(Wanted))) {
                key = &self->keys[hash_index * self->max_key_length];
                if (gs_StringIsEqual(wanted, key, gs_StringLength(wanted))) {
                        return true;
                }
                HashIndex = (HashIndex + 1) % Self->Capacity;
                hash_index = (hash_index + 1) % self->capacity;
        }

        return false;


@@ 526,39 525,39 @@ bool GSHashMapHasKey(gs_hash_map *Self, char *Wanted) {
             See: https://en.wikipedia.org/wiki/Open_addressing
  Key must be a NULL terminated string.
 */
bool GSHashMapSet(gs_hash_map *Self, char *Key, void *Value) {
        u32 KeyLength = GSStringLength(Key);
        u32 HashIndex = __GSHashMapComputeHash(Self, Key);
bool gs_HashMapSet(gs_HashMap *self, char *key, void *value) {
        u32 key_length = gs_StringLength(key);
        u32 hash_index = __gs_HashMapComputeHash(self, key);

        if (GSHashMapHasKey(Self, Key)) {
                return __GSHashMapUpdate(Self, Key, Value);
        if (gs_HashMapHasKey(self, key)) {
                return __gs_HashMapUpdate(self, key, value);
        }

        /* We're not updating, so return false if we're at capacity. */
        if (Self->Count >= Self->Capacity) return false;
        if (self->count >= self->capacity) return false;

        /* Add a brand-new key in. */
        if (Self->Keys[HashIndex * Self->MaxKeyLength] == GSNullChar) {
                GSStringCopy(Key, &Self->Keys[HashIndex * Self->MaxKeyLength], KeyLength);
                Self->Values[HashIndex] = Value;
                Self->Count++;
        if (self->keys[hash_index * self->max_key_length] == GS_NULL_CHAR) {
                gs_StringCopy(key, &self->keys[hash_index * self->max_key_length], key_length);
                self->values[hash_index] = value;
                self->count++;
                return true;
        }

        /* We have a collision! Find a free index. */
        u32 StartHash = HashIndex;
        HashIndex = (HashIndex + 1) % Self->Capacity;
        u32 start_hash = hash_index;
        hash_index = (hash_index + 1) % self->capacity;

        while (true) {
                if (HashIndex == StartHash) break;
                if (hash_index == start_hash) break;

                if (Self->Keys[HashIndex * Self->MaxKeyLength] == GSNullChar) {
                        GSStringCopy(Key, &Self->Keys[HashIndex * Self->MaxKeyLength], KeyLength);
                        Self->Values[HashIndex] = Value;
                        Self->Count++;
                if (self->keys[hash_index * self->max_key_length] == GS_NULL_CHAR) {
                        gs_StringCopy(key, &self->keys[hash_index * self->max_key_length], key_length);
                        self->values[hash_index] = value;
                        self->count++;
                        return true;
                }
                HashIndex = (HashIndex + 1) % Self->Capacity;
                hash_index = (hash_index + 1) % self->capacity;
        }

        /* Couldn't find any free space. */


@@ 566,20 565,20 @@ bool GSHashMapSet(gs_hash_map *Self, char *Key, void *Value) {
}

/* Memory must be large enough for the resized Hash. Memory _cannot_ overlap! */
bool GSHashMapGrow(gs_hash_map **Self, u32 NumEntries, void *New) {
        gs_hash_map *Old = *Self;
bool gs_HashMapGrow(gs_HashMap **self, u32 num_entries, void *memory) {
        gs_HashMap *old = *self;

        /* No point in making smaller... */
        if (NumEntries <= Old->Capacity) return false;
        if (New == NULL) return false;

        *Self = GSHashMapInit(New, Old->MaxKeyLength, NumEntries);
        for (i32 i = 0; i < Old->Capacity; i++) {
                char *Key = &Old->Keys[i * Old->MaxKeyLength];
                char *Value = (char *)(Old->Values[i]);
                if (Key != NULL) {
                        bool Success = GSHashMapSet(*Self, Key, Value);
                        if (!Success) return false;
        if (num_entries <= old->capacity) return false;
        if (memory == GS_NULL_PTR) return false;

        *self = gs_HashMapInit(memory, old->max_key_length, num_entries);
        for (i32 i = 0; i < old->capacity; i++) {
                char *key = &old->keys[i * old->max_key_length];
                char *value = (char *)(old->values[i]);
                if (key != NULL) {
                        bool success = gs_HashMapSet(*self, key, value);
                        if (!success) return false;
                }
        }



@@ 587,58 586,58 @@ bool GSHashMapGrow(gs_hash_map **Self, u32 NumEntries, void *New) {
}

/* Wanted must be a NULL terminated string */
void *GSHashMapGet(gs_hash_map *Self, char *Wanted) {
        u32 HashIndex = __GSHashMapComputeHash(Self, Wanted);
        char *Key = &Self->Keys[HashIndex * Self->MaxKeyLength];
        if (GSStringIsEqual(Wanted, Key, GSStringLength(Key))) {
                void *Result = Self->Values[HashIndex];
                return Result;
void *gs_HashMapGet(gs_HashMap *self, char *wanted) {
        u32 hash_index = __gs_HashMapComputeHash(self, wanted);
        char *key = &self->keys[hash_index * self->max_key_length];
        if (gs_StringIsEqual(wanted, key, gs_StringLength(key))) {
                void *result = self->values[hash_index];
                return result;
        }

        u32 StartHash = HashIndex;
        HashIndex = (HashIndex + 1) % Self->Capacity;
        u32 start_hash = hash_index;
        hash_index = (hash_index + 1) % self->capacity;

        while (true) {
                if (HashIndex == StartHash) break;
                if (hash_index == start_hash) break;

                Key = &Self->Keys[HashIndex * Self->MaxKeyLength];
                if (GSStringIsEqual(Wanted, Key, GSStringLength(Key))) {
                        void *Result = Self->Values[HashIndex];
                        return Result;
                key = &self->keys[hash_index * self->max_key_length];
                if (gs_StringIsEqual(wanted, key, gs_StringLength(key))) {
                        void *result = self->values[hash_index];
                        return result;
                }
                HashIndex = (HashIndex + 1) % Self->Capacity;
                hash_index = (hash_index + 1) % self->capacity;
        }

        return NULL;
}

/* Wanted must be a NULL terminated string */
void *GSHashMapDelete(gs_hash_map *Self, char *Wanted) {
        u32 HashIndex = __GSHashMapComputeHash(Self, Wanted);
        char *Key = &Self->Keys[HashIndex * Self->MaxKeyLength];
        if (GSStringIsEqual(Wanted, Key, GSStringLength(Key))) {
                void *Result = Self->Values[HashIndex];
                Self->Values[HashIndex] = NULL;
                Self->Keys[HashIndex * Self->MaxKeyLength] = GSNullChar;
                Self->Count--;
                return Result;
void *gs_HashMapDelete(gs_HashMap *self, char *wanted) {
        u32 hash_index = __gs_HashMapComputeHash(self, wanted);
        char *key = &self->keys[hash_index * self->max_key_length];
        if (gs_StringIsEqual(wanted, key, gs_StringLength(key))) {
                void *result = self->values[hash_index];
                self->values[hash_index] = NULL;
                self->keys[hash_index * self->max_key_length] = GS_NULL_CHAR;
                self->count--;
                return result;
        }

        u32 StartHash = HashIndex;
        HashIndex = (HashIndex + 1) % Self->Capacity;
        u32 start_hash = hash_index;
        hash_index = (hash_index + 1) % self->capacity;

        while (true) {
                if (HashIndex == StartHash) break;

                Key = &Self->Keys[HashIndex * Self->MaxKeyLength];
                if (GSStringIsEqual(Wanted, Key, GSStringLength(Key))) {
                        void *Result = Self->Values[HashIndex];
                        Self->Values[HashIndex] = NULL;
                        Self->Keys[HashIndex * Self->MaxKeyLength] = GSNullChar;
                        Self->Count--;
                        return Result;
                if (hash_index == start_hash) break;

                key = &self->keys[hash_index * self->max_key_length];
                if (gs_StringIsEqual(wanted, key, gs_StringLength(key))) {
                        void *result = self->values[hash_index];
                        self->values[hash_index] = NULL;
                        self->keys[hash_index * self->max_key_length] = GS_NULL_CHAR;
                        self->count--;
                        return result;
                }
                HashIndex = (HashIndex + 1) % Self->Capacity;
                hash_index = (hash_index + 1) % self->capacity;
        }

        return NULL;


@@ 648,87 647,87 @@ void *GSHashMapDelete(gs_hash_map *Self, char *Wanted) {
 * Byte streams / Buffers / File IO
 ******************************************************************************/

typedef struct gs_buffer {
        char *Start;
        char *Cursor;
        u64 Capacity;
        u64 Length;
        char *SavedCursor;
} gs_buffer;
typedef struct gs_Buffer {
        char *start;
        char *cursor;
        u64 capacity;
        u64 length;
        char *saved_cursor;
} gs_Buffer;

gs_buffer *GSBufferInit(gs_buffer *Buffer, char *Start, u64 Size) {
        Buffer->Start = Start;
        Buffer->Cursor = Start;
        Buffer->Length = 0;
        Buffer->Capacity = Size;
        Buffer->SavedCursor = NULL;
gs_Buffer *gs_BufferInit(gs_Buffer *buffer, char *start, u64 size) {
        buffer->start = start;
        buffer->cursor = start;
        buffer->length = 0;
        buffer->capacity = size;
        buffer->saved_cursor = GS_NULL_PTR;

        return Buffer;
        return buffer;
}

bool GSBufferIsEOF(gs_buffer *Buffer) {
        u64 Size = Buffer->Cursor - Buffer->Start;
        bool Result = Size >= Buffer->Length;
        return Result;
bool gs_BufferIsEOF(gs_Buffer *buffer) {
        u64 size = buffer->cursor - buffer->start;
        bool result = size >= buffer->length;
        return result;
}

void GSBufferNextLine(gs_buffer *Buffer) {
void gs_BufferNextLine(gs_Buffer *buffer) {
        while (true) {
                if (Buffer->Cursor[0] == '\n' || Buffer->Cursor[0] == '\0') break;
                if (buffer->cursor[0] == '\n' || buffer->cursor[0] == '\0') break;

                Buffer->Cursor++;
                buffer->cursor++;
        }
        Buffer->Cursor++;
        buffer->cursor++;
}

bool GSBufferSaveCursor(gs_buffer *Buffer) {
        Buffer->SavedCursor = Buffer->Cursor;
bool gs_BufferSaveCursor(gs_Buffer *buffer) {
        buffer->saved_cursor = buffer->cursor;
        return true;
}

bool GSBufferRestoreCursor(gs_buffer *Buffer) {
        if (Buffer->SavedCursor == NULL) return false;
bool gs_BufferRestoreCursor(gs_Buffer *buffer) {
        if (buffer->saved_cursor == GS_NULL_PTR) return false;

        Buffer->Cursor = Buffer->SavedCursor;
        Buffer->SavedCursor = NULL;
        buffer->cursor = buffer->saved_cursor;
        buffer->saved_cursor = NULL;

        return true;
}

// TODO: Move to platform-specific header include.
/* size_t */
/* GSFileSize(char *FileName) */
/* gs_Filesize(char *FileName) */
/* { */
/*         size_t FileSize = 0; */
/*         size_t Filesize = 0; */
/*         FILE *File = fopen(FileName, "r"); */
/*         if (File != NULL) */
/*         { */
/*                 fseek(File, 0, SEEK_END); */
/*                 FileSize = ftell(File); */
/*                 Filesize = ftell(File); */
/*                 fclose(File); */
/*         } */
/*         return FileSize; */
/*         return Filesize; */
/* } */

// TODO: Move to platform-specific header include
/* bool */
/* GSFileCopyToBuffer(char *FileName, gs_buffer *Buffer) */
/* gs_FileCopyToBuffer(char *FileName, gs_Buffer *buffer) */
/* { */
/*         FILE *File = fopen(FileName, "r"); */
/*         if (File == NULL) return false; */

/*         fseek(File, 0, SEEK_END); */
/*         size_t FileSize = ftell(File); */
/*         i32 Remaining = (Buffer->Start + Buffer->Capacity) - Buffer->Cursor; */
/*         if (FileSize > Remaining) return false; */
/*         size_t Filesize = ftell(File); */
/*         i32 Remaining = (buffer->start + buffer->Capacity) - buffer->Cursor; */
/*         if (Filesize > Remaining) return false; */

/*         fseek(File, 0, SEEK_SET); */
/*         size_t BytesRead = fread(Buffer->Cursor, 1, FileSize, File); */
/*         Buffer->Length += FileSize; */
/*         Buffer->Cursor += FileSize; */
/*         *(Buffer->Cursor) = '\0'; */
/*         size_t BytesRead = fread(buffer->Cursor, 1, Filesize, File); */
/*         buffer->Length += Filesize; */
/*         buffer->Cursor += Filesize; */
/*         *(buffer->Cursor) = '\0'; */

/*         return true; */
/* } */

#endif /* GS_H */
#endif /* GS_VERSION */

A src/gs.h.gch => src/gs.h.gch +0 -0
M src/lexer.c => src/lexer.c +262 -265
@@ 1,20 1,20 @@
/******************************************************************************
 * File: lexer.c
 * Created:
 * Updated: 2016-11-03
 * Updated: 2016-11-04
 * Package: C-Parser
 * Creator: Aaron Oman (GrooveStomp)
 * Copyright - 2020, Aaron Oman and the C-Parser contributors
 * SPDX-License-Identifier: LGPL-3.0-only
 ******************************************************************************/
#ifndef _LEXER_C
#define _LEXER_C
#ifndef LEXER_C
#define LEXER_C

#include "gs.h"

#include <stdio.h> /* TODO: Remove printfs */

enum token_type {
typedef enum TokenType {
        Token_Unknown,

        Token_Asterisk,


@@ 76,11 76,10 @@ enum token_type {
        Token_PrecisionNumber,

        Token_EndOfStream,
};
} TokenType;

char *TokenName(enum token_type Type) {
        switch(Type)
        {
char *TokenName(TokenType type) {
        switch (type) {
                case Token_Unknown: { return "Unknown"; } break;

                case Token_Asterisk: { return "Asterisk"; } break;


@@ 143,159 142,155 @@ char *TokenName(enum token_type Type) {
                case Token_PrecisionNumber: { return "PrecisionNumber"; } break;

                case Token_EndOfStream: { return "EndOfStream"; } break;
                default: { return "UnknownToken"; } break;
        }
}

typedef struct token {
        char *Text;
        size_t TextLength;
        enum token_type Type;
        u32 Line;
        u32 Column;
} token;

typedef struct tokenizer {
        char *Beginning;
        char *At;
        u32 Line;
        u32 Column;
} tokenizer;

void TokenizerInit(struct tokenizer *Self, char *Memory) {
        Self->Beginning = Memory;
        Self->At = Memory;
        Self->Line = 0;
        Self->Column = 0;
typedef struct Token {
        char *text;
        size_t text_length;
        TokenType type;
        u32 line;
        u32 column;
} Token;

typedef struct Tokenizer {
        char *beginning;
        char *at;
        u32 line;
        u32 column;
} Tokenizer;

void TokenizerInit(Tokenizer *tokenizer, char *memory) {
        tokenizer->beginning = memory;
        tokenizer->at = memory;
        tokenizer->line = 0;
        tokenizer->column = 0;
}

void AdvanceTokenizer(struct tokenizer *Tokenizer) {
        if (GSCharIsEndOfLine(Tokenizer->At[0])) {
                ++Tokenizer->Line;
                Tokenizer->Column = 1;
void AdvanceTokenizer(Tokenizer *tokenizer) {
        if (gs_CharIsEndOfLine(tokenizer->at[0])) {
                ++tokenizer->line;
                tokenizer->column = 1;
        } else {
                ++Tokenizer->Column;
                ++tokenizer->column;
        }
        ++Tokenizer->At;
        ++tokenizer->at;
}

void CopyTokenizer(struct tokenizer *Source, struct tokenizer *Dest) {
        Dest->Beginning = Source->Beginning;
        Dest->At = Source->At;
        Dest->Line = Source->Line;
        Dest->Column = Source->Column;
void CopyTokenizer(Tokenizer *source, Tokenizer *dest) {
        dest->beginning = source->beginning;
        dest->at = source->at;
        dest->line = source->line;
        dest->column = source->column;
}

void AdvanceTokenizerToChar(struct tokenizer *Tokenizer, char Char) {
        while (!GSCharIsEndOfStream(Tokenizer->At[0])) {
                if (Tokenizer->At[0] == Char) break;
                AdvanceTokenizer(Tokenizer);
void AdvanceTokenizerToChar(Tokenizer *tokenizer, char c) {
        while (!gs_CharIsEndOfStream(tokenizer->at[0])) {
                if (tokenizer->at[0] == c) break;
                AdvanceTokenizer(tokenizer);
        }
}

void CopyToTokenAndAdvance(struct tokenizer *Tokenizer, struct token *Token, int Length, enum token_type Type) {
        Token->Text = Tokenizer->At;
        Token->TextLength = Length;
        Token->Type = Type;
        Token->Line = Tokenizer->Line;
        Token->Column = Tokenizer->Column;
void CopyToTokenAndAdvance(Tokenizer *tokenizer, Token *token, u32 length, TokenType type) {
        token->text = tokenizer->at;
        token->text_length = length;
        token->type = type;
        token->line = tokenizer->line;
        token->column = tokenizer->column;

        for (int i=0; i<Length; ++i) AdvanceTokenizer(Tokenizer);
        for (i32 i =  0; i < length; ++i) AdvanceTokenizer(tokenizer);
}

void EatAllWhitespace(struct tokenizer *Tokenizer) {
        for (; GSCharIsWhitespace(Tokenizer->At[0]); AdvanceTokenizer(Tokenizer));
void EatAllWhitespace(Tokenizer *tokenizer) {
        for (; gs_CharIsWhitespace(tokenizer->at[0]); AdvanceTokenizer(tokenizer));
}

bool IsIdentifierCharacter(char C) {
	bool Result = (GSCharIsAlphabetical(C) || GSCharIsDecimal(C) || C == '_');
	return Result;
bool IsIdentifierCharacter(char c) {
	return (gs_CharIsAlphabetical(c) || gs_CharIsDecimal(c) || c == '_');
}

bool IsIntegerSuffix(char C) {
	bool Result = (C == 'u' ||
                          C == 'U' ||
                          C == 'l' ||
                          C == 'L');
	return Result;
bool IsIntegerSuffix(char c) {
        return (c == 'u' || c == 'U' || c == 'l' || c == 'L');
}

bool GetCharacter(struct tokenizer *Tokenizer, struct token *Token) {
        char *Cursor = Tokenizer->At;
bool GetCharacter(Tokenizer *tokenizer, Token *token) {
        char *cursor = tokenizer->at;

        /* First character must be a single quote. */
        if (*Cursor != '\'') return false;
        ++Cursor; /* Skip past the first single quote. */
        if (*cursor != '\'') return false;
        ++cursor; /* Skip past the first single quote. */

        /* Read until closing single quote. */
        for (; *Cursor != '\''; ++Cursor);
        for (; *cursor != '\''; ++cursor);

        /* If previous character is an escape, then closing quote is next char. */
        if (*(Cursor-1) == '\\' && *(Cursor -2) != '\\') {
                ++Cursor;
        if (*(cursor-1) == '\\' && *(cursor -2) != '\\') {
                ++cursor;
        }
        ++Cursor; /* Point to character after literal. */
        ++cursor; /* Point to character after literal. */

        /* Longest char literal is: '\''. */
        if (Cursor - Tokenizer->At > 4) return false;
        if (cursor - tokenizer->at > 4) return false;

        CopyToTokenAndAdvance(Tokenizer, Token, Cursor - Tokenizer->At, Token_Character);
        CopyToTokenAndAdvance(tokenizer, token, cursor - tokenizer->at, Token_Character);

        return true;
}

bool GetString(struct tokenizer *Tokenizer, struct token *Token) {
        char *Cursor = Tokenizer->At;
        if (*Cursor != '"') return false;
bool GetString(Tokenizer *tokenizer, Token *token) {
        char *cursor = tokenizer->at;
        if (*cursor != '"') return false;

        while (true) {
                ++Cursor;
                if (*Cursor == '\0') return false;
                if (*Cursor == '"' && *(Cursor - 1) != '\\') break;
                ++cursor;
                if (*cursor == '\0') return false;
                if (*cursor == '"' && *(cursor - 1) != '\\') break;
        }
        ++Cursor; /* Swallow the last double quote. */
        ++cursor; /* Swallow the last double quote. */

        CopyToTokenAndAdvance(Tokenizer, Token, Cursor - Tokenizer->At, Token_String);
        CopyToTokenAndAdvance(tokenizer, token, cursor - tokenizer->at, Token_String);

        return true;
}

bool IsOctalString(char *Text, int Length) {
        if (Length < 2) return false;
bool IsOctalString(char *text, int length) {
        if (length < 2) return false;

        char Last = Text[Length-1];
        char last = text[length-1];

        /* Leading 0 required for octal integers. */
        if ('0' != Text[0]) return false;
        if ('0' != text[0]) return false;

        if (!(GSCharIsOctal(Last) || IsIntegerSuffix(Last))) return false;
        if (!(gs_CharIsOctal(last) || IsIntegerSuffix(last))) return false;

        /* Loop from character after leading '0' to second-last. */
        for (int i=1; i<Length-1; ++i) {
                if (!GSCharIsOctal(Text[i])) return false;
        for (int i = 1; i < length - 1; ++i) {
                if (!gs_CharIsOctal(text[i])) return false;
        }

        return true;
}

bool IsHexadecimalString(char *Text, int Length) {
        if (Length < 3) return false;
bool IsHexadecimalString(char *text, int length) {
        if (length < 3) return false;

        char Last = Text[Length-1];
        char last = text[length-1];

        /* Hex numbers must start with: '0x' or '0X'. */
        if (!(Text[0] == '0' && (Text[1] == 'x' || Text[1] == 'X'))) return false;
        if (!(text[0] == '0' && (text[1] == 'x' || text[1] == 'X'))) return false;

        if (!(GSCharIsHexadecimal(Last) || IsIntegerSuffix(Last))) return false;
        if (!(gs_CharIsHexadecimal(last) || IsIntegerSuffix(last))) return false;

        /* Loop from character after leading '0x' to second-last. */
        for (int i=2; i<Length-1; ++i) {
                if (!GSCharIsHexadecimal(Text[i])) return false;
        for (int i = 2; i < length - 1; ++i) {
                if (!gs_CharIsHexadecimal(text[i])) return false;
        }

        return true;
}

bool GetPrecisionNumber(struct tokenizer *Tokenizer, struct token *Token) {
bool GetPrecisionNumber(Tokenizer *tokenizer, Token *token) {
        /*
          A floating constant consists of an integer part, a decimal point, a
          fraction part, an e or E, an optionally signed integer exponent and an


@@ 308,139 303,139 @@ bool GetPrecisionNumber(struct tokenizer *Tokenizer, struct token *Token) {
          makes it long double; otherwise it is double.
        */

        char *Cursor = Tokenizer->At;
        char *cursor = tokenizer->at;

        bool HasIntegerPart = false;
        bool HasDecimalPoint = false;
        bool HasFractionalPart = false;
        bool HasExponentPart = false;
        bool has_integer_part = false;
        bool has_decimal_point = false;
        bool has_fractional_part = false;
        bool has_exponent_part = false;

        if (GSCharIsDecimal(*Cursor)) {
                for (; GSCharIsDecimal(*Cursor); ++Cursor);
                HasIntegerPart = true;
        if (gs_CharIsDecimal(*cursor)) {
                for (; gs_CharIsDecimal(*cursor); ++cursor);
                has_integer_part = true;
        }

        if ('.' == *Cursor) {
                ++Cursor;
                HasDecimalPoint = true;
                if (GSCharIsDecimal(*Cursor))
        if ('.' == *cursor) {
                ++cursor;
                has_decimal_point = true;
                if (gs_CharIsDecimal(*cursor))
                {
                        for (; GSCharIsDecimal(*Cursor); ++Cursor);
                        HasFractionalPart = true;
                        for (; gs_CharIsDecimal(*cursor); ++cursor);
                        has_fractional_part = true;
                }
        }

        if ('e' == *Cursor || 'E' == *Cursor){
                ++Cursor;
                HasExponentPart = true;
        if ('e' == *cursor || 'E' == *cursor) {
                ++cursor;
                has_exponent_part = true;

                /* Optional negative sign for exponent is allowed. */
                if ('-' == *Cursor) {
                        ++Cursor;
                if ('-' == *cursor) {
                        ++cursor;
                }

                /* Exponent must contain an exponent part. */
                if (!GSCharIsDecimal(*Cursor)) {
                if (!gs_CharIsDecimal(*cursor)) {
                        return false;
                }

                for (; GSCharIsDecimal(*Cursor); ++Cursor);
                for (; gs_CharIsDecimal(*cursor); ++cursor);
        }

        /* IsFloatSuffix(C) */
        char C = *Cursor;
        if ('f' == C || 'F' == C || 'l' == C || 'L' == C) {
                ++Cursor;
        char c = *cursor;
        if ('f' == c || 'F' == c || 'l' == c || 'L' == c) {
                ++cursor;
        }

        if ((HasIntegerPart || HasFractionalPart) &&
           (HasDecimalPoint || HasExponentPart)) {
                CopyToTokenAndAdvance(Tokenizer, Token, Cursor - Tokenizer->At, Token_PrecisionNumber);
        if ((has_integer_part || has_fractional_part) &&
           (has_decimal_point || has_exponent_part)) {
                CopyToTokenAndAdvance(tokenizer, token, cursor - tokenizer->at, Token_PrecisionNumber);
                return true;
        }

        return false;
}

bool GetInteger(struct tokenizer *Tokenizer, struct token *Token) {
        char *LastChar = Tokenizer->At;
        for (; *LastChar && (GSCharIsDecimal(*LastChar) || GSCharIsAlphabetical(*LastChar)); ++LastChar);
bool GetInteger(Tokenizer *tokenizer, Token *token) {
        char *last_char = tokenizer->at;
        for (; *last_char && (gs_CharIsDecimal(*last_char) || gs_CharIsAlphabetical(*last_char)); ++last_char);

        int Length = LastChar - Tokenizer->At;
        --LastChar;
        int length = last_char - tokenizer->at;
        --last_char;

        /* Token->Type = Token_Unknown; */
        /* Token->Text = Tokenizer->At; */
        /* Token->TextLength = Length; */
        /* Token->Textlength = length; */

        if (Length < 1) return false;
        if (length < 1) return false;

        char *Cursor = Tokenizer->At;
        char *cursor = tokenizer->at;

        if ((IsOctalString(Cursor, Length) || IsHexadecimalString(Cursor, Length)) ||
            (1 == Length && '0' == *Cursor)) {
                CopyToTokenAndAdvance(Tokenizer, Token, Length, Token_Integer);
        if ((IsOctalString(cursor, length) || IsHexadecimalString(cursor, length)) ||
            (1 == length && '0' == *cursor)) {
                CopyToTokenAndAdvance(tokenizer, token, length, Token_Integer);
                return true;
        }

        /* Can't have a multi-digit integer starting with zero unless it's Octal. */
        if ('0' == *Cursor) {
        if ('0' == *cursor) {
                return false;
        }

        for (int i=0; i<Length-1; ++i) {
                if (!GSCharIsDecimal(Cursor[i])) {
        for (int i=0; i<length-1; ++i) {
                if (!gs_CharIsDecimal(cursor[i])) {
                        return false;
                }
        }

        if (GSCharIsDecimal(*LastChar) || IsIntegerSuffix(*LastChar)) {
                CopyToTokenAndAdvance(Tokenizer, Token, Length, Token_Integer);
        if (gs_CharIsDecimal(*last_char) || IsIntegerSuffix(*last_char)) {
                CopyToTokenAndAdvance(tokenizer, token, length, Token_Integer);
                return true;
        }

        return false;
}

bool GetIdentifier(struct tokenizer *Tokenizer, struct token *Token) {
        if (!GSCharIsAlphabetical(Tokenizer->At[0]) &&
           '_' != Tokenizer->At[0]) {
bool GetIdentifier(Tokenizer *tokenizer, Token *token) {
        if (!gs_CharIsAlphabetical(tokenizer->at[0]) &&
           '_' != tokenizer->at[0]) {
                return false;
        }

        char *Cursor = Tokenizer->At;
        char *cursor = tokenizer->at;

        for (; IsIdentifierCharacter(*Cursor); ++Cursor);
        CopyToTokenAndAdvance(Tokenizer, Token, Cursor - Tokenizer->At, Token_Identifier);
        for (; IsIdentifierCharacter(*cursor); ++cursor);
        CopyToTokenAndAdvance(tokenizer, token, cursor - tokenizer->at, Token_Identifier);

        return true;
}

bool GetComment(struct tokenizer *Tokenizer, struct token *Token) {
        if (Tokenizer->At[0] != '/' || Tokenizer->At[1] != '*') return false;
bool GetComment(Tokenizer *tokenizer, Token *token) {
        if (tokenizer->at[0] != '/' || tokenizer->at[1] != '*') return false;

        char *Cursor = Tokenizer->At;
        char *cursor = tokenizer->at;

        while (true) {
                if ('\0' == *Cursor) {
                if ('\0' == *cursor) {
                        return false;
                }

                if ('*' == Cursor[0] && '/' == Cursor[1]) {
                if ('*' == cursor[0] && '/' == cursor[1]) {
                        break;
                }
                ++Cursor;
                ++cursor;
        }

        Cursor += 2; /* Swallow last two characters: asterisk, slash */
        cursor += 2; /* Swallow last two characters: asterisk, slash */

        CopyToTokenAndAdvance(Tokenizer, Token, Cursor - Tokenizer->At, Token_Comment);
        CopyToTokenAndAdvance(tokenizer, token, cursor - tokenizer->at, Token_Comment);

        return true;
}

bool GetKeyword(struct tokenizer *Tokenizer, struct token *Token) {
        static char *Keywords[] = {
bool GetKeyword(Tokenizer *tokenizer, Token *token) {
        static char *keywords[] = {
                "auto", "break", "case", "char", "const", "continue", "default",
                "double", "do", "else", "enum", "extern", "float", "for",
                "goto", "if", "int", "long", "register", "return", "short",


@@ 448,9 443,9 @@ bool GetKeyword(struct tokenizer *Tokenizer, struct token *Token) {
                "union", "unsigned", "void", "volatile", "while"
        };

        for (int i = 0; i < GSArraySize(Keywords); ++i) {
                if (GSStringIsEqual(Tokenizer->At, Keywords[i], GSStringLength(Keywords[i]))) {
                        CopyToTokenAndAdvance(Tokenizer, Token, GSStringLength(Keywords[i]), Token_Keyword);
        for (int i = 0; i < gs_ArraySize(keywords); ++i) {
                if (gs_StringIsEqual(tokenizer->at, keywords[i], gs_StringLength(keywords[i]))) {
                        CopyToTokenAndAdvance(tokenizer, token, gs_StringLength(keywords[i]), Token_Keyword);

                        return true;
                }


@@ 459,157 454,159 @@ bool GetKeyword(struct tokenizer *Tokenizer, struct token *Token) {
        return false;
}

bool GetPreprocessorCommand(struct tokenizer *Tokenizer, struct token *Token) {
        if (Tokenizer->At[0] != '#') return false;
bool GetPreprocessorCommand(Tokenizer *tokenizer, Token *token) {
        if (tokenizer->at[0] != '#') return false;

        char *Cursor = Tokenizer->At;
        char *cursor = tokenizer->at;

        /* Preprocessor commands must start a line on their own. */
        for (--Cursor; Cursor > Tokenizer->Beginning && GSCharIsWhitespace(*Cursor); --Cursor);
        for (--cursor; cursor > tokenizer->beginning && gs_CharIsWhitespace(*cursor); --cursor);

        if (*(++Cursor) != '\n' && Cursor != Tokenizer->Beginning) {
        if (*(++cursor) != '\n' && cursor != tokenizer->beginning) {
                return false;
        }
        Cursor = Tokenizer->At + 1; /* Skip the starting '#' for macros. */
        cursor = tokenizer->at + 1; /* Skip the starting '#' for macros. */

        while (true) {
                if (*Cursor == '\n' && *(Cursor - 1) != '\\') break;
                if (*Cursor == '\0') break;
                ++Cursor;
                if (*cursor == '\n' && *(cursor - 1) != '\\') break;
                if (*cursor == '\0') break;
                ++cursor;
        }

        CopyToTokenAndAdvance(Tokenizer, Token, Cursor - Tokenizer->At, Token_PreprocessorCommand);
        CopyToTokenAndAdvance(tokenizer, token, cursor - tokenizer->at, Token_PreprocessorCommand);

        return true;
}

bool GetSymbol(struct tokenizer *Tokenizer, struct token *Token, char *Symbol, enum token_type Type) {
        int Length = GSStringLength(Symbol);
        if (!GSStringIsEqual(Tokenizer->At, Symbol, Length)) return false;
bool GetSymbol(Tokenizer *tokenizer, Token *token, char *symbol, TokenType type) {
        int length = gs_StringLength(symbol);
        if (!gs_StringIsEqual(tokenizer->at, symbol, length)) return false;

        CopyToTokenAndAdvance(Tokenizer, Token, Length, Type);
        CopyToTokenAndAdvance(tokenizer, token, length, type);

        return true;
}

struct token GetToken(struct tokenizer *Tokenizer) {
        EatAllWhitespace(Tokenizer);
Token GetToken(Tokenizer *tokenizer) {
        EatAllWhitespace(tokenizer);

        struct token Token;
        Token.Text = Tokenizer->At;
        Token.TextLength = 0;
        Token.Type = Token_Unknown;
        Token token;
        token.text = tokenizer->at;
        token.text_length = 0;
        token.type = Token_Unknown;

        {
                GetSymbol(Tokenizer, &Token, "==", Token_LogicalEqual) ||
                        GetSymbol(Tokenizer, &Token, "<<=", Token_DoubleLessThanEquals) ||
                        GetSymbol(Tokenizer, &Token, ">>=", Token_DoubleGreaterThanEquals) ||
                        GetSymbol(Tokenizer, &Token, "...", Token_Ellipsis) ||
                        GetSymbol(Tokenizer, &Token, "!=", Token_NotEqual) ||
                        GetSymbol(Tokenizer, &Token, ">=", Token_GreaterThanEqual) ||
                        GetSymbol(Tokenizer, &Token, "<=", Token_LessThanEqual) ||
                        GetSymbol(Tokenizer, &Token, "->", Token_Arrow) ||
                        GetSymbol(Tokenizer, &Token, "||", Token_LogicalOr) ||
                        GetSymbol(Tokenizer, &Token, "&&", Token_LogicalAnd) ||
                        GetSymbol(Tokenizer, &Token, "<<", Token_BitShiftLeft) ||
                        GetSymbol(Tokenizer, &Token, ">>", Token_BitShiftRight) ||
                        GetSymbol(Tokenizer, &Token, "++", Token_PlusPlus) ||
                        GetSymbol(Tokenizer, &Token, "--", Token_MinusMinus) ||

                        GetSymbol(Tokenizer, &Token, "*=", Token_MultiplyEquals) ||
                        GetSymbol(Tokenizer, &Token, "/=", Token_DivideEquals) ||
                        GetSymbol(Tokenizer, &Token, "%=", Token_ModuloEquals) ||
                        GetSymbol(Tokenizer, &Token, "+=", Token_PlusEquals) ||
                        GetSymbol(Tokenizer, &Token, "-=", Token_MinusEquals) ||
                        GetSymbol(Tokenizer, &Token, "&=", Token_AmpersandEquals) ||
                        GetSymbol(Tokenizer, &Token, "^=", Token_CaratEquals) ||
                        GetSymbol(Tokenizer, &Token, "|=", Token_PipeEquals);
                GetSymbol(tokenizer, &token, "==", Token_LogicalEqual) ||
                        GetSymbol(tokenizer, &token, "<<=", Token_DoubleLessThanEquals) ||
                        GetSymbol(tokenizer, &token, ">>=", Token_DoubleGreaterThanEquals) ||
                        GetSymbol(tokenizer, &token, "...", Token_Ellipsis) ||
                        GetSymbol(tokenizer, &token, "!=", Token_NotEqual) ||
                        GetSymbol(tokenizer, &token, ">=", Token_GreaterThanEqual) ||
                        GetSymbol(tokenizer, &token, "<=", Token_LessThanEqual) ||
                        GetSymbol(tokenizer, &token, "->", Token_Arrow) ||
                        GetSymbol(tokenizer, &token, "||", Token_LogicalOr) ||
                        GetSymbol(tokenizer, &token, "&&", Token_LogicalAnd) ||
                        GetSymbol(tokenizer, &token, "<<", Token_BitShiftLeft) ||
                        GetSymbol(tokenizer, &token, ">>", Token_BitShiftRight) ||
                        GetSymbol(tokenizer, &token, "++", Token_PlusPlus) ||
                        GetSymbol(tokenizer, &token, "--", Token_MinusMinus) ||

                        GetSymbol(tokenizer, &token, "*=", Token_MultiplyEquals) ||
                        GetSymbol(tokenizer, &token, "/=", Token_DivideEquals) ||
                        GetSymbol(tokenizer, &token, "%=", Token_ModuloEquals) ||
                        GetSymbol(tokenizer, &token, "+=", Token_PlusEquals) ||
                        GetSymbol(tokenizer, &token, "-=", Token_MinusEquals) ||
                        GetSymbol(tokenizer, &token, "&=", Token_AmpersandEquals) ||
                        GetSymbol(tokenizer, &token, "^=", Token_CaratEquals) ||
                        GetSymbol(tokenizer, &token, "|=", Token_PipeEquals);

        }
        if (Token.Type != Token_Unknown) return Token;

        {
                GetKeyword(Tokenizer, &Token) ||
                        GetCharacter(Tokenizer, &Token) ||
                        GetPreprocessorCommand(Tokenizer, &Token) ||
                        GetComment(Tokenizer, &Token) ||
                        GetString(Tokenizer, &Token) ||
                        GetPrecisionNumber(Tokenizer, &Token) ||
                        GetInteger(Tokenizer, &Token) ||
                        GetIdentifier(Tokenizer, &Token);
        if (token.type != Token_Unknown) return token;

        {
                GetKeyword(tokenizer, &token) ||
                        GetCharacter(tokenizer, &token) ||
                        GetPreprocessorCommand(tokenizer, &token) ||
                        GetComment(tokenizer, &token) ||
                        GetString(tokenizer, &token) ||
                        GetPrecisionNumber(tokenizer, &token) ||
                        GetInteger(tokenizer, &token) ||
                        GetIdentifier(tokenizer, &token);
        }

        if (Token.Type == Token_PreprocessorCommand ||
           Token.Type == Token_Comment) {
                Token = GetToken(Tokenizer);
        if (token.type == Token_PreprocessorCommand || token.type == Token_Comment) {
                token = GetToken(tokenizer);
        }

        if (Token.Type != Token_Unknown) return Token;

        char C = Tokenizer->At[0];
        CopyToTokenAndAdvance(Tokenizer, &Token, 1, Token_Unknown);

        switch(C)
        {
                case '\0':{ Token.Type = Token_EndOfStream; } break;
                case '(': { Token.Type = Token_OpenParen; } break;
                case ')': { Token.Type = Token_CloseParen; } break;
                case ':': { Token.Type = Token_Colon; } break;
                case ';': { Token.Type = Token_SemiColon; } break;
                case '*': { Token.Type = Token_Asterisk; } break;
                case '[': { Token.Type = Token_OpenBracket; } break;
                case ']': { Token.Type = Token_CloseBracket; } break;
                case '{': { Token.Type = Token_OpenBrace; } break;
                case '}': { Token.Type = Token_CloseBrace; } break;
                case ',': { Token.Type = Token_Comma; } break;
                case '-': { Token.Type = Token_Dash; } break;
                case '+': { Token.Type = Token_Cross; } break;
                case '=': { Token.Type = Token_EqualSign; } break;
                case '^': { Token.Type = Token_Carat; } break;
                case '&': { Token.Type = Token_Ampersand; } break;
                case '%': { Token.Type = Token_PercentSign; } break;
                case '?': { Token.Type = Token_QuestionMark; } break;
                case '!': { Token.Type = Token_Bang; } break;
                case '/': { Token.Type = Token_Slash; } break;
                case '|': { Token.Type = Token_Pipe; } break;
                case '<': { Token.Type = Token_LessThan; } break;
                case '>': { Token.Type = Token_GreaterThan; } break;
                case '~': { Token.Type = Token_Tilde; } break;
                case '.': { Token.Type = Token_Dot; } break;
                case '#': { Token.Type = Token_Hash; } break;
        if (token.type != Token_Unknown) return token;

        char c = tokenizer->at[0];
        CopyToTokenAndAdvance(tokenizer, &token, 1, Token_Unknown);

        switch (c) {
                case '\0':{ token.type = Token_EndOfStream; } break;
                case '(': { token.type = Token_OpenParen; } break;
                case ')': { token.type = Token_CloseParen; } break;
                case ':': { token.type = Token_Colon; } break;
                case ';': { token.type = Token_SemiColon; } break;
                case '*': { token.type = Token_Asterisk; } break;
                case '[': { token.type = Token_OpenBracket; } break;
                case ']': { token.type = Token_CloseBracket; } break;
                case '{': { token.type = Token_OpenBrace; } break;
                case '}': { token.type = Token_CloseBrace; } break;
                case ',': { token.type = Token_Comma; } break;
                case '-': { token.type = Token_Dash; } break;
                case '+': { token.type = Token_Cross; } break;
                case '=': { token.type = Token_EqualSign; } break;
                case '^': { token.type = Token_Carat; } break;
                case '&': { token.type = Token_Ampersand; } break;
                case '%': { token.type = Token_PercentSign; } break;
                case '?': { token.type = Token_QuestionMark; } break;
                case '!': { token.type = Token_Bang; } break;
                case '/': { token.type = Token_Slash; } break;
                case '|': { token.type = Token_Pipe; } break;
                case '<': { token.type = Token_LessThan; } break;
                case '>': { token.type = Token_GreaterThan; } break;
                case '~': { token.type = Token_Tilde; } break;
                case '.': { token.type = Token_Dot; } break;
                case '#': { token.type = Token_Hash; } break;
        }

        return Token;
        return token;
}

void Lex(gs_buffer *FileContents) {
        struct tokenizer Tokenizer;
        TokenizerInit(&Tokenizer, FileContents->Start);
void Lex(gs_Buffer *stream) {
        Tokenizer tokenizer;
        TokenizerInit(&tokenizer, stream->start);

        bool parsing = true;
        while (parsing) {
                Token token = GetToken(&tokenizer);
                switch (token.type) {
                        case Token_EndOfStream: {
                                parsing = false;
                        } break;

        bool Parsing = true;
        while (Parsing) {
                struct token Token = GetToken(&Tokenizer);
                switch(Token.Type) {
                        case Token_EndOfStream: { Parsing = false; } break;
                        case Token_Unknown: {
                                printf("[%u,%u] Token Name: %20s, Token Text: %.*s (%.*s)\n",
                                       Token.Line + 1,
                                       Token.Column,
                                       TokenName(Token.Type),
                                       (u32)(Token.TextLength), Token.Text,
                                       (u32)(Token.TextLength + 4), Token.Text - 2);
                                       token.line + 1,
                                       token.column,
                                       TokenName(token.type),
                                       (u32)(token.text_length), token.text,
                                       (u32)(token.text_length + 4), token.text - 2);
                        } break;

                        default: {
                                printf("[%u,%u] Token Name: %20s, Token Text: %.*s\n",
                                       Token.Line + 1,
                                       Token.Column,
                                       TokenName(Token.Type),
                                       (u32)(Token.TextLength),
                                       Token.Text);
                                       token.line + 1,
                                       token.column,
                                       TokenName(token.type),
                                       (u32)(token.text_length),
                                       token.text);
                        } break;
                }
        }
}

#endif /* _LEXER_C */
#endif /* LEXER_C */

M src/main.c => src/main.c +34 -39
@@ 1,7 1,7 @@
/******************************************************************************
 * File: main.c
 * Created:
 * Updated: 2016-11-03
 * Updated: 2016-11-04
 * Package: C-Parser
 * Creator: Aaron Oman (GrooveStomp)
 * Copyright - 2020, Aaron Oman and the C-Parser contributors


@@ 11,14 11,14 @@
#include "lexer.c"
#include "parser.c"

 #include <stdlib.h> /* EXIT_SUCCESS, EXIT_FAILURE */
#include <stdlib.h> /* EXIT_SUCCESS, EXIT_FAILURE */
#include <stdio.h>
#include <string.h> // strerror
#include <sys/stat.h>
#include <errno.h>

void Usage(const char *Name) {
        printf("Usage: %s operation file [options]\n", Name);
void Usage(const char *name) {
        printf("Usage: %s operation file [options]\n", name);
        puts("  operation: One of: [parse, lex].");
        puts("  file: Must be a file in this directory.");
        puts("  Specify '-h' or '--help' for this help text.");


@@ 29,59 29,54 @@ void Usage(const char *Name) {
}

int main(int argc, char **argv) {
        const char *ProgName = argv[0];
        const char *prog_name = argv[0];

        for (int i = 0; i < argc; i++) {
                if (GSStringIsEqual(argv[i], "--help", 6) ||
                    GSStringIsEqual(argv[i], "-help", 5) ||
                    GSStringIsEqual(argv[i], "-h", 2))
                        Usage(ProgName);
                if (gs_StringIsEqual(argv[i], "--help", 6) ||
                    gs_StringIsEqual(argv[i], "-help", 5) ||
                    gs_StringIsEqual(argv[i], "-h", 2))
                        Usage(prog_name);
        }

        if (argc < 3) Usage(ProgName);
        if (argc < 3) Usage(prog_name);

        char *Command = argv[1];
        char *command = argv[1];

        if (!GSStringIsEqual(Command, "parse", 5) &&
            !GSStringIsEqual(Command, "lex", 3))
                Usage(ProgName);
        if (!gs_StringIsEqual(command, "parse", 5) &&
            !gs_StringIsEqual(command, "lex", 3))
                Usage(prog_name);

        char *Filename = argv[2];
        struct stat StatBuf;
        if (stat(Filename, &StatBuf) != 0) {
                fprintf(stderr, strerror(errno));
        char *filename = argv[2];
        struct stat stat_buf;
        if (stat(filename, &stat_buf) != 0) {
                fprintf(stderr, "%s\n", strerror(errno));
                exit(EXIT_FAILURE);
        }

        char *BufStart = (char *)malloc(StatBuf.st_size);
        gs_buffer Buffer;
        GSBufferInit(&Buffer, BufStart, StatBuf.st_size);
        char *buf_start = (char *)malloc(stat_buf.st_size);
        gs_Buffer buffer;
        gs_BufferInit(&buffer, buf_start, stat_buf.st_size);

        FILE *File = fopen(Filename, "r");
        if (File == NULL) {
                fprintf(stderr, strerror(errno));
        FILE *file = fopen(filename, "r");
        if (file == NULL) {
                fprintf(stderr, "%s\n", strerror(errno));
                exit(EXIT_FAILURE);
        }

        size_t BytesRead = fread(Buffer.Cursor, 1, StatBuf.st_size, File);
        Buffer.Length += StatBuf.st_size;
        Buffer.Cursor += StatBuf.st_size;
        *(Buffer.Cursor) = '\0';
        size_t bytes_read = fread(buffer.cursor, 1, stat_buf.st_size, file);
        buffer.length += stat_buf.st_size;
        buffer.cursor += stat_buf.st_size;
        *(buffer.cursor) = '\0';

        fclose(File);
        fclose(file);

        gs_allocator Allocator = {
                .Alloc = malloc,
                .Free = free,
                .Realloc = realloc,
                .ArrayAlloc = calloc,
        };
        gs_Allocator allocator = { .malloc = malloc, .free = free, .realloc = realloc, .calloc = calloc };

        if (GSStringIsEqual(Command, "parse", 5)) {
                bool ShowParseTree = (argc == 4 && GSStringIsEqual(argv[3], "--show-parse-tree", 17));
                Parse(Allocator, &Buffer, ShowParseTree);
        if (gs_StringIsEqual(command, "parse", 5)) {
                bool show_parse_tree = (argc == 4 && gs_StringIsEqual(argv[3], "--show-parse-tree", 17));
                Parse(allocator, &buffer, show_parse_tree);
        } else {
                Lex(&Buffer);
                Lex(&buffer);
        }

        return EXIT_SUCCESS;

M src/parse_tree.c => src/parse_tree.c +107 -106
@@ 1,7 1,7 @@
/******************************************************************************
 * File: parse_tree.c
 * Created:
 * Updated: 2016-11-03
 * Updated: 2016-11-04
 * Package: C-Parser
 * Creator: Aaron Oman (GrooveStomp)
 * Copyright - 2020, Aaron Oman and the C-Parser contributors


@@ 11,188 11,189 @@
#define PARSE_TREE

#include "gs.h"
#include "lexer.c"

#define DEFAULT_ALLOC_COUNT 2

typedef struct parse_tree_node {
        gs_allocator Allocator;
        u32 NameLength;
        u32 Capacity;
        u32 NumChildren;
        token Token;
        char *Name;
        struct parse_tree_node *Children;
} parse_tree_node;
typedef struct ParseTreeNode {
        gs_Allocator allocator;
        u32 name_length;
        u32 capacity;
        u32 num_children;
        Token token;
        char *name;
        struct ParseTreeNode *children;
} ParseTreeNode;

typedef enum ParseTreeErrorEnum {
        ParseTreeErrorChildAlloc,
        ParseTreeErrorNone,
} ParseTreeErrorEnum;

const char *__ParseTree_ErrorStrings[] = {
const char *__parse_tree_ErrorStrings[] = {
        "Couldn't allocate memory for new child node",
        "No Error"
};

ParseTreeErrorEnum __ParseTree_LastError = ParseTreeErrorNone;
ParseTreeErrorEnum __parse_tree_LastError = ParseTreeErrorNone;

const char *ParseTreeErrorString() {
        const char *Result = __ParseTree_ErrorStrings[__ParseTree_LastError];
        __ParseTree_LastError = ParseTreeErrorNone;
        const char *result = __parse_tree_ErrorStrings[__parse_tree_LastError];
        __parse_tree_LastError = ParseTreeErrorNone;

        return Result;
        return result;
}

parse_tree_node *ParseTreeInit(gs_allocator Allocator);
void ParseTreeDeinit(parse_tree_node *Node);
ParseTreeNode *ParseTreeInit(gs_Allocator allocator);
void ParseTreeDeinit(ParseTreeNode *node);

void ParseTreeSetName(parse_tree_node *Node, char *Name);
void ParseTreeSetToken(parse_tree_node *Node, token Token);
void ParseTreeSet(parse_tree_node *Self, char *Name, token Token);
void ParseTreeNewChildren(parse_tree_node *Self, u32 Count);
void ParseTreePrint(parse_tree_node *Self, u32 IndentLevel, u32 IndentIncrement);
void ParseTreeSetName(ParseTreeNode *node, char *name);
void ParseTreeSetToken(ParseTreeNode *node, Token token);
void ParseTreeSet(ParseTreeNode *self, char *name, Token token);
void ParseTreeNewChildren(ParseTreeNode *self, u32 Count);
void ParseTreePrint(ParseTreeNode *self, u32 IndentLevel, u32 IndentIncrement);

parse_tree_node *__ParseTree_Alloc(gs_allocator Allocator) {
        parse_tree_node *Node = (parse_tree_node *)Allocator.Alloc(sizeof(*Node));
        return Node;
ParseTreeNode *__parse_tree_Alloc(gs_Allocator allocator) {
        ParseTreeNode *node = (ParseTreeNode *)allocator.malloc(sizeof(*node));
        return node;
}

void __ParseTree_Init(parse_tree_node *Node, gs_allocator Allocator) {
        Node->Allocator = Allocator;
void __parse_tree_Init(ParseTreeNode *node, gs_Allocator allocator) {
        node->allocator = allocator;

        Node->Token.Text = NULL;
        Node->Token.TextLength = 0;
        Node->Token.Type = Token_Unknown;
        Node->Token.Line = 0;
        Node->Token.Column = 0;
        node->token.text = NULL;
        node->token.text_length = 0;
        node->token.type = Token_Unknown;
        node->token.line = 0;
        node->token.column = 0;

        Node->Name = GSNullPtr;
        Node->NameLength = 0;
        Node->Children = GSNullPtr;
        Node->NumChildren = 0;
        Node->Capacity = 0;
        node->name = GS_NULL_PTR;
        node->name_length = 0;
        node->children = GS_NULL_PTR;
        node->num_children = 0;
        node->capacity = 0;

        return;
}

parse_tree_node *ParseTreeInit(gs_allocator Allocator) {
        parse_tree_node *Node = __ParseTree_Alloc(Allocator);
        __ParseTree_Init(Node, Allocator);
        return Node;
ParseTreeNode *ParseTreeInit(gs_Allocator allocator) {
        ParseTreeNode *node = __parse_tree_Alloc(allocator);
        __parse_tree_Init(node, allocator);
        return node;
}

/* Name must be a NULL-terminated string! */
void ParseTreeSetName(parse_tree_node *Node, char *Name) {
        u32 NameLength = GSStringLength(Name);
        if (Node->Name != NULL) {
                Node->Allocator.Free(Node->Name);
/* name must be a NULL-terminated string! */
void ParseTreeSetName(ParseTreeNode *node, char *name) {
        u32 name_length = gs_StringLength(name);
        if (node->name != NULL) {
                node->allocator.free(node->name);
        }

        Node->Name = (char *)Node->Allocator.Alloc(NameLength + 1);
        GSStringCopy(Name, Node->Name, NameLength);
        Node->NameLength = NameLength;
        node->name = (char *)node->allocator.malloc(name_length + 1);
        gs_StringCopy(name, node->name, name_length);
        node->name_length = name_length;
}

void ParseTreeSetToken(parse_tree_node *Node, token Token) {
        token *This = &(Node->Token);
        This->Text = Token.Text;
        This->TextLength = Token.TextLength;
        This->Type = Token.Type;
        This->Line = Token.Line;
        This->Column = Token.Column;
void ParseTreeSetToken(ParseTreeNode *node, Token token) {
        Token *this = &(node->token);
        this->text = token.text;
        this->text_length = token.text_length;
        this->type = token.type;
        this->line = token.line;
        this->column = token.column;
}

void ParseTreeSet(parse_tree_node *Self, char *Name, token Token) {
        ParseTreeSetName(Self, Name);
        ParseTreeSetToken(Self, Token);
void ParseTreeSet(ParseTreeNode *self, char *name, Token token) {
        ParseTreeSetName(self, name);
        ParseTreeSetToken(self, token);
}

bool __ParseTree_AddChild(parse_tree_node *Self, char *Name) {
        u32 NameLength = GSStringLength(Name);
        u32 AllocCount = DEFAULT_ALLOC_COUNT;
bool __parse_tree_AddChild(ParseTreeNode *self, char *name) {
        u32 name_length = gs_StringLength(name);
        u32 alloc_count = DEFAULT_ALLOC_COUNT;

        if (Self->Children == NULL) {
                Self->Children = (parse_tree_node *)Self->Allocator.Alloc(sizeof(parse_tree_node) * AllocCount);
                if (Self->Children == NULL) {
                        __ParseTree_LastError = ParseTreeErrorChildAlloc;
        if (self->children == NULL) {
                self->children = (ParseTreeNode *)self->allocator.malloc(sizeof(ParseTreeNode) * alloc_count);
                if (self->children == NULL) {
                        __parse_tree_LastError = ParseTreeErrorChildAlloc;
                        return false;
                }
                Self->Capacity = AllocCount;
                for (int i=0; i<AllocCount; i++) {
                        __ParseTree_Init(&Self->Children[i], Self->Allocator);
                self->capacity = alloc_count;
                for (int i=0; i<alloc_count; i++) {
                        __parse_tree_Init(&self->children[i], self->allocator);
                }
        } else if (Self->Capacity <= Self->NumChildren) {
                if (Self->Capacity > 0) {
                        AllocCount = Self->Capacity * 2;
                        Self->Children = (parse_tree_node *)Self->Allocator.Realloc(Self->Children, sizeof(parse_tree_node) * AllocCount);
                        if (Self->Children == NULL) {
                                __ParseTree_LastError = ParseTreeErrorChildAlloc;
        } else if (self->capacity <= self->num_children) {
                if (self->capacity > 0) {
                        alloc_count = self->capacity * 2;
                        self->children = (ParseTreeNode *)self->allocator.realloc(self->children, sizeof(ParseTreeNode) * alloc_count);
                        if (self->children == NULL) {
                                __parse_tree_LastError = ParseTreeErrorChildAlloc;
                                return false;
                        }
                        Self->Capacity = AllocCount;
                        for (int i=Self->NumChildren; i<AllocCount; i++) {
                                __ParseTree_Init(&Self->Children[i], Self->Allocator);
                        self->capacity = alloc_count;
                        for (int i=self->num_children; i<alloc_count; i++) {
                                __parse_tree_Init(&self->children[i], self->allocator);
                        }
                }
        }

        ParseTreeSetName(&Self->Children[Self->NumChildren], Name);
        Self->NumChildren++;
        ParseTreeSetName(&self->children[self->num_children], name);
        self->num_children++;

        return true;
}

void ParseTreeNewChildren(parse_tree_node *Self, u32 Count) {
        for (int i=0; i<Count; i++) {
                __ParseTree_AddChild(Self, "Empty");
void ParseTreeNewChildren(ParseTreeNode *self, u32 count) {
        for (int i = 0; i < count; i++) {
                __parse_tree_AddChild(self, "Empty");
        }
}

void ParseTreeDeinit(parse_tree_node *Self) {
        if (Self == NULL) {
void ParseTreeDeinit(ParseTreeNode *self) {
        if (self == NULL) {
                return;
        }

        if (Self->Children != NULL) {
                Self->Allocator.Free(Self->Children);
                Self->Children = NULL;
                Self->NumChildren = 0;
                Self->Capacity = 0;
        if (self->children != NULL) {
                self->allocator.free(self->children);
                self->children = NULL;
                self->num_children = 0;
                self->capacity = 0;
        }

        if (Self->Name != NULL) {
                Self->Allocator.Free(Self->Name);
                Self->Name = NULL;
                Self->NameLength = 0;
        if (self->name != NULL) {
                self->allocator.free(self->name);
                self->name = NULL;
                self->name_length = 0;
        }

        Self->Allocator.Free(Self);
        self->allocator.free(self);
}

void ParseTreePrint(parse_tree_node *Self, u32 IndentLevel, u32 IndentIncrement) {
        int MinCompareLength = GSMin(Self->NameLength, 5);
        if (GSStringIsEqual("Empty", Self->Name, MinCompareLength)) return;
void ParseTreePrint(ParseTreeNode *self, u32 IndentLevel, u32 IndentIncrement) {
        int min_compare_length = gs_Min(self->name_length, 5);
        if (gs_StringIsEqual("Empty", self->name, min_compare_length)) return;

        if (Self->Token.Type != Token_Unknown) {
                printf("[%4d,%3d] ", Self->Token.Line, Self->Token.Column);
        if (self->token.type != Token_Unknown) {
                printf("[%4d,%3d] ", self->token.line, self->token.column);
        } else {
                printf("           ");
        }

        if (IndentLevel > 0) printf("%*c", IndentLevel * IndentIncrement, ' ');

        if (Self->NameLength > 0) {
                printf("%s", Self->Name);
        if (self->name_length > 0) {
                printf("%s", self->name);
        } else {
                printf("Unknown Name");
                printf("Unknown name");
        }

        if (Self->Token.Type != Token_Unknown) printf("( %.*s )", (u32)(Self->Token.TextLength), Self->Token.Text);
        if (self->token.type != Token_Unknown) printf("( %.*s )", (u32)(self->token.text_length), self->token.text);

        printf("\n");

        for (int i=0; i<Self->NumChildren; i++) {
                ParseTreePrint(&Self->Children[i], IndentLevel + 1, IndentIncrement);
        for (int i=0; i<self->num_children; i++) {
                ParseTreePrint(&self->children[i], IndentLevel + 1, IndentIncrement);
        }
}


M src/parser.c => src/parser.c +1287 -1291
@@ 1,105 1,107 @@
/******************************************************************************
 * File: parser.c
 * Created:
 * Updated: 2016-11-03
 * Updated: 2016-11-04
 * Package: C-Parser
 * Creator: Aaron Oman (GrooveStomp)
 * Copyright - 2020, Aaron Oman and the C-Parser contributors
 * SPDX-License-Identifier: LGPL-3.0-only
 ******************************************************************************/
#ifndef _PARSER_C
#define _PARSER_C
#ifndef PARSER_C
#define PARSER_C

#include <stdio.h>
#include "gs.h"
#include "lexer.c"
#include "parse_tree.c"

gs_allocator __Parser_Allocator;
#include <stdio.h>

gs_Allocator __parser_allocator;

void __Parser_ParseTreeUpdate(parse_tree_node *ParseTree, char *Name, u32 NumChildren) {
        ParseTreeSetName(ParseTree, Name);
        if (NumChildren > 0) {
                ParseTreeNewChildren(ParseTree, NumChildren);
void __parser_ParseTreeUpdate(ParseTreeNode *parse_tree, char *name, u32 num_children) {
        ParseTreeSetName(parse_tree, name);
        if (num_children > 0) {
                ParseTreeNewChildren(parse_tree, num_children);
        }
}

void __Parser_ParseTreeClearChildren(parse_tree_node *ParseTree) {
        for (int i = 0; i < ParseTree->NumChildren; i++) {
                ParseTreeSetName(&ParseTree->Children[i], "Empty");
void __parser_ParseTreeClearChildren(ParseTreeNode *parse_tree) {
        for (int i = 0; i < parse_tree->num_children; i++) {
                ParseTreeSetName(&parse_tree->children[i], "Empty");
        }
}

bool ParseAssignmentExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseTypeName(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseCastExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseConditionalExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseDeclarationList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseParameterTypeList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseAbstractDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParsePointer(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseSpecifierQualifierList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseInitializer(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseDeclarationSpecifiers(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseTypeQualifier(struct tokenizer *Tokneizer, parse_tree_node *ParseTree);
bool ParseTypeSpecifier(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseDeclaration(struct tokenizer *Tokenizer, parse_tree_node *ParseTree);
bool ParseAssignmentExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseTypeName(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseCastExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseConditionalExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseDeclarationList(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseParameterTypeList(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseAbstractDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParsePointer(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseSpecifierQualifierList(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseInitializer(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseDeclarationSpecifiers(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseTypeQualifier(Tokenizer *Tokneizer, ParseTreeNode *parse_tree);
bool ParseTypeSpecifier(Tokenizer *tokenizer, ParseTreeNode *parse_tree);
bool ParseDeclaration(Tokenizer *tokenizer, ParseTreeNode *parse_tree);

struct typedef_names {
        char *Name;
        int *NameIndex;
        int Capacity; /* Total allocated space for Name */
        int NumNames; /* Number of Name */
};
struct typedef_names TypedefNames;
typedef struct TypedefNames {
        char *name;
        int *name_index;
        int capacity; /* Total allocated space for Name */
        int num_names; /* Number of Name */
} TypedefNames;

TypedefNames __parser_typedef_names;

void TypedefClear() {
        __Parser_Allocator.Free((void *)TypedefNames.Name);
        __Parser_Allocator.Free((void *)TypedefNames.NameIndex);
        TypedefNames.Capacity = 0;
        TypedefNames.NumNames = 0;
        __parser_allocator.free((void *)__parser_typedef_names.name);
        __parser_allocator.free((void *)__parser_typedef_names.name_index);
        __parser_typedef_names.capacity = 0;
        __parser_typedef_names.num_names = 0;
}

void TypedefInit() {
        char *Memory = (char *)__Parser_Allocator.Alloc(1024);
        TypedefNames.Name = Memory;
        TypedefNames.Capacity = 1024;
        TypedefNames.NameIndex = __Parser_Allocator.Alloc(1024 / 2 * sizeof(int));
        TypedefNames.NumNames = 0;
        char *Memory = (char *)__parser_allocator.malloc(1024);
        __parser_typedef_names.name = Memory;
        __parser_typedef_names.capacity = 1024;
        __parser_typedef_names.name_index = __parser_allocator.malloc(1024 / 2 * sizeof(int));
        __parser_typedef_names.num_names = 0;
}

bool TypedefIsName(struct token Token) {
        for (int i = 0; i < TypedefNames.NumNames; i++) {
                if (GSStringIsEqual(Token.Text, &TypedefNames.Name[TypedefNames.NameIndex[i]], Token.TextLength)) {
bool TypedefIsName(Token token) {
        for (int i = 0; i < __parser_typedef_names.num_names; i++) {
                if (gs_StringIsEqual(token.text, &__parser_typedef_names.name[__parser_typedef_names.name_index[i]], token.text_length)) {
                        return true;
                }
        }
        return false;
}

bool TypedefAddName(char *Name) {
        if (TypedefNames.NumNames == 0) {
                GSStringCopy(Name, TypedefNames.Name, GSStringLength(Name));
                TypedefNames.NumNames++;
bool TypedefAddName(char *name) {
        if (__parser_typedef_names.num_names == 0) {
                gs_StringCopy(name, __parser_typedef_names.name, gs_StringLength(name));
                __parser_typedef_names.num_names++;
                return true;
        }

        int CurrentNameIndex = TypedefNames.NameIndex[TypedefNames.NumNames - 1];
        int current_name_index = __parser_typedef_names.name_index[__parser_typedef_names.num_names - 1];
        /* NameLength doesn't account for trailing NULL */
        int NameLength = GSStringLength(&TypedefNames.Name[CurrentNameIndex]);
        int UsedSpace = &TypedefNames.Name[CurrentNameIndex] - TypedefNames.Name + NameLength + 1;
        int RemainingCapacity = TypedefNames.Capacity - UsedSpace;
        int name_length = gs_StringLength(&__parser_typedef_names.name[current_name_index]);
        int used_space = &__parser_typedef_names.name[current_name_index] - __parser_typedef_names.name + name_length + 1;
        int remaining_capacity = __parser_typedef_names.capacity - used_space;

        int NewNameLength = GSStringLength(Name);
        if (NewNameLength + 1 > RemainingCapacity) {
        int new_name_length = gs_StringLength(name);
        if (new_name_length + 1 > remaining_capacity) {
                return false;
        }

        GSStringCopy(Name, &TypedefNames.Name[CurrentNameIndex] + NameLength + 1, GSStringLength(Name));
        TypedefNames.NumNames++;
        gs_StringCopy(name, &__parser_typedef_names.name[current_name_index] + name_length + 1, gs_StringLength(name));
        __parser_typedef_names.num_names++;
        return true;
}



@@ 110,42 112,41 @@ bool TypedefAddName(char *Name) {
          floating-constant
          enumeration-constant
*/
bool ParseConstant(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token = GetToken(Tokenizer);
bool ParseConstant(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token = GetToken(tokenizer);

        switch(Token.Type)
        {
        switch (token.type) {
                case Token_Integer:
                case Token_Character:
                case Token_PrecisionNumber:
/*      TODO:   case Token_Enumeration:*/
                {
                        ParseTreeSet(ParseTree, "Constant", Token);
                        ParseTreeSet(parse_tree, "Constant", token);
                        return true;
                } break;
                default:
                {
                        *Tokenizer = Start;
                        *tokenizer = start;
                        return false;
                }
        }
}

bool ParseArgumentExpressionListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseArgumentExpressionListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Argument Expression List'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Argument Expression List'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseAssignmentExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseArgumentExpressionListI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseAssignmentExpression(tokenizer, &parse_tree->children[1]) &&
           ParseArgumentExpressionListI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 154,17 155,17 @@ bool ParseArgumentExpressionListI(struct tokenizer *Tokenizer, parse_tree_node *
          assignment-expression
          argument-expression-list , assignment-expression
*/
bool ParseArgumentExpressionList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseArgumentExpressionList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Argument Expresion List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Argument Expresion List", 2);

        if (ParseAssignmentExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseArgumentExpressionListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseAssignmentExpression(tokenizer, &parse_tree->children[0]) &&
           ParseArgumentExpressionListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 175,110 176,110 @@ bool ParseArgumentExpressionList(struct tokenizer *Tokenizer, parse_tree_node *P
          string
          ( expression )
*/
bool ParsePrimaryExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[2];
bool ParsePrimaryExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Primary Expression", 3);
        __parser_ParseTreeUpdate(parse_tree, "Primary Expression", 3);

        if (Token_Identifier == (Tokens[0] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Identifier", Tokens[0]);
        if (Token_Identifier == (tokens[0] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Identifier", tokens[0]);
                return true;
        }

        *Tokenizer = Start;
        if (ParseConstant(Tokenizer, &ParseTree->Children[0])) return true;
        *tokenizer = start;
        if (ParseConstant(tokenizer, &parse_tree->children[0])) return true;

        *Tokenizer = Start;
        if (Token_String == (Tokens[0] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "String", Tokens[0]);
        *tokenizer = start;
        if (Token_String == (tokens[0] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "String", tokens[0]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseExpression(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseExpression(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParsePostfixExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[2];
bool ParsePostfixExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Postfix Expression'", 4);
        __parser_ParseTreeUpdate(parse_tree, "Postfix Expression'", 4);

        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseExpression(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           ParseExpression(tokenizer, &parse_tree->children[1]) &&
           Token_CloseBracket == (tokens[0] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseArgumentExpressionList(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseArgumentExpressionList(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_Dot == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_Identifier == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Identifier", Tokens[1]);
        *tokenizer = start;
        if (Token_Dot == (tokens[0] = GetToken(tokenizer)).type &&
           Token_Identifier == (tokens[1] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Identifier", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_Arrow == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_Identifier == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Identifier", Tokens[1]);
        *tokenizer = start;
        if (Token_Arrow == (tokens[0] = GetToken(tokenizer)).type &&
           Token_Identifier == (tokens[1] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Identifier", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_PlusPlus == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[1])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
        *tokenizer = start;
        if (Token_PlusPlus == (tokens[0] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[1])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_MinusMinus == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[1])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
        *tokenizer = start;
        if (Token_MinusMinus == (tokens[0] = GetToken(tokenizer)).type &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[1])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 292,25 293,24 @@ bool ParsePostfixExpressionI(struct tokenizer *Tokenizer, parse_tree_node *Parse
          postfix-expression ++
          postfix-expression --
*/
bool ParsePostfixExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParsePostfixExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Postfix Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Postfix Expression", 2);

        if (ParsePrimaryExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParsePostfixExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParsePrimaryExpression(tokenizer, &parse_tree->children[0]) &&
           ParsePostfixExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseUnaryOperator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token = GetToken(Tokenizer);
        switch(Token.Type)
        {
bool ParseUnaryOperator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token = GetToken(tokenizer);
        switch (token.type) {
                case Token_Ampersand:
                case Token_Asterisk:
                case Token_Cross:


@@ 318,12 318,12 @@ bool ParseUnaryOperator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree)
                case Token_Tilde:
                case Token_Bang:
                {
                        ParseTreeSet(ParseTree, "Unary Operator", Token);
                        ParseTreeSet(parse_tree, "Unary Operator", token);
                        return true;
                }
                default:
                {
                        *Tokenizer = Start;
                        *tokenizer = start;
                        return false;
                }
        }


@@ 338,66 338,66 @@ bool ParseUnaryOperator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree)
          sizeof unary-expression
          sizeof ( type-name )
*/
bool ParseUnaryExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[2];
bool ParseUnaryExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Unary Expression", 4);
        __parser_ParseTreeUpdate(parse_tree, "Unary Expression", 4);

        if (ParsePostfixExpression(Tokenizer, &ParseTree->Children[0])) {
        if (ParsePostfixExpression(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_PlusPlus == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseUnaryExpression(Tokenizer, &ParseTree->Children[1])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
        *tokenizer = start;
        if (Token_PlusPlus == (tokens[0] = GetToken(tokenizer)).type &&
           ParseUnaryExpression(tokenizer, &parse_tree->children[1])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_MinusMinus == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseUnaryExpression(Tokenizer, &ParseTree->Children[1])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
        *tokenizer = start;
        if (Token_MinusMinus == (tokens[0] = GetToken(tokenizer)).type &&
           ParseUnaryExpression(tokenizer, &parse_tree->children[1])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseUnaryOperator(Tokenizer, &ParseTree->Children[0]) &&
           ParseCastExpression(Tokenizer, &ParseTree->Children[1])) {
        *tokenizer = start;
        if (ParseUnaryOperator(tokenizer, &parse_tree->children[0]) &&
           ParseCastExpression(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        Tokens[0] = GetToken(Tokenizer);
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("sizeof", Tokens[0].Text, GSStringLength("sizeof"))) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
        *tokenizer = start;
        tokens[0] = GetToken(tokenizer);
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("sizeof", tokens[0].text, gs_StringLength("sizeof"))) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);

                struct tokenizer Previous = *Tokenizer;
                if (ParseUnaryExpression(Tokenizer, &ParseTree->Children[1])) {
                Tokenizer Previous = *tokenizer;
                if (ParseUnaryExpression(tokenizer, &parse_tree->children[1])) {
                        return true;
                }

                *Tokenizer = Previous;
                if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
                   ParseTypeName(Tokenizer, &ParseTree->Children[2]) &&
                   Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type) {
                        ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[0]);
                        ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[1]);
                *tokenizer = Previous;
                if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
                   ParseTypeName(tokenizer, &parse_tree->children[2]) &&
                   Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type) {
                        ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[0]);
                        ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[1]);
                        return true;
                }
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 406,60 406,60 @@ bool ParseUnaryExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTre
          unary-expression
          ( type-name ) cast-expression
*/
bool ParseCastExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[2];
bool ParseCastExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Cast Expression", 4);
        __parser_ParseTreeUpdate(parse_tree, "Cast Expression", 4);

        if (ParseUnaryExpression(Tokenizer, &ParseTree->Children[0])) {
        if (ParseUnaryExpression(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseTypeName(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseCastExpression(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseTypeName(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseCastExpression(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseMultiplicativeExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseMultiplicativeExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Multiplicative Expression", 3);
        __parser_ParseTreeUpdate(parse_tree, "Multiplicative Expression", 3);

        if (Token_Asterisk == (Token = GetToken(Tokenizer)).Type &&
           ParseCastExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseMultiplicativeExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Asterisk == (token = GetToken(tokenizer)).type &&
           ParseCastExpression(tokenizer, &parse_tree->children[1]) &&
           ParseMultiplicativeExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_Slash == (Token = GetToken(Tokenizer)).Type &&
           ParseCastExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseMultiplicativeExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_Slash == (token = GetToken(tokenizer)).type &&
           ParseCastExpression(tokenizer, &parse_tree->children[1]) &&
           ParseMultiplicativeExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_PercentSign == (Token = GetToken(Tokenizer)).Type &&
           ParseCastExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseMultiplicativeExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_PercentSign == (token = GetToken(tokenizer)).type &&
           ParseCastExpression(tokenizer, &parse_tree->children[1]) &&
           ParseMultiplicativeExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 470,42 470,42 @@ bool ParseMultiplicativeExpressionI(struct tokenizer *Tokenizer, parse_tree_node
          multiplicative-expression / cast-expression
          multiplicative-expression % cast-expression
*/
bool ParseMultiplicativeExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseMultiplicativeExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Multiplicative Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Multiplicative Expression", 2);

        if (ParseCastExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseMultiplicativeExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseCastExpression(tokenizer, &parse_tree->children[0]) &&
           ParseMultiplicativeExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseAdditiveExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseAdditiveExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Additive Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Additive Expression'", 3);

        if (Token_Cross == (Token = GetToken(Tokenizer)).Type &&
           ParseMultiplicativeExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseAdditiveExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Cross == (token = GetToken(tokenizer)).type &&
           ParseMultiplicativeExpression(tokenizer, &parse_tree->children[1]) &&
           ParseAdditiveExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_Dash == (Token = GetToken(Tokenizer)).Type &&
           ParseMultiplicativeExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseAdditiveExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_Dash == (token = GetToken(tokenizer)).type &&
           ParseMultiplicativeExpression(tokenizer, &parse_tree->children[1]) &&
           ParseAdditiveExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 515,42 515,42 @@ bool ParseAdditiveExpressionI(struct tokenizer *Tokenizer, parse_tree_node *Pars
          additive-expression + multiplicative-expression
          additive-expression - multiplicative-expression
*/
bool ParseAdditiveExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseAdditiveExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Additive Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Additive Expression", 2);

        if (ParseMultiplicativeExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseAdditiveExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseMultiplicativeExpression(tokenizer, &parse_tree->children[0]) &&
           ParseAdditiveExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseShiftExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseShiftExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Shift Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Shift Expression'", 3);

        if (Token_BitShiftLeft == (Token = GetToken(Tokenizer)).Type &&
           ParseAdditiveExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseShiftExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_BitShiftLeft == (token = GetToken(tokenizer)).type &&
           ParseAdditiveExpression(tokenizer, &parse_tree->children[1]) &&
           ParseShiftExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_BitShiftRight == (Token = GetToken(Tokenizer)).Type &&
           ParseAdditiveExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseShiftExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_BitShiftRight == (token = GetToken(tokenizer)).type &&
           ParseAdditiveExpression(tokenizer, &parse_tree->children[1]) &&
           ParseShiftExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 560,58 560,58 @@ bool ParseShiftExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTr
          shift-expression << additive-expression
          shift-expression >> additive-expression
*/
bool ParseShiftExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseShiftExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Shift Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Shift Expression", 2);

        if (ParseAdditiveExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseShiftExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseAdditiveExpression(tokenizer, &parse_tree->children[0]) &&
           ParseShiftExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseRelationalExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseRelationalExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Relational Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Relational Expression'", 3);

        if (Token_LessThan == (Token = GetToken(Tokenizer)).Type &&
           ParseShiftExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseRelationalExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_LessThan == (token = GetToken(tokenizer)).type &&
           ParseShiftExpression(tokenizer, &parse_tree->children[1]) &&
           ParseRelationalExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_GreaterThan == (Token = GetToken(Tokenizer)).Type &&
           ParseShiftExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseRelationalExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_GreaterThan == (token = GetToken(tokenizer)).type &&
           ParseShiftExpression(tokenizer, &parse_tree->children[1]) &&
           ParseRelationalExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_LessThanEqual == (Token = GetToken(Tokenizer)).Type &&
           ParseShiftExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseRelationalExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_LessThanEqual == (token = GetToken(tokenizer)).type &&
           ParseShiftExpression(tokenizer, &parse_tree->children[1]) &&
           ParseRelationalExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_GreaterThanEqual == (Token = GetToken(Tokenizer)).Type &&
           ParseShiftExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseRelationalExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_GreaterThanEqual == (token = GetToken(tokenizer)).type &&
           ParseShiftExpression(tokenizer, &parse_tree->children[1]) &&
           ParseRelationalExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 623,42 623,42 @@ bool ParseRelationalExpressionI(struct tokenizer *Tokenizer, parse_tree_node *Pa
          relational-expression <= shift-exression
          relational-expression >= shift-expression
*/
bool ParseRelationalExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseRelationalExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Relational Expressoin", 2);
        __parser_ParseTreeUpdate(parse_tree, "Relational Expressoin", 2);

        if (ParseShiftExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseRelationalExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseShiftExpression(tokenizer, &parse_tree->children[0]) &&
           ParseRelationalExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseEqualityExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseEqualityExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Equality Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Equality Expression'", 3);

        if (Token_LogicalEqual == (Token = GetToken(Tokenizer)).Type &&
           ParseRelationalExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseEqualityExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_LogicalEqual == (token = GetToken(tokenizer)).type &&
           ParseRelationalExpression(tokenizer, &parse_tree->children[1]) &&
           ParseEqualityExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        if (Token_NotEqual == (Token = GetToken(Tokenizer)).Type &&
           ParseRelationalExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseEqualityExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_NotEqual == (token = GetToken(tokenizer)).type &&
           ParseRelationalExpression(tokenizer, &parse_tree->children[1]) &&
           ParseEqualityExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 668,34 668,34 @@ bool ParseEqualityExpressionI(struct tokenizer *Tokenizer, parse_tree_node *Pars
          equality-expression == relational-expression
          equality-expression != relational-expression
*/
bool ParseEqualityExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseEqualityExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Equality Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Equality Expression", 2);

        if (ParseRelationalExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseEqualityExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseRelationalExpression(tokenizer, &parse_tree->children[0]) &&
           ParseEqualityExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseAndExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseAndExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "And Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "And Expression'", 3);

        if (Token_Ampersand == (Token = GetToken(Tokenizer)).Type &&
           ParseEqualityExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseAndExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Ampersand == (token = GetToken(tokenizer)).type &&
           ParseEqualityExpression(tokenizer, &parse_tree->children[1]) &&
           ParseAndExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 704,34 704,34 @@ bool ParseAndExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree
          equality-expression
          AND-expression & equality-expression
*/
bool ParseAndExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseAndExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "And Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "And Expression", 2);

        if (ParseEqualityExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseAndExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseEqualityExpression(tokenizer, &parse_tree->children[0]) &&
           ParseAndExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseExclusiveOrExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseExclusiveOrExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Exclusive Or Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Exclusive Or Expression'", 3);

        if (Token_Carat == (Token = GetToken(Tokenizer)).Type &&
           ParseAndExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseExclusiveOrExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Carat == (token = GetToken(tokenizer)).type &&
           ParseAndExpression(tokenizer, &parse_tree->children[1]) &&
           ParseExclusiveOrExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 740,34 740,34 @@ bool ParseExclusiveOrExpressionI(struct tokenizer *Tokenizer, parse_tree_node *P
          AND-expression
          exclusive-OR-expression ^ AND-expression
 */
bool ParseExclusiveOrExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseExclusiveOrExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Exclusive Or Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Exclusive Or Expression", 2);

        if (ParseAndExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseExclusiveOrExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseAndExpression(tokenizer, &parse_tree->children[0]) &&
           ParseExclusiveOrExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseInclusiveOrExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseInclusiveOrExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Inclusive Or Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Inclusive Or Expression'", 3);

        if (Token_Pipe == (Token = GetToken(Tokenizer)).Type &&
           ParseExclusiveOrExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseInclusiveOrExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Pipe == (token = GetToken(tokenizer)).type &&
           ParseExclusiveOrExpression(tokenizer, &parse_tree->children[1]) &&
           ParseInclusiveOrExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 776,34 776,34 @@ bool ParseInclusiveOrExpressionI(struct tokenizer *Tokenizer, parse_tree_node *P
          exclusive-OR-expression
          inclusive-OR-expression | exclusive-OR-expression
*/
bool ParseInclusiveOrExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseInclusiveOrExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Inclusive Or Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Inclusive Or Expression", 2);

        if (ParseExclusiveOrExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseInclusiveOrExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseExclusiveOrExpression(tokenizer, &parse_tree->children[0]) &&
           ParseInclusiveOrExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseLogicalAndExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseLogicalAndExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Logical And Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Logical And Expression'", 3);

        if (Token_LogicalAnd == (Token = GetToken(Tokenizer)).Type &&
           ParseInclusiveOrExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseLogicalAndExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_LogicalAnd == (token = GetToken(tokenizer)).type &&
           ParseInclusiveOrExpression(tokenizer, &parse_tree->children[1]) &&
           ParseLogicalAndExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 812,34 812,34 @@ bool ParseLogicalAndExpressionI(struct tokenizer *Tokenizer, parse_tree_node *Pa
          inclusive-OR-expression
          logical-AND-expression && inclusive-OR-expression
*/
bool ParseLogicalAndExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseLogicalAndExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Logical And Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Logical And Expression", 2);

        if (ParseInclusiveOrExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseLogicalAndExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseInclusiveOrExpression(tokenizer, &parse_tree->children[0]) &&
           ParseLogicalAndExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseLogicalOrExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseLogicalOrExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Logical Or Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Logical Or Expression'", 3);

        if (Token_LogicalOr == (Token = GetToken(Tokenizer)).Type &&
           ParseLogicalAndExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseLogicalOrExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_LogicalOr == (token = GetToken(tokenizer)).type &&
           ParseLogicalAndExpression(tokenizer, &parse_tree->children[1]) &&
           ParseLogicalOrExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 848,17 848,17 @@ bool ParseLogicalOrExpressionI(struct tokenizer *Tokenizer, parse_tree_node *Par
          logical-AND-expression
          logical-OR-expression || logical-AND-expression
*/
bool ParseLogicalOrExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseLogicalOrExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Logical Or Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Logical Or Expression", 2);

        if (ParseLogicalAndExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseLogicalOrExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseLogicalAndExpression(tokenizer, &parse_tree->children[0]) &&
           ParseLogicalOrExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 866,16 866,16 @@ bool ParseLogicalOrExpression(struct tokenizer *Tokenizer, parse_tree_node *Pars
  constant-expression:
          conditional-expression
*/
bool ParseConstantExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseConstantExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Constant Expression", 1);
        __parser_ParseTreeUpdate(parse_tree, "Constant Expression", 1);

        if (ParseConditionalExpression(Tokenizer, &ParseTree->Children[0])) {
        if (ParseConditionalExpression(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 884,30 884,30 @@ bool ParseConstantExpression(struct tokenizer *Tokenizer, parse_tree_node *Parse
          logical-OR-expression
          logical-OR-expression ? expression : conditional-expression
*/
bool ParseConditionalExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[2];
bool ParseConditionalExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Conditional Expression", 5);
        __parser_ParseTreeUpdate(parse_tree, "Conditional Expression", 5);

        if (ParseLogicalOrExpression(Tokenizer, &ParseTree->Children[0]) &&
           Token_QuestionMark == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseExpression(Tokenizer, &ParseTree->Children[2]) &&
           Token_Colon == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseConditionalExpression(Tokenizer, &ParseTree->Children[4])) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[1]);
        if (ParseLogicalOrExpression(tokenizer, &parse_tree->children[0]) &&
           Token_QuestionMark == (tokens[0] = GetToken(tokenizer)).type &&
           ParseExpression(tokenizer, &parse_tree->children[2]) &&
           Token_Colon == (tokens[1] = GetToken(tokenizer)).type &&
           ParseConditionalExpression(tokenizer, &parse_tree->children[4])) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseLogicalOrExpression(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseLogicalOrExpression(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 915,12 915,11 @@ bool ParseConditionalExpression(struct tokenizer *Tokenizer, parse_tree_node *Pa
  assignment-operator:
  one of: = *= /= %= += -= <<= >>= &= ^= |=
*/
bool ParseAssignmentOperator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token = GetToken(Tokenizer);
bool ParseAssignmentOperator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token = GetToken(tokenizer);

        switch(Token.Type)
        {
        switch (token.type) {
                case Token_EqualSign:
                case Token_MultiplyEquals:
                case Token_DivideEquals:


@@ 931,14 930,13 @@ bool ParseAssignmentOperator(struct tokenizer *Tokenizer, parse_tree_node *Parse
                case Token_DoubleGreaterThanEquals:
                case Token_AmpersandEquals:
                case Token_CaratEquals:
                case Token_PipeEquals:
                {
                        ParseTreeSet(ParseTree, "Assignment Operator", Token);
                case Token_PipeEquals: {
                        ParseTreeSet(parse_tree, "Assignment Operator", token);
                        return true;
                }
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 947,42 945,42 @@ bool ParseAssignmentOperator(struct tokenizer *Tokenizer, parse_tree_node *Parse
          conditional-expression
          unary-expression assignment-operator assignment-expression
*/
bool ParseAssignmentExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseAssignmentExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Assignment Expression", 3);
        __parser_ParseTreeUpdate(parse_tree, "Assignment Expression", 3);

        if (ParseUnaryExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseAssignmentOperator(Tokenizer, &ParseTree->Children[1]) &&
           ParseAssignmentExpression(Tokenizer, &ParseTree->Children[2])) {
        if (ParseUnaryExpression(tokenizer, &parse_tree->children[0]) &&
           ParseAssignmentOperator(tokenizer, &parse_tree->children[1]) &&
           ParseAssignmentExpression(tokenizer, &parse_tree->children[2])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseConditionalExpression(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseConditionalExpression(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseExpressionI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Expression'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Expression'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseAssignmentExpression(Tokenizer, &ParseTree->Children[1]) &&
           ParseExpressionI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseAssignmentExpression(tokenizer, &parse_tree->children[1]) &&
           ParseExpressionI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 991,30 989,30 @@ bool ParseExpressionI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
          assignment-expression
          expression , assignment-expression
*/
bool ParseExpression(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseExpression(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Expression", 2);
        __parser_ParseTreeUpdate(parse_tree, "Expression", 2);

        if (ParseAssignmentExpression(Tokenizer, &ParseTree->Children[0]) &&
           ParseExpressionI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseAssignmentExpression(tokenizer, &parse_tree->children[0]) &&
           ParseExpressionI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseIdentifier(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token;
bool ParseIdentifier(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        if (Token_Identifier == (Token = GetToken(Tokenizer)).Type) {
                ParseTreeSet(ParseTree, "Identifier", Token);
        if (Token_Identifier == (token = GetToken(tokenizer)).type) {
                ParseTreeSet(parse_tree, "Identifier", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1025,66 1023,66 @@ bool ParseIdentifier(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
          break ;
          return expression(opt) ;
*/
bool ParseJumpStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[2];
        Tokens[0] = GetToken(Tokenizer);
        struct tokenizer AtToken = *Tokenizer;
bool ParseJumpStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];
        tokens[0] = GetToken(tokenizer);
        Tokenizer at_token = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Jump Statement", 3);
        __parser_ParseTreeUpdate(parse_tree, "Jump Statement", 3);

        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("goto", Tokens[0].Text, Tokens[0].TextLength) &&
           ParseIdentifier(Tokenizer, &ParseTree->Children[1]) &&
           Token_SemiColon == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("goto", tokens[0].text, tokens[0].text_length) &&
           ParseIdentifier(tokenizer, &parse_tree->children[1]) &&
           Token_SemiColon == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("continue", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_SemiColon == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("continue", tokens[0].text, tokens[0].text_length) &&
           Token_SemiColon == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("break", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_SemiColon == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("break", tokens[0].text, tokens[0].text_length) &&
           Token_SemiColon == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("return", Tokens[0].Text, Tokens[0].TextLength)) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("return", tokens[0].text, tokens[0].text_length)) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                int ChildIndex = 1;
                struct tokenizer Previous = *Tokenizer;
                Tokenizer Previous = *tokenizer;

                if (!ParseExpression(Tokenizer, &ParseTree->Children[ChildIndex++])) {
                if (!ParseExpression(tokenizer, &parse_tree->children[ChildIndex++])) {
                        --ChildIndex;
                        *Tokenizer = Previous;
                        *tokenizer = Previous;
                }

                if (Token_SemiColon == (Tokens[1] = GetToken(Tokenizer)).Type) {
                        ParseTreeSet(&ParseTree->Children[ChildIndex], "Symbol", Tokens[1]);
                if (Token_SemiColon == (tokens[1] = GetToken(tokenizer)).type) {
                        ParseTreeSet(&parse_tree->children[ChildIndex], "Symbol", tokens[1]);
                        return true;
                }
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1094,103 1092,101 @@ bool ParseJumpStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree)
          do statement while ( expression) ;
          for ( expression(opt) ; expression(opt) ; expression(opt) ) statement
*/
bool ParseIterationStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[5];
        Tokens[0] = GetToken(Tokenizer);
        struct tokenizer AtToken = *Tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Iteration Statement", 10); /* TODO(AARON): Magic Number! */

        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("while", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_OpenParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseExpression(Tokenizer, &ParseTree->Children[2]) &&
           Token_CloseParen == (Tokens[2] = GetToken(Tokenizer)).Type &&
           ParseStatement(Tokenizer, &ParseTree->Children[4])) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
                ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[2]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("do", Tokens[0].Text, Tokens[0].TextLength) &&
           ParseStatement(Tokenizer, &ParseTree->Children[1])) {
                parse_tree_node *ChildNode = &ParseTree->Children[0];
                ParseTreeSet(ChildNode, "Keyword", Tokens[0]);

                Tokens[1] = GetToken(Tokenizer);
                if (Token_Keyword == Tokens[1].Type &&
                   GSStringIsEqual("while", Tokens[1].Text, Tokens[1].TextLength) &&
                   Token_OpenParen == (Tokens[2] = GetToken(Tokenizer)).Type &&
                   ParseExpression(Tokenizer, &ParseTree->Children[4]) &&
                   Token_CloseParen == (Tokens[3] = GetToken(Tokenizer)).Type &&
                   Token_SemiColon == (Tokens[4] = GetToken(Tokenizer)).Type) {
                        ParseTreeSet(++ChildNode, "Keyword", Tokens[1]);
                        ParseTreeSet(++ChildNode, "Symbol", Tokens[2]);
                        ++ChildNode; // Child #4 is set in the `if' above.
                        ParseTreeSet(++ChildNode, "Symbol", Tokens[3]);
                        ParseTreeSet(++ChildNode, "Symbol", Tokens[4]);
bool ParseIterationStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[5];
        tokens[0] = GetToken(tokenizer);
        Tokenizer at_token = *tokenizer;

        __parser_ParseTreeUpdate(parse_tree, "Iteration Statement", 10); /* TODO(AARON): Magic Number! */

        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("while", tokens[0].text, tokens[0].text_length) &&
           Token_OpenParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseExpression(tokenizer, &parse_tree->children[2]) &&
           Token_CloseParen == (tokens[2] = GetToken(tokenizer)).type &&
           ParseStatement(tokenizer, &parse_tree->children[4])) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[2]);
                return true;
        }

        __parser_ParseTreeClearChildren(parse_tree);

        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("do", tokens[0].text, tokens[0].text_length) &&
           ParseStatement(tokenizer, &parse_tree->children[1])) {
                ParseTreeNode *child_node = &parse_tree->children[0];
                ParseTreeSet(child_node, "Keyword", tokens[0]);

                tokens[1] = GetToken(tokenizer);
                if (Token_Keyword == tokens[1].type &&
                   gs_StringIsEqual("while", tokens[1].text, tokens[1].text_length) &&
                   Token_OpenParen == (tokens[2] = GetToken(tokenizer)).type &&
                   ParseExpression(tokenizer, &parse_tree->children[4]) &&
                   Token_CloseParen == (tokens[3] = GetToken(tokenizer)).type &&
                   Token_SemiColon == (tokens[4] = GetToken(tokenizer)).type) {
                        ParseTreeSet(++child_node, "Keyword", tokens[1]);
                        ParseTreeSet(++child_node, "Symbol", tokens[2]);
                        ++child_node; // Child #4 is set in the `if' above.
                        ParseTreeSet(++child_node, "Symbol", tokens[3]);
                        ParseTreeSet(++child_node, "Symbol", tokens[4]);
                        return true;
                }
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("for", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_OpenParen == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("for", tokens[0].text, tokens[0].text_length) &&
           Token_OpenParen == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);

                int ChildIndex = 2;
                int i = 2;

                struct tokenizer Previous = *Tokenizer;
                if (!ParseExpression(Tokenizer, &ParseTree->Children[ChildIndex])) {
                        *Tokenizer = Previous;
                }
                else
                {
                        ChildIndex++;
                Tokenizer Previous = *tokenizer;
                if (!ParseExpression(tokenizer, &parse_tree->children[i])) {
                        *tokenizer = Previous;
                } else {
                        i++;
                }

                if (Token_SemiColon != (Tokens[2] = GetToken(Tokenizer)).Type) {
                        *Tokenizer = Start;
                if (Token_SemiColon != (tokens[2] = GetToken(tokenizer)).type) {
                        *tokenizer = start;
                        return false;
                }
                ParseTreeSet(&ParseTree->Children[ChildIndex++], "Symbol", Tokens[2]);
                ParseTreeSet(&parse_tree->children[i++], "Symbol", tokens[2]);

                Previous = *Tokenizer;
                if (!ParseExpression(Tokenizer, &ParseTree->Children[ChildIndex++])) {
                        --ChildIndex;
                        *Tokenizer = Previous;
                Previous = *tokenizer;
                if (!ParseExpression(tokenizer, &parse_tree->children[i++])) {
                        --i;
                        *tokenizer = Previous;
                }

                if (Token_SemiColon != (Tokens[3] = GetToken(Tokenizer)).Type) {
                        *Tokenizer = Start;
                if (Token_SemiColon != (tokens[3] = GetToken(tokenizer)).type) {
                        *tokenizer = start;
                        return false;
                }
                ParseTreeSet(&ParseTree->Children[ChildIndex++], "Symbol", Tokens[3]);
                ParseTreeSet(&parse_tree->children[i++], "Symbol", tokens[3]);

                Previous = *Tokenizer;
                if (!ParseExpression(Tokenizer, &ParseTree->Children[ChildIndex++])) {
                        --ChildIndex;
                        *Tokenizer = Previous;
                Previous = *tokenizer;
                if (!ParseExpression(tokenizer, &parse_tree->children[i++])) {
                        --i;
                        *tokenizer = Previous;
                }

                if (Token_CloseParen == (Tokens[4] = GetToken(Tokenizer)).Type &&
                   ParseStatement(Tokenizer, &ParseTree->Children[ChildIndex + 1])) {
                        ParseTreeSet(&ParseTree->Children[ChildIndex], "Symbol", Tokens[4]);
                if (Token_CloseParen == (tokens[4] = GetToken(tokenizer)).type &&
                   ParseStatement(tokenizer, &parse_tree->children[i + 1])) {
                        ParseTreeSet(&parse_tree->children[i], "Symbol", tokens[4]);
                        return true;
                }
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1200,68 1196,68 @@ bool ParseIterationStatement(struct tokenizer *Tokenizer, parse_tree_node *Parse
          if ( expression ) statement else statement
          switch ( expression ) statement
*/
bool ParseSelectionStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Tokens[3];
        Tokens[0] = GetToken(Tokenizer);
        struct tokenizer AtToken = *Tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Selection Statement", 6);

        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("if", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_OpenParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseExpression(Tokenizer, &ParseTree->Children[2]) &&
           Token_CloseParen == (Tokens[2] = GetToken(Tokenizer)).Type &&
           ParseStatement(Tokenizer, &ParseTree->Children[4])) {
                struct tokenizer AtElse = *Tokenizer;
                struct token Token = GetToken(Tokenizer);

                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
                ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[2]);

                if (Token_Keyword == Token.Type &&
                   GSStringIsEqual("else", Token.Text, Token.TextLength) &&
                   ParseStatement(Tokenizer, &ParseTree->Children[5])) {
                        ParseTreeSet(&ParseTree->Children[4], "Keyword", Token);
bool ParseSelectionStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[3];
        tokens[0] = GetToken(tokenizer);
        Tokenizer at_token = *tokenizer;

        __parser_ParseTreeUpdate(parse_tree, "Selection Statement", 6);

        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("if", tokens[0].text, tokens[0].text_length) &&
           Token_OpenParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseExpression(tokenizer, &parse_tree->children[2]) &&
           Token_CloseParen == (tokens[2] = GetToken(tokenizer)).type &&
           ParseStatement(tokenizer, &parse_tree->children[4])) {
                Tokenizer at_else = *tokenizer;
                Token token = GetToken(tokenizer);

                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[2]);

                if (Token_Keyword == token.type &&
                   gs_StringIsEqual("else", token.text, token.text_length) &&
                   ParseStatement(tokenizer, &parse_tree->children[5])) {
                        ParseTreeSet(&parse_tree->children[4], "Keyword", token);
                        return true;
                }

                *Tokenizer = AtElse;
                *tokenizer = at_else;
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("switch", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_OpenParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseExpression(Tokenizer, &ParseTree->Children[2]) &&
           Token_CloseParen == (Tokens[2] = GetToken(Tokenizer)).Type &&
           ParseStatement(Tokenizer, &ParseTree->Children[4])) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
                ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[2]);
        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("switch", tokens[0].text, tokens[0].text_length) &&
           Token_OpenParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseExpression(tokenizer, &parse_tree->children[2]) &&
           Token_CloseParen == (tokens[2] = GetToken(tokenizer)).type &&
           ParseStatement(tokenizer, &parse_tree->children[4])) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[2]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseStatementListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseStatementListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Statement List'", 2);
        __parser_ParseTreeUpdate(parse_tree, "Statement List'", 2);

        if (ParseStatement(Tokenizer, &ParseTree->Children[0]) &&
           ParseStatementListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseStatement(tokenizer, &parse_tree->children[0]) &&
           ParseStatementListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1270,17 1266,17 @@ bool ParseStatementListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree
          statement
          statement-list statement
*/
bool ParseStatementList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseStatementList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Statement List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Statement List", 2);

        if (ParseStatement(Tokenizer, &ParseTree->Children[0]) &&
           ParseStatementListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseStatement(tokenizer, &parse_tree->children[0]) &&
           ParseStatementListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1288,35 1284,35 @@ bool ParseStatementList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree)
  compound-statement:
          { declaration-list(opt) statement-list(opt) }
*/
bool ParseCompoundStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseCompoundStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Compound Statement", 3);
        __parser_ParseTreeUpdate(parse_tree, "Compound Statement", 3);

        if (Token_OpenBrace == (Token = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
                int ChildIndex = 0;
        if (Token_OpenBrace == (token = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                int i = 0;

                struct tokenizer Previous = *Tokenizer;
                if (!ParseDeclarationList(Tokenizer, &ParseTree->Children[ChildIndex++])) {
                        --ChildIndex;
                        *Tokenizer = Previous;
                Tokenizer Previous = *tokenizer;
                if (!ParseDeclarationList(tokenizer, &parse_tree->children[i++])) {
                        --i;
                        *tokenizer = Previous;
                }

                Previous = *Tokenizer;
                if (!ParseStatementList(Tokenizer, &ParseTree->Children[ChildIndex++])) {
                        --ChildIndex;
                        *Tokenizer = Previous;
                Previous = *tokenizer;
                if (!ParseStatementList(tokenizer, &parse_tree->children[i++])) {
                        --i;
                        *tokenizer = Previous;
                }

                if (Token_CloseBrace == (Token = GetToken(Tokenizer)).Type) {
                        ParseTreeSet(&ParseTree->Children[ChildIndex], "Symbol", Token);
                if (Token_CloseBrace == (token = GetToken(tokenizer)).type) {
                        ParseTreeSet(&parse_tree->children[i], "Symbol", token);
                        return true;
                }
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1324,27 1320,27 @@ bool ParseCompoundStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseT
  expression-statement:
          expression(opt) ;
*/
bool ParseExpressionStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseExpressionStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Expression Statement", 2);
        __parser_ParseTreeUpdate(parse_tree, "Expression Statement", 2);

        if (ParseExpression(Tokenizer, &ParseTree->Children[0]) &&
           Token_SemiColon == (Token = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Token);
        if (ParseExpression(tokenizer, &parse_tree->children[0]) &&
           Token_SemiColon == (token = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", token);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_SemiColon == (Token = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_SemiColon == (token = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1354,46 1350,46 @@ bool ParseExpressionStatement(struct tokenizer *Tokenizer, parse_tree_node *Pars
          case constant-expression : statement
          default : statement
*/
bool ParseLabeledStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[2];
bool ParseLabeledStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Labeled Statement", 4);
        __parser_ParseTreeUpdate(parse_tree, "Labeled Statement", 4);

        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0]) &&
           Token_Colon == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseStatement(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[0]);
        if (ParseIdentifier(tokenizer, &parse_tree->children[0]) &&
           Token_Colon == (tokens[0] = GetToken(tokenizer)).type &&
           ParseStatement(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[0]);
                return true;
        }

        *Tokenizer = Start;
        Tokens[0] = GetToken(Tokenizer);
        struct tokenizer AtToken = *Tokenizer;
        *tokenizer = start;
        tokens[0] = GetToken(tokenizer);
        Tokenizer at_token = *tokenizer;

        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("case", Tokens[0].Text, Tokens[0].TextLength) &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[1]) &&
           Token_Colon == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseStatement(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("case", tokens[0].text, tokens[0].text_length) &&
           ParseConstantExpression(tokenizer, &parse_tree->children[1]) &&
           Token_Colon == (tokens[1] = GetToken(tokenizer)).type &&
           ParseStatement(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_Keyword == Tokens[0].Type &&
           GSStringIsEqual("default", Tokens[0].Text, Tokens[0].TextLength) &&
           Token_Colon == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseStatement(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Keyword", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = at_token;
        if (Token_Keyword == tokens[0].type &&
           gs_StringIsEqual("default", tokens[0].text, tokens[0].text_length) &&
           Token_Colon == (tokens[1] = GetToken(tokenizer)).type &&
           ParseStatement(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Keyword", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1406,30 1402,30 @@ bool ParseLabeledStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTr
          iteration-statement
          jump-statement
*/
bool ParseStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseStatement(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Statement", 1);
        parse_tree_node *Child = &ParseTree->Children[0];
        __parser_ParseTreeUpdate(parse_tree, "Statement", 1);
        ParseTreeNode *child = &parse_tree->children[0];

        if (ParseLabeledStatement(Tokenizer, Child)) return true;
        if (ParseLabeledStatement(tokenizer, child)) return true;

        *Tokenizer = Start;
        if (ParseExpressionStatement(Tokenizer, Child)) return true;
        *tokenizer = start;
        if (ParseExpressionStatement(tokenizer, child)) return true;

        *Tokenizer = Start;
        if (ParseCompoundStatement(Tokenizer, Child)) return true;
        *tokenizer = start;
        if (ParseCompoundStatement(tokenizer, child)) return true;

        *Tokenizer = Start;
        if (ParseSelectionStatement(Tokenizer, Child)) return true;
        *tokenizer = start;
        if (ParseSelectionStatement(tokenizer, child)) return true;

        *Tokenizer = Start;
        if (ParseIterationStatement(Tokenizer, Child)) return true;
        *tokenizer = start;
        if (ParseIterationStatement(tokenizer, child)) return true;

        *Tokenizer = Start;
        if (ParseJumpStatement(Tokenizer, Child)) return true;
        *tokenizer = start;
        if (ParseJumpStatement(tokenizer, child)) return true;

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1437,19 1433,19 @@ bool ParseStatement(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
  typedef-name:
          identifier
*/
bool ParseTypedefName(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token = GetToken(Tokenizer);
        *Tokenizer = Start;
bool ParseTypedefName(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token = GetToken(tokenizer);
        *tokenizer = start;

        __Parser_ParseTreeUpdate(ParseTree, "Typedef Name", 1);
        __parser_ParseTreeUpdate(parse_tree, "Typedef Name", 1);

        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0]) && TypedefIsName(Token)) {
                ParseTreeSet(ParseTree, "Typedef Name", Token);
        if (ParseIdentifier(tokenizer, &parse_tree->children[0]) && TypedefIsName(token)) {
                ParseTreeSet(parse_tree, "Typedef Name", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1459,54 1455,54 @@ bool ParseTypedefName(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
          direct-abstract-declarator(opt) [ constant-expression(opt) ]
          direct-abstract-declarator(opt) ( parameter-type-list(opt) )
*/
bool ParseDirectAbstractDeclaratorI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[2];
bool ParseDirectAbstractDeclaratorI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Direct Abstract Declarator'", 4);
        __parser_ParseTreeUpdate(parse_tree, "Direct Abstract Declarator'", 4);

        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseBracket == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           ParseConstantExpression(tokenizer, &parse_tree->children[1]) &&
           Token_CloseBracket == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseBracket == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseBracket == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseParameterTypeList(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseParameterTypeList(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1516,62 1512,62 @@ bool ParseDirectAbstractDeclaratorI(struct tokenizer *Tokenizer, parse_tree_node
          direct-abstract-declarator(opt) [ constant-expression(opt) ]
          direct-abstract-declarator(opt) ( parameter-type-list(opt) )
*/
bool ParseDirectAbstractDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[2];
bool ParseDirectAbstractDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Direct Abstract Declarator", 4);
        __parser_ParseTreeUpdate(parse_tree, "Direct Abstract Declarator", 4);

        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseAbstractDeclarator(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseAbstractDeclarator(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseBracket == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           ParseConstantExpression(tokenizer, &parse_tree->children[1]) &&
           Token_CloseBracket == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseBracket == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseBracket == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseParameterTypeList(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseParameterTypeList(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectAbstractDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectAbstractDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1580,29 1576,29 @@ bool ParseDirectAbstractDeclarator(struct tokenizer *Tokenizer, parse_tree_node 
          pointer
          pointer(opt) direct-abstract-declarator
*/
bool ParseAbstractDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseAbstractDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Abstract Declarator", 2);
        __parser_ParseTreeUpdate(parse_tree, "Abstract Declarator", 2);

        if (ParsePointer(Tokenizer, &ParseTree->Children[0]) &&
           ParseDirectAbstractDeclarator(Tokenizer, &ParseTree->Children[1])) {
        if (ParsePointer(tokenizer, &parse_tree->children[0]) &&
           ParseDirectAbstractDeclarator(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseDirectAbstractDeclarator(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseDirectAbstractDeclarator(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        if (ParsePointer(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParsePointer(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1610,41 1606,41 @@ bool ParseAbstractDeclarator(struct tokenizer *Tokenizer, parse_tree_node *Parse
  type-name:
          specifier-qualifier-list abstract-declarator(opt)
*/
bool ParseTypeName(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseTypeName(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Type Name", 2);
        __parser_ParseTreeUpdate(parse_tree, "Type Name", 2);

        if (ParseSpecifierQualifierList(Tokenizer, &ParseTree->Children[0]) &&
           ParseAbstractDeclarator(Tokenizer, &ParseTree->Children[1])) {
        if (ParseSpecifierQualifierList(tokenizer, &parse_tree->children[0]) &&
           ParseAbstractDeclarator(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseSpecifierQualifierList(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseSpecifierQualifierList(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseInitializerListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseInitializerListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Initializer List'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Initializer List'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseInitializer(Tokenizer, &ParseTree->Children[1]) &&
           ParseInitializerListI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseInitializer(tokenizer, &parse_tree->children[1]) &&
           ParseInitializerListI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1653,17 1649,17 @@ bool ParseInitializerListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTr
          initializer
          initializer-list , initializer
*/
bool ParseInitializerList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseInitializerList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Initializer List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Initializer List", 2);

        if (ParseInitializer(Tokenizer, &ParseTree->Children[0]) &&
           ParseInitializerListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseInitializer(tokenizer, &parse_tree->children[0]) &&
           ParseInitializerListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1673,54 1669,54 @@ bool ParseInitializerList(struct tokenizer *Tokenizer, parse_tree_node *ParseTre
          { initializer-list }
          { initializer-list , }
*/
bool ParseInitializer(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[3];
bool ParseInitializer(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[3];

        __Parser_ParseTreeUpdate(ParseTree, "Initializer", 4);
        __parser_ParseTreeUpdate(parse_tree, "Initializer", 4);

        if (ParseAssignmentExpression(Tokenizer, &ParseTree->Children[0])) {
        if (ParseAssignmentExpression(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenBrace == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseInitializerList(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseBrace == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenBrace == (tokens[0] = GetToken(tokenizer)).type &&
           ParseInitializerList(tokenizer, &parse_tree->children[1]) &&
           Token_CloseBrace == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenBrace == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseInitializerList(Tokenizer, &ParseTree->Children[1]) &&
           Token_Comma == (Tokens[1] = GetToken(Tokenizer)).Type &&
           Token_CloseBrace == (Tokens[2] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
                ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[2]);
        *tokenizer = start;
        if (Token_OpenBrace == (tokens[0] = GetToken(tokenizer)).type &&
           ParseInitializerList(tokenizer, &parse_tree->children[1]) &&
           Token_Comma == (tokens[1] = GetToken(tokenizer)).type &&
           Token_CloseBrace == (tokens[2] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[2]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseIdentifierListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseIdentifierListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Identifier List'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Identifier List'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseIdentifier(Tokenizer, &ParseTree->Children[1]) &&
           ParseIdentifierListI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseIdentifier(tokenizer, &parse_tree->children[1]) &&
           ParseIdentifierListI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1729,17 1725,17 @@ bool ParseIdentifierListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTre
          identifier
          identifier-list , identifier
*/
bool ParseIdentifierList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseIdentifierList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Identifier List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Identifier List", 2);

        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0]) &&
           ParseIdentifierListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseIdentifier(tokenizer, &parse_tree->children[0]) &&
           ParseIdentifierListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1748,47 1744,47 @@ bool ParseIdentifierList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree
          declaration-specifiers declarator
          declaration-specifiers abstract-declarator(opt)
*/
bool ParseParameterDeclaration(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseParameterDeclaration(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Parameter Declaration", 2);
        __parser_ParseTreeUpdate(parse_tree, "Parameter Declaration", 2);

        if (ParseDeclarationSpecifiers(Tokenizer, &ParseTree->Children[0]) &&
           ParseDeclarator(Tokenizer, &ParseTree->Children[1])) {
        if (ParseDeclarationSpecifiers(tokenizer, &parse_tree->children[0]) &&
           ParseDeclarator(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        if (ParseDeclarationSpecifiers(Tokenizer, &ParseTree->Children[0]) &&
           ParseAbstractDeclarator(Tokenizer, &ParseTree->Children[1])) {
        *tokenizer = start;
        if (ParseDeclarationSpecifiers(tokenizer, &parse_tree->children[0]) &&
           ParseAbstractDeclarator(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseDeclarationSpecifiers(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseDeclarationSpecifiers(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseParameterListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseParameterListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Parameter List'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Parameter List'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseParameterDeclaration(Tokenizer, &ParseTree->Children[1]) &&
           ParseParameterListI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseParameterDeclaration(tokenizer, &parse_tree->children[1]) &&
           ParseParameterListI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1797,17 1793,17 @@ bool ParseParameterListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree
          parameter-declaration
          parameter-list , parameter-declaration
*/
bool ParseParameterList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseParameterList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Parameter List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Parameter List", 2);

        if (ParseParameterDeclaration(Tokenizer, &ParseTree->Children[0]) &&
           ParseParameterListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseParameterDeclaration(tokenizer, &parse_tree->children[0]) &&
           ParseParameterListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1816,40 1812,40 @@ bool ParseParameterList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree)
          parameter-list
          parameter-list , ...
*/
bool ParseParameterTypeList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[2];
bool ParseParameterTypeList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Parameter Type List", 3);
        __parser_ParseTreeUpdate(parse_tree, "Parameter Type List", 3);

        if (ParseParameterList(Tokenizer, &ParseTree->Children[0])) {
                struct tokenizer Previous = *Tokenizer;
                if (Token_Comma == (Tokens[0] = GetToken(Tokenizer)).Type &&
                   Token_Ellipsis == (Tokens[1] = GetToken(Tokenizer)).Type) {
                        ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[0]);
                        ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (ParseParameterList(tokenizer, &parse_tree->children[0])) {
                Tokenizer Previous = *tokenizer;
                if (Token_Comma == (tokens[0] = GetToken(tokenizer)).type &&
                   Token_Ellipsis == (tokens[1] = GetToken(tokenizer)).type) {
                        ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[0]);
                        ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                        return true;
                }

                *Tokenizer = Previous;
                *tokenizer = Previous;
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseTypeQualifierListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseTypeQualifierListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Type Qualifier List'", 2);
        __parser_ParseTreeUpdate(parse_tree, "Type Qualifier List'", 2);

        if (ParseTypeQualifier(Tokenizer, &ParseTree->Children[0]) &&
           ParseTypeQualifierListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseTypeQualifier(tokenizer, &parse_tree->children[0]) &&
           ParseTypeQualifierListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1858,17 1854,17 @@ bool ParseTypeQualifierListI(struct tokenizer *Tokenizer, parse_tree_node *Parse
          type-qualifier
          type-qualifier-list type-qualifier
*/
bool ParseTypeQualifierList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseTypeQualifierList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Type Qualifier List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Type Qualifier List", 2);

        if (ParseTypeQualifier(Tokenizer, &ParseTree->Children[0]) &&
           ParseTypeQualifierListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseTypeQualifier(tokenizer, &parse_tree->children[0]) &&
           ParseTypeQualifierListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 1877,38 1873,38 @@ bool ParseTypeQualifierList(struct tokenizer *Tokenizer, parse_tree_node *ParseT
          * type-qualifier-list(opt)
          * type-qualifier-list(opt) pointer
  */
bool ParsePointer(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token = GetToken(Tokenizer);
        struct tokenizer AtToken = *Tokenizer;
bool ParsePointer(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token = GetToken(tokenizer);
        Tokenizer at_token = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Pointer", 2);
        __parser_ParseTreeUpdate(parse_tree, "Pointer", 2);

        if (Token_Asterisk != Token.Type) {
                *Tokenizer = Start;
        if (Token_Asterisk != token.type) {
                *tokenizer = start;
                return false;
        }

        ParseTreeSet(ParseTree, "Pointer", Token);
        ParseTreeSet(parse_tree, "Pointer", token);

        if (ParseTypeQualifierList(Tokenizer, &ParseTree->Children[0]) &&
           ParsePointer(Tokenizer, &ParseTree->Children[1])) {
        if (ParseTypeQualifierList(tokenizer, &parse_tree->children[0]) &&
           ParsePointer(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (ParsePointer(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = at_token;
        if (ParsePointer(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = AtToken;
        if (ParseTypeQualifierList(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = at_token;
        if (ParseTypeQualifierList(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = AtToken;
        *tokenizer = at_token;
        return true;
}



@@ 1920,64 1916,64 @@ bool ParsePointer(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
          direct-declarator ( parameter-type-list )
          direct-declarator ( identifier-list(opt) )
*/
bool ParseDirectDeclaratorI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[2];
bool ParseDirectDeclaratorI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Direct Declarator'", 4);
        __parser_ParseTreeUpdate(parse_tree, "Direct Declarator'", 4);

        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseBracket == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           ParseConstantExpression(tokenizer, &parse_tree->children[1]) &&
           Token_CloseBracket == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_OpenBracket == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseBracket == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenBracket == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseBracket == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseParameterTypeList(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseParameterTypeList(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseIdentifierList(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseIdentifierList(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 1989,28 1985,28 @@ bool ParseDirectDeclaratorI(struct tokenizer *Tokenizer, parse_tree_node *ParseT
          direct-declarator ( parameter-type-list )
          direct-declarator ( identifier-list(opt) )
*/
bool ParseDirectDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Tokens[2];
bool ParseDirectDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Direct Declarator", 4);
        __parser_ParseTreeUpdate(parse_tree, "Direct Declarator", 4);

        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0]) &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseIdentifier(tokenizer, &parse_tree->children[0]) &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        if (Token_OpenParen == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseDeclarator(Tokenizer, &ParseTree->Children[1]) &&
           Token_CloseParen == (Tokens[1] = GetToken(Tokenizer)).Type &&
           ParseDirectDeclaratorI(Tokenizer, &ParseTree->Children[3])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[1]);
        *tokenizer = start;
        if (Token_OpenParen == (tokens[0] = GetToken(tokenizer)).type &&
           ParseDeclarator(tokenizer, &parse_tree->children[1]) &&
           Token_CloseParen == (tokens[1] = GetToken(tokenizer)).type &&
           ParseDirectDeclaratorI(tokenizer, &parse_tree->children[3])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[1]);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2018,24 2014,24 @@ bool ParseDirectDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTr
  declarator:
          pointer(opt) direct-declarator
*/
bool ParseDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Declarator", 2);
        __parser_ParseTreeUpdate(parse_tree, "Declarator", 2);

        if (ParsePointer(Tokenizer, &ParseTree->Children[0]) &&
           ParseDirectDeclarator(Tokenizer, &ParseTree->Children[1])) {
        if (ParsePointer(tokenizer, &parse_tree->children[0]) &&
           ParseDirectDeclarator(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseDirectDeclarator(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseDirectDeclarator(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2044,44 2040,44 @@ bool ParseDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
          identifier
          identifier = constant-expression
*/
bool ParseEnumerator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseEnumerator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Enumerator", 3);
        __parser_ParseTreeUpdate(parse_tree, "Enumerator", 3);

        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0]) &&
           Token_EqualSign == (Token = GetToken(Tokenizer)).Type &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Token);
        if (ParseIdentifier(tokenizer, &parse_tree->children[0]) &&
           Token_EqualSign == (token = GetToken(tokenizer)).type &&
           ParseConstantExpression(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", token);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseIdentifier(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseEnumeratorListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseEnumeratorListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Enumerator List'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Enumerator List'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseEnumerator(Tokenizer, &ParseTree->Children[1]) &&
           ParseEnumeratorListI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseEnumerator(tokenizer, &parse_tree->children[1]) &&
           ParseEnumeratorListI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 2090,17 2086,17 @@ bool ParseEnumeratorListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTre
          enumerator
          enumerator-list , enumerator
*/
bool ParseEnumeratorList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseEnumeratorList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Enumerator List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Enumerator List", 2);

        if (ParseEnumerator(Tokenizer, &ParseTree->Children[0]) &&
           ParseEnumeratorListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseEnumerator(tokenizer, &parse_tree->children[0]) &&
           ParseEnumeratorListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2109,51 2105,51 @@ bool ParseEnumeratorList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree
          enum identifier(opt) { enumerator-list }
          enum identifier
*/
bool ParseEnumSpecifier(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        struct token Token = GetToken(Tokenizer);
        struct tokenizer AtToken = *Tokenizer;
        struct token Tokens[2];
bool ParseEnumSpecifier(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token = GetToken(tokenizer);
        Tokenizer at_token = *tokenizer;
        Token tokens[2];

        __Parser_ParseTreeUpdate(ParseTree, "Enum Specifier", 5);
        __parser_ParseTreeUpdate(parse_tree, "Enum Specifier", 5);

        if (!(Token_Keyword == Token.Type &&
             GSStringIsEqual("enum", Token.Text, Token.TextLength))) {
                *Tokenizer = Start;
        if (!(Token_Keyword == token.type &&
             gs_StringIsEqual("enum", token.text, token.text_length))) {
                *tokenizer = start;
                return false;
        }

        ParseTreeSet(&ParseTree->Children[0], "Keyword", Token);
        ParseTreeSet(&parse_tree->children[0], "Keyword", token);

        if (ParseIdentifier(Tokenizer, &ParseTree->Children[1]) &&
           Token_OpenBrace == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseEnumeratorList(Tokenizer, &ParseTree->Children[3]) &&
           Token_CloseBrace == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[2], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[4], "Symbol", Tokens[1]);
        if (ParseIdentifier(tokenizer, &parse_tree->children[1]) &&
           Token_OpenBrace == (tokens[0] = GetToken(tokenizer)).type &&
           ParseEnumeratorList(tokenizer, &parse_tree->children[3]) &&
           Token_CloseBrace == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[2], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[4], "Symbol", tokens[1]);
                return true;
        }


        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (Token_OpenBrace == (Tokens[0] = GetToken(Tokenizer)).Type &&
           ParseEnumeratorList(Tokenizer, &ParseTree->Children[2]) &&
           Token_CloseBrace == (Tokens[1] = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Tokens[0]);
                ParseTreeSet(&ParseTree->Children[3], "Symbol", Tokens[1]);
        *tokenizer = at_token;
        if (Token_OpenBrace == (tokens[0] = GetToken(tokenizer)).type &&
           ParseEnumeratorList(tokenizer, &parse_tree->children[2]) &&
           Token_CloseBrace == (tokens[1] = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", tokens[0]);
                ParseTreeSet(&parse_tree->children[3], "Symbol", tokens[1]);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = AtToken;
        if (ParseIdentifier(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = at_token;
        if (ParseIdentifier(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2162,53 2158,53 @@ bool ParseEnumSpecifier(struct tokenizer *Tokenizer, parse_tree_node *ParseTree)
          declarator
          declarator(opt) : constant-expression
*/
bool ParseStructDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseStructDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Struct Declarator", 3);
        __parser_ParseTreeUpdate(parse_tree, "Struct Declarator", 3);

        if (ParseDeclarator(Tokenizer, &ParseTree->Children[0]) &&
           Token_Colon == (Token = GetToken(Tokenizer)).Type &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Token);
        if (ParseDeclarator(tokenizer, &parse_tree->children[0]) &&
           Token_Colon == (token = GetToken(tokenizer)).type &&
           ParseConstantExpression(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", token);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (Token_Colon == (Token = GetToken(Tokenizer)).Type &&
           ParseConstantExpression(Tokenizer, &ParseTree->Children[1])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        *tokenizer = start;
        if (Token_Colon == (token = GetToken(tokenizer)).type &&
           ParseConstantExpression(tokenizer, &parse_tree->children[1])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseDeclarator(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseDeclarator(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}

bool ParseStructDeclaratorListI(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseStructDeclaratorListI(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Struct Declarator List'", 3);
        __parser_ParseTreeUpdate(parse_tree, "Struct Declarator List'", 3);

        if (Token_Comma == (Token = GetToken(Tokenizer)).Type &&
           ParseStructDeclarator(Tokenizer, &ParseTree->Children[1]) &&
           ParseStructDeclaratorListI(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[0], "Symbol", Token);
        if (Token_Comma == (token = GetToken(tokenizer)).type &&
           ParseStructDeclarator(tokenizer, &parse_tree->children[1]) &&
           ParseStructDeclaratorListI(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[0], "Symbol", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return true;
}



@@ 2217,17 2213,17 @@ bool ParseStructDeclaratorListI(struct tokenizer *Tokenizer, parse_tree_node *Pa
          struct-declarator
          struct-declarator-list , struct-declarator
*/
bool ParseStructDeclaratorList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseStructDeclaratorList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Struct Declarator List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Struct Declarator List", 2);

        if (ParseStructDeclarator(Tokenizer, &ParseTree->Children[0]) &&
           ParseStructDeclaratorListI(Tokenizer, &ParseTree->Children[1])) {
        if (ParseStructDeclarator(tokenizer, &parse_tree->children[0]) &&
           ParseStructDeclaratorListI(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2236,37 2232,37 @@ bool ParseStructDeclaratorList(struct tokenizer *Tokenizer, parse_tree_node *Par
          type-specifier specifier-qualifier-list(opt)
          type-qualifier specifier-qualifier-list(opt)
*/
bool ParseSpecifierQualifierList(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
bool ParseSpecifierQualifierList(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;

        __Parser_ParseTreeUpdate(ParseTree, "Specifier Qualifier List", 2);
        __parser_ParseTreeUpdate(parse_tree, "Specifier Qualifier List", 2);

        if (ParseTypeSpecifier(Tokenizer, &ParseTree->Children[0]) &&
           ParseSpecifierQualifierList(Tokenizer, &ParseTree->Children[1])) {
        if (ParseTypeSpecifier(tokenizer, &parse_tree->children[0]) &&
           ParseSpecifierQualifierList(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseTypeSpecifier(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseTypeSpecifier(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        if (ParseTypeQualifier(Tokenizer, &ParseTree->Children[0]) &&
           ParseSpecifierQualifierList(Tokenizer, &ParseTree->Children[1])) {
        *tokenizer = start;
        if (ParseTypeQualifier(tokenizer, &parse_tree->children[0]) &&
           ParseSpecifierQualifierList(tokenizer, &parse_tree->children[1])) {
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseTypeQualifier(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseTypeQualifier(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2274,20 2270,20 @@ bool ParseSpecifierQualifierList(struct tokenizer *Tokenizer, parse_tree_node *P
  struct-declaration:
          specifier-qualifier-list struct-declarator-list ;
*/
bool ParseStructDeclaration(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseStructDeclaration(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Struct Declaration", 3);
        __parser_ParseTreeUpdate(parse_tree, "Struct Declaration", 3);

        if (ParseSpecifierQualifierList(Tokenizer, &ParseTree->Children[0]) &&
           ParseStructDeclaratorList(Tokenizer, &ParseTree->Children[1]) &&
           Token_SemiColon == (Token = GetToken(Tokenizer)).Type) {
                ParseTreeSet(&ParseTree->Children[2], "Struct Declaration", Token);
        if (ParseSpecifierQualifierList(tokenizer, &parse_tree->children[0]) &&
           ParseStructDeclaratorList(tokenizer, &parse_tree->children[1]) &&
           Token_SemiColon == (token = GetToken(tokenizer)).type) {
                ParseTreeSet(&parse_tree->children[2], "Struct Declaration", token);
                return true;
        }

        *Tokenizer = Start;
        *tokenizer = start;
        return false;
}



@@ 2296,43 2292,43 @@ bool ParseStructDeclaration(struct tokenizer *Tokenizer, parse_tree_node *ParseT
          declarator
          declarator = initializer
*/
bool ParseInitDeclarator(struct tokenizer *Tokenizer, parse_tree_node *ParseTree) {
        struct tokenizer Start = *Tokenizer;
        token Token;
bool ParseInitDeclarator(Tokenizer *tokenizer, ParseTreeNode *parse_tree) {
        Tokenizer start = *tokenizer;
        Token token;

        __Parser_ParseTreeUpdate(ParseTree, "Init Declarator", 3);
        __parser_ParseTreeUpdate(parse_tree, "Init Declarator", 3);

        if (ParseDeclarator(Tokenizer, &ParseTree->Children[0]) &&
           Token_EqualSign == (Token = GetToken(Tokenizer)).Type &&
           ParseInitializer(Tokenizer, &ParseTree->Children[2])) {
                ParseTreeSet(&ParseTree->Children[1], "Symbol", Token);
        if (ParseDeclarator(tokenizer, &parse_tree->children[0]) &&
           Token_EqualSign == (token = GetToken(tokenizer)).type &&
           ParseInitializer(tokenizer, &parse_tree->children[2])) {
                ParseTreeSet(&parse_tree->children[1], "Symbol", token);
                return true;
        }

        __Parser_ParseTreeClearChildren(ParseTree);
        __parser_ParseTreeClearChildren(parse_tree);

        *Tokenizer = Start;
        if (ParseDeclarator(Tokenizer, &ParseTree->Children[0])) {
        *tokenizer = start;
        if (ParseDeclarator(tokenizer, &parse_tree->children[0])) {
                return true;
        }

        *Tokenizer = Start;