// File: mhe[P]raytracerframework_cpp/yaml/parser.cpp
// Function: YAML::Parser::HandleYamlDirective(YAML::Token*)
void Parser::HandleYamlDirective(Token *pToken)
	{
		if(pToken->params.size() != 1)
			throw ParserException(pToken->line, pToken->column, ErrorMsg::YAML_DIRECTIVE_ARGS);

		std::stringstream str(pToken->params[0]);
		str >> m_state.version.major;
		str.get();
		str >> m_state.version.minor;
		if(!str || str.peek() != EOF)
			throw ParserException(pToken->line, pToken->column, ErrorMsg::YAML_VERSION + pToken->params[0]);

		if(m_state.version.major > 1)
			throw ParserException(pToken->line, pToken->column, ErrorMsg::YAML_MAJOR_VERSION);

		// TODO: warning on major == 1, minor > 2?
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x361d0
cmpq $0x1, %rax
je 0x397f7
movl $0x30, %edi
callq 0x51b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1e0(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
leaq 0x31687(%rip), %rcx     # 0x6ae40
callq 0x340e0
jmp 0x397c0
movq -0x1e0(%rbp), %rdi
leaq 0x2de32(%rip), %rsi     # 0x67600
leaq -0x56a5(%rip), %rdx     # 0x34130
callq 0x5690
movq -0x1e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x52c0
jmp 0x39a49
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x38f40
movq %rax, -0x1f0(%rbp)
movl $0x10, %edi
movl $0x8, %esi
callq 0x31910
movq -0x1f0(%rbp), %rsi
movl %eax, %edx
leaq -0x1a8(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x5610
movq -0x1d8(%rbp), %rsi
movq -0x1e8(%rbp), %rdi
addq $0x8, %rsi
callq 0x5210
jmp 0x39853
leaq -0x1a8(%rbp), %rdi
callq 0x54c0
jmp 0x39861
movq -0x1d8(%rbp), %rsi
addq $0xc, %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x5210
jmp 0x3987a
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x1a8(%rbp,%rax), %rdi
callq 0x51a0
movb %al, -0x1f1(%rbp)
jmp 0x3989a
movb -0x1f1(%rbp), %al
testb $0x1, %al
jne 0x398c9
jmp 0x398a6
leaq -0x1a8(%rbp), %rdi
callq 0x5140
movl %eax, -0x1f8(%rbp)
jmp 0x398ba
movl -0x1f8(%rbp), %eax
cmpl $-0x1, %eax
je 0x399b6
movb $0x1, -0x1c9(%rbp)
movl $0x30, %edi
callq 0x51b0
movq %rax, -0x208(%rbp)
movq -0x10(%rbp), %rdi
movl 0x8(%rdi), %eax
movl %eax, -0x200(%rbp)
movl 0xc(%rdi), %eax
movl %eax, -0x1fc(%rbp)
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x38f40
movq %rax, %rdx
leaq 0x31552(%rip), %rsi     # 0x6ae60
leaq -0x1c8(%rbp), %rdi
callq 0x39c50
jmp 0x3991c
movl -0x1fc(%rbp), %edx
movl -0x200(%rbp), %esi
movq -0x208(%rbp), %rdi
leaq -0x1c8(%rbp), %rcx
callq 0x340e0
jmp 0x3993d
movq -0x208(%rbp), %rdi
movb $0x0, -0x1c9(%rbp)
leaq 0x2dcae(%rip), %rsi     # 0x67600
leaq -0x5829(%rip), %rdx     # 0x34130
callq 0x5690
jmp 0x39a52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x39a3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x3999a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x5788
testb $0x1, -0x1c9(%rbp)
jne 0x399a5
jmp 0x399b1
movq -0x208(%rbp), %rdi
callq 0x52c0
jmp 0x39a3d
movq -0x1d8(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jle 0x39a28
movl $0x30, %edi
callq 0x51b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x210(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
leaq 0x31495(%rip), %rcx     # 0x6ae80
callq 0x340e0
jmp 0x399f2
movq -0x210(%rbp), %rdi
leaq 0x2dc00(%rip), %rsi     # 0x67600
leaq -0x58d7(%rip), %rdx     # 0x34130
callq 0x5690
jmp 0x39a52
movq -0x210(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x52c0
jmp 0x39a3d
leaq -0x1a8(%rbp), %rdi
callq 0x52d0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x1a8(%rbp), %rdi
callq 0x52d0
movq -0x18(%rbp), %rdi
callq 0x56c0
nopw %cs:(%rax,%rax)