Lines Matching refs:pstate
66 static struct parser_state *pstate = NULL;
283 pstate->push_new<type_operation> ($1);
287 pstate->wrap<typeof_operation> ();
291 pstate->push_new<type_operation> ($3);
295 pstate->wrap<decltype_operation> ();
302 { pstate->wrap2<comma_operation> (); }
307 { pstate->wrap<unop_ind_operation> (); }
311 { pstate->wrap<unop_addr_operation> (); }
315 { pstate->wrap<unary_neg_operation> (); }
319 { pstate->wrap<unary_plus_operation> (); }
324 if (pstate->language ()->la_language
326 pstate->wrap<opencl_not_operation> ();
328 pstate->wrap<unary_logical_not_operation> ();
333 { pstate->wrap<unary_complement_operation> (); }
337 { pstate->wrap<preinc_operation> (); }
341 { pstate->wrap<predec_operation> (); }
345 { pstate->wrap<postinc_operation> (); }
349 { pstate->wrap<postdec_operation> (); }
353 { pstate->wrap<typeid_operation> (); }
357 { pstate->wrap<typeid_operation> (); }
361 { pstate->wrap<unop_sizeof_operation> (); }
365 { pstate->wrap<unop_alignof_operation> (); }
370 pstate->push_new<structop_ptr_operation>
371 (pstate->pop (), copy_name ($3));
378 = new structop_ptr_operation (pstate->pop (),
380 pstate->mark_struct_expression (op);
381 pstate->push (operation_up (op));
388 = new structop_ptr_operation (pstate->pop (), "");
389 pstate->mark_struct_expression (op);
390 pstate->push (operation_up (op));
396 pstate->push_new<structop_ptr_operation>
397 (pstate->pop (), "~" + copy_name ($4));
404 = new structop_ptr_operation (pstate->pop (),
406 pstate->mark_struct_expression (op);
407 pstate->push (operation_up (op));
415 pstate->wrap<unop_addr_operation> ();
416 pstate->wrap2<structop_mptr_operation> (); }
420 { pstate->wrap2<structop_mptr_operation> (); }
425 if (pstate->language ()->la_language
427 pstate->push_new<opencl_structop_operation>
428 (pstate->pop (), copy_name ($3));
430 pstate->push_new<structop_operation>
431 (pstate->pop (), copy_name ($3));
438 = new structop_operation (pstate->pop (),
440 pstate->mark_struct_expression (op);
441 pstate->push (operation_up (op));
448 = new structop_operation (pstate->pop (), "");
449 pstate->mark_struct_expression (op);
450 pstate->push (operation_up (op));
456 pstate->push_new<structop_operation>
457 (pstate->pop (), "~" + copy_name ($4));
464 = new structop_operation (pstate->pop (),
466 pstate->mark_struct_expression (op);
467 pstate->push (operation_up (op));
475 pstate->wrap<unop_addr_operation> ();
476 pstate->wrap2<structop_member_operation> (); }
480 { pstate->wrap2<structop_member_operation> (); }
484 { pstate->wrap2<subscript_operation> (); }
488 { pstate->wrap2<subscript_operation> (); }
501 theclass = lookup_objc_class (pstate->gdbarch (),
506 pstate->push_new<long_const_operation>
507 (parse_type (pstate)->builtin_int,
512 { end_msglist (pstate); }
517 pstate->push_new<long_const_operation>
518 (parse_type (pstate)->builtin_int,
523 { end_msglist (pstate); }
529 { end_msglist (pstate); }
552 { pstate->start_arglist (); }
556 = pstate->pop_vector (pstate->end_arglist ());
557 pstate->push_new<funcall_operation>
558 (pstate->pop (), std::move (args));
567 pstate->push_new<funcall_operation>
568 (pstate->pop (), std::vector<operation_up> ());
579 pstate->start_arglist ();
584 = pstate->pop_vector (pstate->end_arglist ());
585 pstate->push_new<adl_func_operation>
587 pstate->expression_context_block,
593 { pstate->start_arglist (); }
600 { pstate->arglist_len = 1; }
604 { pstate->arglist_len++; }
616 pstate->push_new<type_instance_operation>
618 pstate->pop ());
627 pstate->push_new<type_instance_operation>
628 (flags, std::vector<type *> (), pstate->pop ());
645 pstate->push_new<func_static_var_operation>
646 (pstate->pop (), copy_name ($3));
651 { $$ = pstate->end_arglist () - 1; }
656 = pstate->pop_vector ($3 + 1);
657 pstate->push_new<array_operation> (0, $3,
663 { pstate->wrap2<unop_memval_type_operation> (); }
668 if (pstate->language ()->la_language
670 pstate->wrap2<opencl_cast_type_operation> ();
672 pstate->wrap2<unop_cast_type_operation> ();
683 { pstate->wrap2<repeat_operation> (); }
687 { pstate->wrap2<mul_operation> (); }
691 { pstate->wrap2<div_operation> (); }
695 { pstate->wrap2<rem_operation> (); }
699 { pstate->wrap2<add_operation> (); }
703 { pstate->wrap2<sub_operation> (); }
707 { pstate->wrap2<lsh_operation> (); }
711 { pstate->wrap2<rsh_operation> (); }
716 if (pstate->language ()->la_language
718 pstate->wrap2<opencl_equal_operation> ();
720 pstate->wrap2<equal_operation> ();
726 if (pstate->language ()->la_language
728 pstate->wrap2<opencl_notequal_operation> ();
730 pstate->wrap2<notequal_operation> ();
736 if (pstate->language ()->la_language
738 pstate->wrap2<opencl_leq_operation> ();
740 pstate->wrap2<leq_operation> ();
746 if (pstate->language ()->la_language
748 pstate->wrap2<opencl_geq_operation> ();
750 pstate->wrap2<geq_operation> ();
756 if (pstate->language ()->la_language
758 pstate->wrap2<opencl_less_operation> ();
760 pstate->wrap2<less_operation> ();
766 if (pstate->language ()->la_language
768 pstate->wrap2<opencl_gtr_operation> ();
770 pstate->wrap2<gtr_operation> ();
775 { pstate->wrap2<bitwise_and_operation> (); }
779 { pstate->wrap2<bitwise_xor_operation> (); }
783 { pstate->wrap2<bitwise_ior_operation> (); }
788 if (pstate->language ()->la_language
791 operation_up rhs = pstate->pop ();
792 operation_up lhs = pstate->pop ();
793 pstate->push_new<opencl_logical_binop_operation>
798 pstate->wrap2<logical_and_operation> ();
804 if (pstate->language ()->la_language
807 operation_up rhs = pstate->pop ();
808 operation_up lhs = pstate->pop ();
809 pstate->push_new<opencl_logical_binop_operation>
814 pstate->wrap2<logical_or_operation> ();
820 operation_up last = pstate->pop ();
821 operation_up mid = pstate->pop ();
822 operation_up first = pstate->pop ();
823 if (pstate->language ()->la_language
825 pstate->push_new<opencl_ternop_cond_operation>
829 pstate->push_new<ternop_cond_operation>
837 if (pstate->language ()->la_language
839 pstate->wrap2<opencl_assign_operation> ();
841 pstate->wrap2<assign_operation> ();
847 operation_up rhs = pstate->pop ();
848 operation_up lhs = pstate->pop ();
849 pstate->push_new<assign_modify_operation>
856 pstate->push_new<long_const_operation>
869 pstate->push_new<complex_operation>
879 pstate->push_c_string ($1.type, &vec);
885 parse_number (pstate, $1.stoken.ptr,
887 pstate->push_new<long_const_operation>
899 pstate->push_new<float_const_operation> ($1.type, data);
920 pstate->push_new<complex_operation>
931 pstate->push_dollar ($1);
937 pstate->push_new<objc_selector_operation>
945 = lookup_signed_typename (pstate->language (),
956 pstate->push_new<long_const_operation>
962 { pstate->wrap2<reinterpret_cast_operation> (); }
966 { pstate->wrap2<unop_cast_type_operation> (); }
970 { pstate->wrap2<dynamic_cast_operation> (); }
976 pstate->wrap2<unop_cast_type_operation> (); }
1040 pstate->push_c_string (type, &$1);
1051 pstate->push_new<objc_nsstring_operation>
1058 { pstate->push_new<long_const_operation>
1059 (parse_type (pstate)->builtin_bool, 1);
1064 { pstate->push_new<long_const_operation>
1065 (parse_type (pstate)->builtin_bool, 0);
1108 pstate->push_new<var_entry_value_operation> (sym);
1123 pstate->block_tracker->update (sym);
1125 pstate->push_new<var_value_operation> (sym);
1137 pstate->push_new<scope_operation> (type,
1153 pstate->push_new<scope_operation> (type,
1173 pstate->push_symbol (name.c_str (), sym);
1183 pstate->block_tracker->update (sym);
1193 pstate->push_new<var_msym_value_operation>
1196 pstate->push_new<var_value_operation> (sym);
1203 pstate->block_tracker->update (sym);
1206 pstate->push_new<structop_ptr_operation>
1241 pstate->push_new<var_value_operation> (bsym);
1244 pstate->push_new<var_msym_value_operation>
1265 cpstate->type_stack.insert (pstate,
1270 cpstate->type_stack.insert (pstate,
1383 { $$ = lookup_signed_typename (pstate->language (),
1386 { $$ = lookup_signed_typename (pstate->language (),
1389 { $$ = lookup_signed_typename (pstate->language (),
1392 { $$ = lookup_signed_typename (pstate->language (),
1395 { $$ = lookup_signed_typename (pstate->language (),
1398 { $$ = lookup_signed_typename (pstate->language (),
1401 { $$ = lookup_signed_typename (pstate->language (),
1404 { $$ = lookup_unsigned_typename (pstate->language (),
1407 { $$ = lookup_unsigned_typename (pstate->language (),
1410 { $$ = lookup_unsigned_typename (pstate->language (),
1413 { $$ = lookup_signed_typename (pstate->language (),
1416 { $$ = lookup_signed_typename (pstate->language (),
1419 { $$ = lookup_signed_typename (pstate->language (),
1422 { $$ = lookup_signed_typename (pstate->language (),
1425 { $$ = lookup_signed_typename (pstate->language (),
1428 { $$ = lookup_signed_typename (pstate->language (),
1431 { $$ = lookup_unsigned_typename (pstate->language (),
1434 { $$ = lookup_unsigned_typename (pstate->language (),
1437 { $$ = lookup_unsigned_typename (pstate->language (),
1440 { $$ = lookup_unsigned_typename (pstate->language (),
1443 { $$ = lookup_signed_typename (pstate->language (),
1446 { $$ = lookup_signed_typename (pstate->language (),
1449 { $$ = lookup_signed_typename (pstate->language (),
1452 { $$ = lookup_unsigned_typename (pstate->language (),
1455 { $$ = lookup_unsigned_typename (pstate->language (),
1458 { $$ = lookup_unsigned_typename (pstate->language (),
1461 { $$ = lookup_typename (pstate->language (),
1466 { $$ = lookup_typename (pstate->language (),
1471 { $$ = lookup_typename (pstate->language (),
1476 { $$ = lookup_unsigned_typename (pstate->language (),
1479 { $$ = lookup_unsigned_typename (pstate->language (),
1482 { $$ = lookup_signed_typename (pstate->language (),
1485 { $$ = lookup_signed_typename (pstate->language (),
1511 pstate->expression_context_block);
1515 pstate->mark_completion_tag (TYPE_CODE_STRUCT,
1521 pstate->mark_completion_tag (TYPE_CODE_STRUCT,
1528 pstate->expression_context_block);
1532 pstate->mark_completion_tag (TYPE_CODE_STRUCT,
1538 pstate->mark_completion_tag (TYPE_CODE_STRUCT,
1545 pstate->expression_context_block);
1549 pstate->mark_completion_tag (TYPE_CODE_UNION,
1555 pstate->mark_completion_tag (TYPE_CODE_UNION,
1561 pstate->expression_context_block);
1565 pstate->mark_completion_tag (TYPE_CODE_ENUM, "", 0);
1570 pstate->mark_completion_tag (TYPE_CODE_ENUM, $2.ptr,
1580 pstate->expression_context_block);
1593 $$.type = lookup_signed_typename (pstate->language (),
1600 $$.type = lookup_signed_typename (pstate->language (),
1607 $$.type = lookup_signed_typename (pstate->language (),
1784 pstate->language ()->la_language,
1837 pstate->expression_context_block,
2564 cpstate->macro_original_text = pstate->lexptr;
2565 pstate->lexptr = copy;
2581 pstate->lexptr = cpstate->macro_original_text;
2688 = macro_expand_next (&pstate->lexptr, *expression_macro_scope);
2694 pstate->prev_lexptr = pstate->lexptr;
2696 tokstart = pstate->lexptr;
2706 pstate->lexptr += 3;
2720 pstate->lexptr += 2;
2754 pstate->lexptr++;
2760 pstate->lexptr++;
2771 pstate->lexptr++;
2775 if (pstate->comma_terminates
2779 pstate->lexptr++;
2784 if (pstate->lexptr[1] < '0' || pstate->lexptr[1] > '9')
2867 pstate->lexptr = p;
2882 pstate->lexptr = p + len;
2895 pstate->lexptr = &p[len];
2918 pstate->lexptr++;
2933 int result = parse_string_or_char (tokstart, &pstate->lexptr,
2942 namelen = pstate->lexptr - tokstart - 1;
2991 pstate->lexptr += namelen;
3016 pstate->expression_context_block,
3037 if (pstate->parse_completion && *pstate->lexptr == '\0')
3292 current.token = lex_one_token (pstate, &is_quoted_name);
3294 current.token = classify_name (pstate, pstate->expression_context_block,
3296 if (pstate->language ()->la_language != language_cplus
3312 current.token = lex_one_token (pstate, &ignore);
3340 search_block = pstate->expression_context_block;
3362 classification = classify_inner_name (pstate, search_block,
3428 scoped_restore pstate_restore = make_scoped_restore (&pstate);
3430 pstate = par_state;
3462 pstate->set_operation (pstate->pop ());
3522 pstate->parse_error (msg);