// File: 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 %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x3100
movq -0x240(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4280
jmp 0x46f0
leaq -0x58(%rbp), %rdi
callq 0x3180
leaq -0x88(%rbp), %rdi
callq 0x3310
leaq -0xa8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x42c0
jmp 0x4717
leaq -0x88(%rbp), %rdi
movq %rdi, -0x258(%rbp)
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x260(%rbp)
callq 0x32d0
movq -0x260(%rbp), %rdi
callq 0x3180
movq -0x258(%rbp), %rdi
callq 0x31a0
movq -0x258(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x3410
movq %rax, -0x250(%rbp)
jmp 0x476b
movq -0x250(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x4888
leaq -0x108(%rbp), %rdi
callq 0x5510
leaq -0x88(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x31a0
movq -0x268(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x128(%rbp), %rdi
callq 0x3250
jmp 0x47bc
leaq -0x100(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movq %rsi, -0x270(%rbp)
callq 0x32d0
movq -0x270(%rbp), %rdi
callq 0x3180
leaq -0x148(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x42c0
jmp 0x47f4
leaq -0xe0(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movq %rsi, -0x278(%rbp)
callq 0x32d0
movq -0x278(%rbp), %rdi
callq 0x3180
movq -0x248(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x5550
jmp 0x482f
leaq -0x108(%rbp), %rdi
callq 0x3c10
jmp 0x4a47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3180
jmp 0x4a7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4a65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x3c10
jmp 0x4a65
movq -0x248(%rbp), %rdi
callq 0x55c0
cmpq $0x0, %rax
jne 0x48c6
movl $0x8, %edi
callq 0x3120
movq %rax, %rdi
leaq 0x497e(%rip), %rax      # 0x922c
movq %rax, (%rdi)
movq 0x96e0(%rip), %rsi      # 0xdf98
xorl %eax, %eax
movl %eax, %edx
callq 0x3390
jmp 0x4a83
leaq -0x1b8(%rbp), %rdi
callq 0x55f0
leaq -0x1d8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3100
jmp 0x48e7
movq -0x248(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x4a90
movl %eax, -0x27c(%rbp)
jmp 0x4902
movl -0x27c(%rbp), %eax
movl %eax, -0x1b8(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3180
cmpl $0x1, -0x1b8(%rbp)
je 0x4935
cmpl $0x7, -0x1b8(%rbp)
je 0x4935
cmpl $0x3, -0x1b8(%rbp)
jne 0x499a
leaq -0x1f8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x42c0
jmp 0x4947
leaq -0x1b8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x32d0
leaq -0x1f8(%rbp), %rdi
callq 0x3180
jmp 0x499a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4a39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3180
jmp 0x4a39
leaq -0x218(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x42c0
jmp 0x49ac
leaq -0x188(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movq %rsi, -0x288(%rbp)
callq 0x32d0
movq -0x288(%rbp), %rdi
callq 0x3180
leaq -0x238(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x42c0
jmp 0x49e4
leaq -0x168(%rbp), %rdi
leaq -0x238(%rbp), %rsi
movq %rsi, -0x290(%rbp)
callq 0x32d0
movq -0x290(%rbp), %rdi
callq 0x3180
movq -0x248(%rbp), %rdi
callq 0x5630
movq %rax, %rdi
addq $0x48, %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x5670
jmp 0x4a2b
leaq -0x1b8(%rbp), %rdi
callq 0x3dd0
jmp 0x4a47
leaq -0x1b8(%rbp), %rdi
callq 0x3dd0
jmp 0x4a65
leaq -0x88(%rbp), %rdi
callq 0x3180
leaq -0x38(%rbp), %rdi
callq 0x56e0
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
leaq -0x88(%rbp), %rdi
callq 0x3180
leaq -0x38(%rbp), %rdi
callq 0x56e0
movq -0x60(%rbp), %rdi
callq 0x33b0
nopw %cs:(%rax,%rax)