• Home
  • Raw
  • Download

Lines Matching refs:production

316 struct production {  struct
344 const struct production *production) in add_production() argument
363 for (lhs_pos = 0; lhs_pos < production->len; lhs_pos++) { in add_production()
364 while (production->lhs[lhs_pos] != node->keysym) { in add_production()
366 uint32_t next = add_node(table, production->lhs[lhs_pos]); in add_production()
376 if (lhs_pos + 1 == production->len) in add_production()
388 uint32_t successor = add_node(table, production->lhs[lhs_pos + 1]); in add_production()
407 (node->u.leaf.utf8 == 0 && !production->has_string) || in add_production()
409 node->u.leaf.utf8 != 0 && production->has_string && in add_production()
411 production->string) in add_production()
414 (node->u.leaf.keysym == XKB_KEY_NoSymbol && !production->has_keysym) || in add_production()
416 node->u.leaf.keysym != XKB_KEY_NoSymbol && production->has_keysym && in add_production()
417 node->u.leaf.keysym == production->keysym in add_production()
426 if (production->has_string) { in add_production()
428 darray_append_items(table->utf8, production->string, in add_production()
429 strlen(production->string) + 1); in add_production()
431 if (production->has_keysym) { in add_production()
432 node->u.leaf.keysym = production->keysym; in add_production()
515 struct production production; in parse() local
520 production.len = 0; in parse()
521 production.has_keysym = false; in parse()
522 production.has_string = false; in parse()
523 production.mods = 0; in parse()
524 production.modmask = 0; in parse()
563 if (production.len <= 0) { in parse()
570 production.mods = 0; in parse()
571 production.modmask = ALL_MODS_MASK; in parse()
578 production.modmask = ALL_MODS_MASK; in parse()
595 if (production.len + 1 > MAX_LHS_LEN) { in parse()
600 production.lhs[production.len++] = keysym; in parse()
601 production.mods = 0; in parse()
602 production.modmask = 0; in parse()
632 production.modmask |= 1 << mod; in parse()
634 production.mods &= ~(1 << mod); in parse()
636 production.mods |= 1 << mod; in parse()
644 if (production.has_string) { in parse()
652 if (val.string.len >= sizeof(production.string)) { in parse()
656 strcpy(production.string, val.string.str); in parse()
657 production.has_string = true; in parse()
666 if (production.has_keysym) { in parse()
670 production.keysym = keysym; in parse()
671 production.has_keysym = true; in parse()
674 if (!production.has_string && !production.has_keysym) { in parse()
678 add_production(table, s, &production); in parse()