// File: /workspace/github_cpp_makefile_star2_O1/ryuichiueda[P]GlueLang/src/ArgExtCom.cc
// Function: ArgExtCom::parse()
bool ArgExtCom::parse(void)
{
	m_feeder->getPos(&m_start_line, &m_start_char);

	//If the name of a command starts from a small capital letter,
	//it should be parsed as a full-path command.
	// (this rule should be relaxed since a command can start from
	// a non small captal letter)
	
	// fullpath command
	if( ! m_feeder->fileNameSegment(&m_prefix)){
		m_feeder->getPos(&m_end_line, &m_end_char);
		bool res = m_feeder->path(&m_text);

		if(res)
			m_evaled_text = m_text;

		return res;
	}

	// chech whether m_prefix is a prefix or a command name
 	if(!m_feeder->str(".")){
		// if m_prefix is not a prefix, it is a name of a command or a procedure
		m_text = m_prefix;
		m_prefix = "";
		return parsePrefixedCom();
	}

	//When the path is not found, "." is regarded as a part of the command's name
 	if(! m_env->isImportPath(&m_prefix)){
		m_text = m_prefix + ".";
		m_prefix = "";

		string tmp;
		while(m_feeder->fileNameSegment(&tmp)){
			m_text = m_text + tmp;
 			if(!m_feeder->str("."))
				break;

			m_text += ".";
		}
		return parsePrefixedCom();
	}

	//hereafter, a command name with a prefix
	if(!m_feeder->path(&m_text)){
		m_error_msg = "Invalid command name";
		m_exit_status = 2;
		m_feeder->getPos(&m_end_line, &m_end_char);
		throw this;
	}

	return parsePrefixedCom();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x30(%rbx), %rsi
leaq 0x34(%rbx), %rdx
callq 0x1003e
movq 0x8(%rbx), %rdi
leaq 0xc8(%rbx), %r15
movq %r15, %rsi
callq 0xf49c
movq 0x8(%rbx), %r14
testb %al, %al
je 0x6e96
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xd2b6(%rip), %rsi      # 0x14096
leaq 0xd2b0(%rip), %rdx      # 0x14097
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x74e6
movq %r14, %rdi
movq %r12, %rsi
callq 0x100e8
movl %eax, %ebp
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x6e18
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6330
testb %bpl, %bpl
je 0x6ed3
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0xb2ae
testb %al, %al
je 0x6f1b
movq 0x8(%rbx), %rdi
leaq 0x88(%rbx), %rsi
callq 0xf1b0
testb %al, %al
jne 0x6efd
leaq 0x60(%rbx), %rdi
leaq 0xd1b1(%rip), %rsi      # 0x14009
callq 0x6410
movl $0x2, 0x80(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x38(%rbx), %rsi
leaq 0x3c(%rbx), %rdx
callq 0x1003e
movl $0x8, %edi
callq 0x6190
movq %rbx, (%rax)
leaq 0x14194(%rip), %rsi     # 0x1b020
movq %rax, %rdi
xorl %edx, %edx
callq 0x6550
leaq 0x38(%rbx), %rsi
leaq 0x3c(%rbx), %rdx
movq %r14, %rdi
callq 0x1003e
movq 0x8(%rbx), %rdi
leaq 0x88(%rbx), %r14
movq %r14, %rsi
callq 0xf1b0
movl %eax, %ebp
testb %al, %al
je 0x6f07
addq $0xa8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61c0
jmp 0x6f07
leaq 0x88(%rbx), %rdi
movq %r15, %rsi
callq 0x61c0
movq 0xd0(%rbx), %rdx
leaq 0xd952(%rip), %rcx      # 0x14842
movq %r15, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x64c0
movq %rbx, %rdi
callq 0x7108
movl %eax, %ebp
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0xc8(%rbx), %rsi
movq 0xd0(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x7456
leaq 0xd14d(%rip), %rsi      # 0x14096
movq %r14, %rdi
callq 0x65d0
leaq 0x88(%rbx), %r14
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x63f0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x6f7e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0xd0(%rbx), %rdx
leaq 0xd8b6(%rip), %rcx      # 0x14842
movq %r15, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x64c0
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x68(%rsp), %r12
leaq 0x28(%rsp), %rbp
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0xf49c
testb %al, %al
je 0x7068
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7321
movq %r14, %rdi
movq %r12, %rsi
callq 0x63f0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x7001
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6330
movq 0x8(%rbx), %r13
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rbp, %rdi
leaq 0xd07d(%rip), %rsi      # 0x14096
leaq 0xd077(%rip), %rdx      # 0x14097
callq 0x74e6
movq %r13, %rdi
movq %rbp, %rsi
callq 0x100e8
movl %eax, %r13d
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x704f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
testb %r13b, %r13b
je 0x7068
movq %r14, %rdi
leaq 0xd038(%rip), %rsi      # 0x14096
callq 0x65d0
jmp 0x6fb8
movq %rbx, %rdi
callq 0x7108
movl %eax, %ebp
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6f07
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
jmp 0x6f07
jmp 0x70e1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x70f3
jmp 0x7100
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x7100
movq 0x58(%rsp), %rsi
jmp 0x70f8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x70e4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6330
jmp 0x70e4
jmp 0x70e1
jmp 0x70e1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7100
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6330
movq %rbx, %rdi
callq 0x6580