// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/parser.cpp
// Function: Parser::parseLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Parser::parseLine(std::string line)
{
    StringTokenizer t(line);
    std::string t1;
    t1 = t.getString();
    if(t1.at(t1.size()-1) == ':') {
        // New class
        Class c;
        c.className = t1.substr(0, t1.size()-1);
        c.tableName = t.getString();
        //TODO: no-version, ...
        this->classes.push_back(c);
    } else {
        if(this->classes.size() == 0) {
            throw "Class identifier has to be set before column declarations";
        }
        // column
        Field f;
        f.type = getType(t1);
        if(f.type == Field::c || f.type == Field::p || f.type == Field::e) {
            f.additionalType = t.getString();
        }
        f.fieldName = t.getString();
        f.databaseName = t.getString();
        /*
        std::string s = t.getString();
        if(s.size() > 0) {
            //TODO: Relation
        }*/
        this->classes.back().fields.push_back(f);
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %r14
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2220
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x28ec
leaq 0xf8(%rsp), %rdi
callq 0x20f0
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %rdi
leaq 0xb0(%rsp), %rbx
movq %rbx, %rsi
callq 0x28fc
leaq 0x20(%rsp), %r15
leaq 0x40(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21f0
movq %r12, %rdi
callq 0x20f0
movq 0x8(%r15), %rsi
decq %rsi
movq %r15, %rdi
callq 0x2300
cmpb $0x3a, (%rax)
jne 0x2be7
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
leaq 0x20(%rsp), %rsi
movq 0x8(%rsi), %rcx
decq %rcx
movq %rsp, %rdi
xorl %edx, %edx
callq 0x21c0
leaq 0x48(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20f0
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x28fc
leaq 0x68(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20f0
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x32fe
leaq 0x40(%rsp), %rdi
callq 0x2772
jmp 0x2d06
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x2d2c
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0xd8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x2220
leaq 0xd8(%rsp), %rsi
callq 0x2dae
movl %eax, 0x40(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x20f0
movl 0x40(%rsp), %eax
cmpl $0x7, %eax
ja 0x2c97
movl $0x8a, %ecx
btl %eax, %ecx
jae 0x2c97
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x28fc
leaq 0x48(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20f0
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x28fc
leaq 0x70(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20f0
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x28fc
leaq 0x90(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x20f0
movq 0x8(%r14), %rdi
addq $-0x18, %rdi
leaq 0x40(%rsp), %rsi
callq 0x332a
leaq 0x40(%rsp), %rdi
callq 0x2804
leaq 0x20(%rsp), %rdi
callq 0x20f0
leaq 0xb0(%rsp), %rdi
callq 0x20f0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x2110
leaq 0x14b5(%rip), %rcx      # 0x41f0
movq %rcx, (%rax)
movq 0x4253(%rip), %rsi      # 0x6f98
movq %rax, %rdi
xorl %edx, %edx
callq 0x22b0
jmp 0x2d7a
jmp 0x2d7a
jmp 0x2d7a
movq %rax, %r14
leaq 0xd8(%rsp), %rdi
callq 0x20f0
jmp 0x2d7d
jmp 0x2d6b
jmp 0x2d6b
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x2772
jmp 0x2d93
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x2804
jmp 0x2d93
jmp 0x2d90
movq %rax, %r14
jmp 0x2d9d
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x22c0
nop