// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/grammar.c
// Function: test_partial
void test_partial(void) {
  
  mpc_ast_t *t0;
  mpc_err_t *err;

  mpc_parser_t *Line = mpc_new("line");
  mpc_parser_t *Number = mpc_new("number");
  mpc_parser_t *QuotedString = mpc_new("quoted_string");
  mpc_parser_t *LinePragma = mpc_new("linepragma");
  mpc_parser_t *Parser = mpc_new("parser");
  
  mpc_define(Line, mpca_tag(mpc_apply(mpc_sym("#line"), mpcf_str_ast), "string"));
  
  err = mpca_lang(MPCA_LANG_PREDICTIVE,
    "number        : /[0-9]+/ ;\n"
    "quoted_string : /\"(\\.|[^\"])*\"/ ;\n"
    "linepragma    : <line> <number> <quoted_string>;\n"
    "parser        : /^/ (<linepragma>)* /$/ ;\n",
    Line, Number, QuotedString, LinePragma, Parser, NULL);
  
  PT_ASSERT(err == NULL);
  
  t0 = mpc_ast_build(3, ">", 
          mpc_ast_new("regex", ""),
          mpc_ast_build(3, "linepragma|>", 
            mpc_ast_new("line|string", "#line"),
            mpc_ast_new("number|regex", "10"),
            mpc_ast_new("quoted_string|regex", "\"test\"")),
          mpc_ast_new("regex", ""));
  
  PT_ASSERT(mpc_test_pass(Parser, "#line 10 \"test\"", t0, 
    (int(*)(const void*,const void*))mpc_ast_eq, 
    (mpc_dtor_t)mpc_ast_delete, 
    (void(*)(const void*))mpc_ast_print));
    
  mpc_ast_delete(t0);

  mpc_cleanup(5, Line, Number, QuotedString, LinePragma, Parser);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0xb18c(%rip), %rdi      # 0xe32f
callq 0x6a1e
movq %rax, %rbx
movq %rax, 0x30(%rsp)
leaq 0xb150(%rip), %rdi      # 0xe307
callq 0x6a1e
movq %rax, %r14
movq %rax, 0x28(%rsp)
leaq 0xb143(%rip), %rdi      # 0xe30e
callq 0x6a1e
movq %rax, %r15
movq %rax, 0x20(%rsp)
leaq 0xb13d(%rip), %rdi      # 0xe31c
callq 0x6a1e
movq %rax, %r12
movq %rax, 0x18(%rsp)
leaq 0xb134(%rip), %rdi      # 0xe327
callq 0x6a1e
movq %rax, %r13
leaq 0xb12c(%rip), %rbp      # 0xe32e
movq %rbp, %rdi
callq 0x8258
leaq 0x6d59(%rip), %rsi      # 0x9f6a
movq %rax, %rdi
callq 0x726b
leaq 0xb0f5(%rip), %rsi      # 0xe315
movq %rax, %rdi
callq 0x9fe4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6cbd
movq %r13, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0xb0f0(%rip), %rsi      # 0xe334
pushq $0x1
popq %rdi
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xafa2
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0xb162(%rip), %rsi      # 0xe3cc
leaq 0xaac9(%rip), %rdx      # 0xdd3a
movl $0x97, %ecx
callq 0x4040
leaq 0xb5f6(%rip), %r15      # 0xe878
leaq 0xd209(%rip), %rsi      # 0x10492
movq %r15, %rdi
callq 0x9743
movq %rax, %r14
leaq 0xb14a(%rip), %rdi      # 0xe3e5
movq %rbp, %rsi
callq 0x9743
movq %rax, %r12
leaq 0xb144(%rip), %rdi      # 0xe3f1
leaq 0xb14a(%rip), %rsi      # 0xe3fe
callq 0x9743
movq %rax, %rbx
leaq 0xb13e(%rip), %rdi      # 0xe401
leaq 0xb154(%rip), %rsi      # 0xe41e
callq 0x9743
leaq 0xb102(%rip), %rsi      # 0xe3d8
pushq $0x3
popq %rbp
movl %ebp, %edi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x97b5
movq %rax, %rbx
movq %r15, %rdi
leaq 0xd19a(%rip), %rsi      # 0x10492
callq 0x9743
leaq 0xd1ce(%rip), %rsi      # 0x104d2
movl %ebp, %edi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x97b5
movq %rax, %rbx
leaq 0xb0f5(%rip), %rsi      # 0xe415
leaq 0x65f5(%rip), %rcx      # 0x991c
leaq 0x63c5(%rip), %r8       # 0x96f3
leaq 0x67c0(%rip), %r9       # 0x9af5
movq %r13, %rdi
movq %rax, %rdx
callq 0x9642
leaq 0xb0de(%rip), %rsi      # 0xe425
movl %eax, %edi
leaq 0xa9ea(%rip), %rdx      # 0xdd3a
movl $0xa4, %ecx
callq 0x4040
movq %rbx, %rdi
callq 0x96f3
pushq $0x5
popq %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r8
movq %r13, %r9
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6e12