// File: /workspace/github_cpp_makefile_star2_O2/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 0xd614
movq 0x8(%rbx), %rdi
leaq 0xc8(%rbx), %r13
movq %r13, %rsi
callq 0xccbe
movq 0x8(%rbx), %r14
testb %al, %al
je 0x6d55
leaq 0xa3e5(%rip), %rsi      # 0x11096
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x708c
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0xd6ae
movl %eax, %ebp
leaq 0x28(%rsp), %rdi
callq 0x6150
testb %bpl, %bpl
je 0x6d9c
movq 0x10(%rbx), %rdi
movq %r13, %rsi
callq 0x9c06
testb %al, %al
je 0x6dc9
movq 0x8(%rbx), %rdi
leaq 0x88(%rbx), %rsi
callq 0xcaac
testb %al, %al
jne 0x6dba
leaq 0x60(%rbx), %rdi
leaq 0xa2f0(%rip), %rsi      # 0x11009
callq 0x6400
movl $0x2, 0x80(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x38(%rbx), %rsi
leaq 0x3c(%rbx), %rdx
callq 0xd614
pushq $0x8
popq %rdi
callq 0x6190
movq %rbx, (%rax)
leaq 0x122d5(%rip), %rsi     # 0x19020
movq %rax, %rdi
xorl %edx, %edx
callq 0x6540
leaq 0x38(%rbx), %rsi
leaq 0x3c(%rbx), %rdx
movq %r14, %rdi
callq 0xd614
movq 0x8(%rbx), %rdi
leaq 0x88(%rbx), %r14
movq %r14, %rsi
callq 0xcaac
testb %al, %al
je 0x6d95
addq $0xa8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61c0
movb $0x1, %bl
jmp 0x6eab
xorl %ebx, %ebx
jmp 0x6eab
leaq 0x88(%rbx), %rdi
movq %r13, %rsi
callq 0x61c0
leaq 0xaa6a(%rip), %rsi      # 0x1181c
movq %r13, %rdi
callq 0x65b0
movq %rbx, %rdi
callq 0x6ef8
movl %eax, %ebx
jmp 0x6eab
leaq 0xa2c6(%rip), %rdx      # 0x11096
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x70c7
leaq 0x88(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x63d0
movq %r15, %rdi
callq 0x6150
leaq 0xaa1b(%rip), %rsi      # 0x1181c
movq %r13, %rdi
callq 0x65b0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x68(%rsp), %r13
leaq 0x48(%rsp), %rbp
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0xccbe
testb %al, %al
je 0x6e97
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x70ff
movq %r12, %rdi
movq %r13, %rsi
callq 0x63d0
movq %r13, %rdi
callq 0x6150
movq 0x8(%rbx), %r14
movq %rbp, %rdi
leaq 0xa233(%rip), %rsi      # 0x11096
movq %r13, %rdx
callq 0x708c
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd6ae
movl %eax, %r14d
movq %rbp, %rdi
callq 0x6150
testb %r14b, %r14b
je 0x6e97
movq %r12, %rdi
leaq 0xa206(%rip), %rsi      # 0x11096
callq 0x65a0
jmp 0x6e24
movq %rbx, %rdi
callq 0x6ef8
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x6150
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6ee3
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x6eeb
movq %rax, %rbx
jmp 0x6ef0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6150
jmp 0x6ee6
jmp 0x6ee3
jmp 0x6ee3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6150
movq %rbx, %rdi
callq 0x6560