Lines Matching refs:t

48 def t_COMMENT(t):  argument
60 def t_IDENTIFIER(t): argument
62 if t.value == 'package':
63 t.type = 'package'
64 elif t.value == 'import':
65 t.type = 'import'
66 elif t.value == 'enum':
67 t.type = 'enum'
68 elif t.value == 'struct':
69 t.type = 'struct'
70 elif t.value == 'typedef':
71 t.type = 'typedef'
72 return t
74 def t_error(t): argument
75 t.type = t.value[0]
76 t.value = t.value[0]
77 t.lexer.skip(1)
78 return t
325 def p_document(t): argument
330 for enum in t[2]:
333 for struct in t[2]:
336 for typedef in t[2]:
340 t[0] = {'header' : t[1], 'enums' : enums, 'structs' : structs, 'typedefs' : typedef}
342 def p_type_decls_1(t): argument
344 t[0] = [t[1]]
345 def p_type_decls_2(t): argument
347 t[0] = t[1] + [t[2]]
349 def p_type_decl_e(t): argument
351 t[0] = t[1]
352 def p_type_decl_s(t): argument
354 t[0] = t[1]
355 def p_type_decl_t(t): argument
357 t[0] = t[1]
359 def p_enum_cases_1(t): argument
361 t[0] = [t[1]]
362 def p_enum_cases_2(t): argument
364 t[0] = t[1] + [t[3]]
366 def p_struct_elements_1(t): argument
368 t[0] = [t[1]]
369 def p_struct_elements_2(t): argument
371 t[0] = t[1] + [t[2]]
373 def p_enum_base_1(t): argument
375 t[0] = '%s::%s' % (t[1], t[4])
376 def p_enum_base_2(t): argument
378 t[0] = t[1]
380 def p_typedef_name(t): argument
382 t[0] = t[1]
384 def p_struct_header(t): argument
386 t[0] = StructHeader(t[2])
388 def p_enum_header_1(t): argument
390 t[0] = EnumHeader(t[2], None)
391 def p_enum_header_2(t): argument
393 t[0] = EnumHeader(t[2], t[4])
395 def p_typedef_header(t): argument
397 t[0] = TypedefHeader(t[2])
399 def p_struct_decl(t): argument
401 t[0] = StructDecl(t[1], t[3])
403 def p_enum_decl_1(t): argument
405 t[0] = EnumDecl(t[1], t[3])
406 def p_enum_decl_2(t): argument
408 t[0] = EnumDecl(t[1], t[3])
410 def p_typedef_decl(t): argument
412 t[0] = TypedefDecl(t[1], t[2])
414 def p_enum_value_1(t): argument
417 t[0] = EnumValueConstant(t[1])
418 def p_enum_value_2(t): argument
420 t[0] = EnumValueLShift(t[1], EnumValueConstant(t[3]))
421 def p_enum_value_3(t): argument
423 t[0] = EnumValueOr(t[1], t[3])
424 def p_enum_value_4(t): argument
426 t[0] = t[2]
427 def p_enum_value_5(t): argument
429 t[0] = EnumValueExternRef(t[1],t[3])
430 def p_enum_value_6(t): argument
432 t[0] = EnumValueLocalRef(t[1])
434 def p_typename_v(t): argument
436 t[0] = SimpleTypename(t[1])
437 def p_typename_g(t): argument
439 t[0] = GenericTypename(t[1], t[3])
441 def p_struct_element_ivar(t): argument
443 t[0] = StructElementIVar(t[1], t[2])
445 def p_struct_element_struct(t): argument
447 t[0] = StructElementStruct(t[1])
449 def p_enum_case_v(t): argument
451 t[0] = EnumCase(t[1], t[3])
452 def p_enum_case_b(t): argument
454 t[0] = EnumCase(t[1], None)
456 def p_header_1(t): argument
458 t[0] = Header(t[1], [])
460 def p_header_2(t): argument
462 t[0] = Header(t[1], t[2])
464 def p_import_decls_1(t): argument
466 t[0] = [t[1]]
468 def p_import_decls_2(t): argument
470 t[0] = t[1] + [t[2]]
472 def p_package_decl(t): argument
474 t[0] = Package(t[2])
476 def p_import_decl(t): argument
478 t[0] = Import(t[2])
480 def p_package_ID(t): argument
482 t[0] = PackageID(t[1], t[2])
484 def p_dotted_identifier_1(t): argument
486 t[0] = t[1]
487 def p_dotted_identifier_2(t): argument
489 t[0] = t[1] + '.' + t[3]