summaryrefslogtreecommitdiff
path: root/compiler/cpp/src/thrift/thrifty.yy
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/cpp/src/thrift/thrifty.yy')
-rw-r--r--compiler/cpp/src/thrift/thrifty.yy51
1 files changed, 0 insertions, 51 deletions
diff --git a/compiler/cpp/src/thrift/thrifty.yy b/compiler/cpp/src/thrift/thrifty.yy
index dc6838a54..a062a0e40 100644
--- a/compiler/cpp/src/thrift/thrifty.yy
+++ b/compiler/cpp/src/thrift/thrifty.yy
@@ -134,8 +134,6 @@ const int struct_is_union = 1;
%token tok_bool
%token tok_string
%token tok_binary
-%token tok_slist
-%token tok_senum
%token tok_i8
%token tok_i16
%token tok_i32
@@ -205,10 +203,6 @@ const int struct_is_union = 1;
%type<tenumv> EnumDef
%type<tenumv> EnumValue
-%type<ttypedef> Senum
-%type<tbase> SenumDefList
-%type<id> SenumDef
-
%type<tconst> Const
%type<tconstv> ConstValue
%type<tconstv> ConstList
@@ -404,13 +398,6 @@ TypeDefinition:
g_program->add_enum($1);
}
}
-| Senum
- {
- pdebug("TypeDefinition -> Senum");
- if (g_parse_mode == PROGRAM) {
- g_program->add_typedef($1);
- }
- }
| Struct
{
pdebug("TypeDefinition -> Struct");
@@ -530,39 +517,6 @@ EnumValue:
$$ = new t_enum_value($1, y_enum_val);
}
-Senum:
- tok_senum tok_identifier '{' SenumDefList '}' TypeAnnotations
- {
- pdebug("Senum -> tok_senum tok_identifier { SenumDefList }");
- validate_simple_identifier( $2);
- $$ = new t_typedef(g_program, $4, $2);
- if ($6 != nullptr) {
- $$->annotations_ = $6->annotations_;
- delete $6;
- }
- }
-
-SenumDefList:
- SenumDefList SenumDef
- {
- pdebug("SenumDefList -> SenumDefList SenumDef");
- $$ = $1;
- $$->add_string_enum_val($2);
- }
-|
- {
- pdebug("SenumDefList -> ");
- $$ = new t_base_type("string", t_base_type::TYPE_STRING);
- $$->set_string_enum(true);
- }
-
-SenumDef:
- tok_literal CommaOrSemicolonOptional
- {
- pdebug("SenumDef -> tok_literal");
- $$ = $1;
- }
-
Const:
tok_const FieldType tok_identifier '=' ConstValue CommaOrSemicolonOptional
{
@@ -1048,11 +1002,6 @@ SimpleBaseType:
pdebug("BaseType -> tok_binary");
$$ = g_type_binary;
}
-| tok_slist
- {
- pdebug("BaseType -> tok_slist");
- $$ = g_type_slist;
- }
| tok_bool
{
pdebug("BaseType -> tok_bool");