namespace tidl {
-Block::Block(std::string id, Block::Type type,
+Block::Block(std::string id, Block::Type type, Enums* enums,
std::string comments, unsigned int line)
- : id_(std::move(id)), type_(type), comments_(std::move(comments)),
- line_(line) {}
+ : id_(std::move(id)), type_(type), enums_(enums),
+ comments_(std::move(comments)), line_(line) {}
const std::string& Block::GetID() const {
return id_;
return comments_;
}
+const Enums& Block::GetEnums() const {
+ return *enums_;
+}
} // namespace tidl
#include <memory>
#include "idlc/ast/declaration.h"
+#include "idlc/ast/enum.h"
namespace tidl {
TYPE_STRUCTURE,
};
- Block(std::string id, Block::Type type, std::string comments,
- unsigned int line);
+ Block(std::string id, Block::Type type, Enums* enums,
+ std::string comments, unsigned int line);
+
virtual ~Block() = default;
const std::string& GetID() const;
const Block::Type& GetType() const;
const unsigned int GetLine() const;
const std::string& GetComments() const;
+ const Enums& GetEnums() const;
private:
std::string id_;
Block::Type type_;
+ std::unique_ptr<Enums> enums_;
std::string comments_;
unsigned int line_;
};
--- /dev/null
+/*
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <utility>
+
+#include "idlc/ast/enum.h"
+
+namespace tidl {
+
+Field::Field(std::string id, std::string value, std::string comments,
+ unsigned int line)
+ : id_(std::move(id)),
+ value_(std::move(value)),
+ comments_(std::move(comments)),
+ line_(line) {}
+
+const std::string& Field::GetID() const { return id_; }
+
+const std::string& Field::GetValue() const { return value_; }
+
+const unsigned int Field::GetLine() const { return line_; }
+
+const std::string& Field::GetComments() const { return comments_; }
+
+void Fields::Add(std::unique_ptr<Field> field) {
+ field_.push_back(std::move(field));
+}
+
+bool Fields::Exist(const Field& field) const {
+ for (auto& e : field_) {
+ if (e->GetID() == field.GetID()) return true;
+ }
+
+ return false;
+}
+
+std::list<std::unique_ptr<Field>>::const_iterator Fields::begin() const {
+ return field_.cbegin();
+}
+
+std::list<std::unique_ptr<Field>>::const_iterator Fields::end() const {
+ return field_.cend();
+}
+
+Enum::Enum(std::string id, Fields* fields, std::string comments,
+ unsigned int line)
+ : id_(std::move(id)), fields_(fields), comments_(std::move(comments)),
+ line_(line) {}
+
+const std::string& Enum::GetID() const { return id_; }
+
+const unsigned int Enum::GetLine() const { return line_; }
+
+const std::string& Enum::GetComments() const { return comments_; }
+
+const Fields& Enum::GetFields() const { return *fields_; }
+
+void Enums::Add(std::unique_ptr<Enum> elm) { enums_.push_back(std::move(elm)); }
+
+bool Enums::Exist(const Enum& elm) const {
+ for (auto& e : enums_) {
+ if (e->GetID() == elm.GetID()) return true;
+ }
+
+ return false;
+}
+
+bool Enums::Exist(const std::string& id) const {
+ for (auto& e : enums_) {
+ if (e->GetID() == id) return true;
+ }
+
+ return false;
+}
+
+std::list<std::unique_ptr<Enum>>::const_iterator Enums::begin() const {
+ return enums_.cbegin();
+}
+
+std::list<std::unique_ptr<Enum>>::const_iterator Enums::end() const {
+ return enums_.cend();
+}
+
+} // namespace tidl
--- /dev/null
+/*
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef IDLC_ENUM_H_
+#define IDLC_ENUM_H_
+
+#include <string>
+#include <list>
+#include <memory>
+
+namespace tidl {
+
+class Field {
+ public:
+ Field(std::string id, std::string value, std::string comments,
+ unsigned int line);
+
+ const std::string& GetID() const;
+ const std::string& GetValue() const;
+ const unsigned int GetLine() const;
+ const std::string& GetComments() const;
+
+ private:
+ std::string id_;
+ std::string value_;
+ std::string comments_;
+ unsigned int line_;
+};
+
+class Fields {
+ public:
+ void Add(std::unique_ptr<Field> field);
+ bool Exist(const Field& field) const;
+ std::list<std::unique_ptr<Field>>::const_iterator begin() const;
+ std::list<std::unique_ptr<Field>>::const_iterator end() const;
+
+ private:
+ std::list<std::unique_ptr<Field>> field_;
+};
+
+class Enum {
+ public:
+ Enum(std::string id, Fields* fields, std::string comments, unsigned int line);
+
+ const std::string& GetID() const;
+ const std::string& GetValue() const;
+ const unsigned int GetLine() const;
+ const std::string& GetComments() const;
+ const Fields& GetFields() const;
+
+ private:
+ std::string id_;
+ std::unique_ptr<Fields> fields_;
+ std::string comments_;
+ unsigned int line_;
+};
+
+class Enums {
+ public:
+ void Add(std::unique_ptr<Enum> elm);
+ bool Exist(const Enum& elm) const;
+ bool Exist(const std::string& id) const;
+ std::list<std::unique_ptr<Enum>>::const_iterator begin() const;
+ std::list<std::unique_ptr<Enum>>::const_iterator end() const;
+
+ private:
+ std::list<std::unique_ptr<Enum>> enums_;
+};
+
+} // namespace tidl
+
+#endif // IDLC_ENUM_H_
namespace tidl {
-Interface::Interface(std::string id, Declarations* decls, std::string comments,
- Attributes* attrs, unsigned line)
- : Block::Block(std::move(id), Block::TYPE_INTERFACE,
+Interface::Interface(std::string id, Declarations* decls, Enums* enums,
+ std::string comments, Attributes* attrs, unsigned line)
+ : Block::Block(std::move(id), Block::TYPE_INTERFACE, enums,
std::move(comments), line),
decls_(decls),
attrs_(attrs) {}
class Interface : public Block {
public:
- Interface(std::string id, Declarations* decls, std::string comments,
- Attributes* attrs, unsigned line);
+ Interface(std::string id, Declarations* decls, Enums* enums,
+ std::string comments, Attributes* attrs, unsigned line);
const Declarations& GetDeclarations() const;
const Attributes& GetAttributes() const;
// version 2.2 of Bison.
/**
- ** \file /home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/location.hh
+ ** \file /opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/location.hh
** Define the yy::location class.
*/
-#ifndef YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
-# define YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
+#ifndef YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
+# define YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
# include "position.hh"
namespace yy {
-#line 46 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/location.hh" // location.cc:296
+#line 46 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/location.hh" // location.cc:296
/// Abstract a location.
class location
{
} // yy
-#line 168 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/location.hh" // location.cc:296
-#endif // !YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
+#line 168 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/location.hh" // location.cc:296
+#endif // !YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
// version 2.2 of Bison.
/**
- ** \file /home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/position.hh
+ ** \file /opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/position.hh
** Define the yy::position class.
*/
-#ifndef YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
-# define YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
+#ifndef YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
+# define YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
# include <algorithm> // std::max
# include <iostream>
namespace yy {
-#line 56 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/position.hh" // location.cc:296
+#line 56 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/position.hh" // location.cc:296
/// Abstract a position.
class position
{
} // yy
-#line 169 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/position.hh" // location.cc:296
-#endif // !YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
+#line 169 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/position.hh" // location.cc:296
+#endif // !YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
namespace tidl {
-Structure::Structure(std::string id, Elements* elms, std::string comments,
- unsigned line)
- : Block::Block(std::move(id), Block::TYPE_STRUCTURE,
+Structure::Structure(std::string id, Elements* elms, Enums* enums,
+ std::string comments, unsigned line)
+ : Block::Block(std::move(id), Block::TYPE_STRUCTURE, enums,
std::move(comments), line), elms_(elms) {}
const Elements& Structure::GetElements() const {
#include "idlc/ast/block.h"
#include "idlc/ast/element.h"
+#include "idlc/ast/enum.h"
namespace tidl {
class Structure : public Block {
public:
- Structure(std::string id, Elements* elms, std::string comments,
+ Structure(std::string id, Elements* elms, Enums* enums, std::string comments,
unsigned line);
const Elements& GetElements() const;
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_LIST;
}
+"enum" {
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_ENUM;
+ }
"array" {
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_ARRAY;
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_ID;
}
-[0-9]+ {
+-?[0-9]+ {
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_NUMBER;
}
+-?0x[0-9a-f]+ {
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_HEX_NUMBER;
+ }
"[" { // Square Bracket
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SB_OPEN;
return yy::parser::token::T_SB_CLOSE;
}
"=" { return yy::parser::token::T_EQUAL; }
-. { return yy::parser::token::T_UNKNOWN; }
+. { return yy::parser::token::T_DOT; }
%%
#include "idlc/ast/parameter.h"
#include "idlc/ast/interface.h"
#include "idlc/ast/element.h"
+#include "idlc/ast/enum.h"
#include "idlc/ast/structure.h"
#include "idlc/ast/block.h"
#include "idlc/ast/attribute.h"
#define lex_scanner ps->Scanner()
+tidl::Enums* currentInterfaceEnums;
+tidl::Declarations* currentDeclarations = nullptr;
+tidl::Document* document = nullptr;
%}
%parse-param { tidl::Parser* ps }
%token T_LEFT T_RIGHT T_COMMA T_SEMICOLON T_BRACE_OPEN T_BRACE_CLOSE
%token T_IN T_OUT T_REF T_ASYNC
%token T_META_OPEN T_META_CLOSE
-%token T_EQUAL T_DELEGATE T_UNKNOWN
+%token T_EQUAL T_DELEGATE T_DOT
%start start
tidl::Block* blk;
tidl::Attribute* attr;
tidl::Attributes* attrs;
+ tidl::Enum* enumeration;
+ tidl::Enums* enumerations;
+ tidl::Field* enum_field;
+ tidl::Fields* enum_fields;
}
%token<token> T_ID
%token<token> T_NUMBER
+%token<token> T_HEX_NUMBER
%token<token> T_STRUCTURE
%token<token> T_INTERFACE
%token<token> T_CHAR
%token<token> T_SB_CLOSE
%token<token> T_FILE
%token<token> T_PROTOCOL
+%token<token> T_ENUM
%type<doc> blocks
%type<blk> block
%type<structure> structure_block
%type<elms> elements
%type<attr> attribute
%type<attrs> attributes
+%type<enumeration> enum
+%type<enumerations> enums
+%type<enum_field> field
+%type<enum_fields> fields
%%
blocks: block {
$$ = new tidl::Document();
+ document = $$;
if ($1 != NULL)
$$->AddBlock($1);
}
block: interface_block {
$$ = $1;
+ currentInterfaceEnums = nullptr;
}
| structure_block {
$$ = $1;
+ currentInterfaceEnums = nullptr;
}
| protocol_block {
$$ = $1;
;
structure_block: T_STRUCTURE T_ID T_BRACE_OPEN elements T_BRACE_CLOSE {
- $$ = new tidl::Structure($2->ToString(), $4, $1->GetComments(),
+ $$ = new tidl::Structure($2->ToString(), $4, new tidl::Enums(),
+ $1->GetComments(), @1.begin.line);
+ delete $1;
+ delete $2;
+ }
+ | T_STRUCTURE T_ID T_BRACE_OPEN enums elements T_BRACE_CLOSE {
+ $$ = new tidl::Structure($2->ToString(), $5, $4, $1->GetComments(),
+ @1.begin.line);
+ delete $1;
+ delete $2;
+ }
+ | T_STRUCTURE T_ID T_BRACE_OPEN enums T_BRACE_CLOSE {
+ $$ = new tidl::Structure($2->ToString(), new tidl::Elements(), $4, $1->GetComments(),
@1.begin.line);
delete $1;
delete $2;
}
;
+enums: enum {
+ $$ = new (std::nothrow) tidl::Enums();
+ currentInterfaceEnums = $$;
+ if ($$ != nullptr) {
+ if ($1 != nullptr) {
+ $$->Add(std::unique_ptr<tidl::Enum>($1));
+ }
+ }
+ }
+ | enums enum {
+ $$ = $1;
+ if ($2 != nullptr) {
+ if ($$->Exist(*$2)) {
+ ps->ReportError("syntax error. \"Already Exists\".", $2->GetLine());
+ delete $2;
+ } else {
+ $$->Add(std::unique_ptr<tidl::Enum>($2));
+ }
+ }
+ }
+;
+
+enum: T_ENUM T_ID T_BRACE_OPEN fields T_BRACE_CLOSE {
+ $$ = new tidl::Enum($2->ToString(), $4, $1->GetComments(),
+ @1.begin.line);
+ delete $2;
+ }
+;
+
+fields: field {
+ $$ = new (std::nothrow) tidl::Fields();
+ if ($$ != nullptr) {
+ if ($1 != nullptr) {
+ $$->Add(std::unique_ptr<tidl::Field>($1));
+ }
+ }
+ }
+ | fields field {
+ $$ = $1;
+ if ($2 != nullptr) {
+ if ($$->Exist(*$2)) {
+ ps->ReportError("syntax error. \"Already Exists\".", $2->GetLine());
+ delete $2;
+ } else {
+ $$->Add(std::unique_ptr<tidl::Field>($2));
+ }
+ }
+ }
+;
+
+field: T_ID T_COMMA {
+ $$ = new (std::nothrow) tidl::Field($1->ToString(), "", $1->GetComments(),
+ @1.begin.line);
+ }
+ | T_ID T_EQUAL T_NUMBER T_COMMA {
+ $$ = new (std::nothrow) tidl::Field($1->ToString(), $3->ToString(),
+ $1->GetComments(), @1.begin.line);
+ }
+ | T_ID T_EQUAL T_HEX_NUMBER T_COMMA {
+ $$ = new (std::nothrow) tidl::Field($1->ToString(), $3->ToString(),
+ $1->GetComments(), @1.begin.line);
+ }
+ | T_ID {
+ $$ = new (std::nothrow) tidl::Field($1->ToString(), "", $1->GetComments(),
+ @1.begin.line);
+ }
+ | T_ID T_EQUAL T_NUMBER {
+ $$ = new (std::nothrow) tidl::Field($1->ToString(), $3->ToString(),
+ $1->GetComments(), @1.begin.line);
+ }
+ | T_ID T_EQUAL T_HEX_NUMBER {
+ $$ = new (std::nothrow) tidl::Field($1->ToString(), $3->ToString(),
+ $1->GetComments(), @1.begin.line);
+ }
+;
+
elements: element {
$$ = new (std::nothrow) tidl::Elements();
if ($$ != nullptr) {
;
interface_block: T_INTERFACE T_ID T_BRACE_OPEN declarations T_BRACE_CLOSE {
- $$ = new tidl::Interface($2->ToString(), $4, $1->GetComments(),
+ $$ = new tidl::Interface($2->ToString(), $4, new tidl::Enums(), $1->GetComments(),
new tidl::Attributes(), @1.begin.line);
delete $1;
delete $2;
}
| T_SB_OPEN attributes T_SB_CLOSE T_INTERFACE T_ID T_BRACE_OPEN declarations T_BRACE_CLOSE {
- $$ = new tidl::Interface($5->ToString(), $7, $1->GetComments(), $2,
+ $$ = new tidl::Interface($5->ToString(), $7, new tidl::Enums(),
+ $1->GetComments(), $2, @1.begin.line);
+ delete $1;
+ delete $3;
+ delete $4;
+ delete $5;
+ }
+ | T_INTERFACE T_ID T_BRACE_OPEN enums declarations T_BRACE_CLOSE {
+ $$ = new tidl::Interface($2->ToString(), $5, $4, $1->GetComments(),
+ new tidl::Attributes(), @1.begin.line);
+ delete $1;
+ delete $2;
+ }
+ | T_SB_OPEN attributes T_SB_CLOSE T_INTERFACE T_ID T_BRACE_OPEN enums declarations T_BRACE_CLOSE {
+ $$ = new tidl::Interface($5->ToString(), $8, $7, $1->GetComments(), $2,
@1.begin.line);
delete $1;
delete $3;
declarations: declaration {
$$ = new (std::nothrow) tidl::Declarations();
+ currentDeclarations = $$;
if ($$ != nullptr) {
if ($1 != nullptr) {
$$->Add(std::unique_ptr<tidl::Declaration>($1));
delete $1;
}
| T_ID {
- $$ = new tidl::BaseType($1->ToString(), $1->GetComments(), true);
+ bool found = false;
+ tidl::BaseType::UserType type;
+ if (currentInterfaceEnums) {
+ for (auto& e : *currentInterfaceEnums) {
+ if (e->GetID() == $1->ToString()) {
+ type = tidl::BaseType::UserType::ENUM;
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found && document) {
+ for (auto& b : document->GetBlocks()) {
+ if (b->GetType() == tidl::Block::TYPE_STRUCTURE
+ && b->GetID() == $1->ToString()) {
+ type = tidl::BaseType::UserType::STRUCTURE;
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if(!found && currentDeclarations) {
+ for (auto& d : *currentDeclarations) {
+ if (d->GetMethodType() == tidl::Declaration::MethodType::DELEGATE) {
+ if (d->GetID() == $1->ToString()) {
+ type = tidl::BaseType::UserType::DELEGATE;
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (found) {
+ $$ = new tidl::BaseType($1->ToString(), $1->GetComments(), type);
+ } else {
+ ps->ReportError("Unknown type : " + $1->ToString(), @1.begin.line);
+ $$ = NULL;
+ }
+ delete $1;
+ }
+ | T_ID T_DOT T_ID {
+ bool found = false;
+ if (document) {
+ for (auto& b : document->GetBlocks()) {
+ if (b->GetType() == tidl::Block::TYPE_STRUCTURE
+ && b->GetID() == $1->ToString()) {
+ for (auto& e : b->GetEnums()) {
+ if (e->GetID() == $3->ToString()) {
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (found) {
+ $$ = new tidl::BaseType($1->ToString() + "." + $3->ToString() , $1->GetComments(), tidl::BaseType::UserType::ENUM);
+ } else {
+ ps->ReportError("Unknown type : " + $1->ToString() + "." + $3->ToString(),
+ @1.begin.line);
+ $$ = NULL;
+ }
delete $1;
}
;
-#line 2 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 2 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_l.cpp"
-#line 4 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 4 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_l.cpp"
#define YY_INT_ALIGNED short int
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 48
-#define YY_END_OF_BUFFER 49
+#define YY_NUM_RULES 52
+#define YY_END_OF_BUFFER 53
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[142] =
+static const flex_int16_t yy_accept[156] =
{ 0,
- 0, 0, 0, 0, 0, 0, 49, 47, 12, 11,
- 8, 16, 17, 13, 47, 43, 18, 36, 46, 37,
- 42, 44, 45, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 14, 15, 6, 5, 6,
- 10, 48, 9, 10, 11, 1, 0, 43, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 31, 42,
- 42, 42, 42, 42, 42, 42, 42, 6, 5, 3,
- 10, 0, 7, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 22, 42, 42, 32, 42, 33, 42, 42,
- 42, 0, 5, 4, 0, 2, 0, 42, 42, 29,
-
- 42, 20, 42, 42, 27, 42, 42, 38, 23, 42,
- 42, 42, 42, 19, 0, 39, 34, 42, 42, 42,
- 24, 42, 42, 21, 42, 42, 26, 42, 25, 42,
- 42, 28, 40, 42, 42, 42, 35, 42, 30, 41,
- 0
+ 0, 0, 0, 0, 0, 0, 53, 51, 12, 11,
+ 8, 16, 17, 13, 51, 51, 46, 46, 18, 36,
+ 50, 37, 45, 48, 49, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 14,
+ 15, 6, 5, 6, 10, 52, 9, 10, 11, 46,
+ 46, 1, 0, 0, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 31, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 6, 5, 3, 10,
+ 0, 7, 47, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 22, 45, 45, 41, 32, 45, 33,
+
+ 42, 45, 45, 45, 0, 5, 4, 0, 2, 0,
+ 45, 45, 29, 45, 20, 45, 45, 39, 27, 45,
+ 45, 38, 23, 45, 45, 45, 45, 19, 0, 40,
+ 34, 45, 45, 45, 24, 45, 45, 21, 45, 45,
+ 26, 45, 25, 45, 45, 28, 43, 45, 45, 45,
+ 35, 45, 30, 44, 0
} ;
static const YY_CHAR yy_ec[256] =
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 4, 1, 1, 1, 1, 1, 5,
- 6, 7, 1, 8, 1, 1, 9, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 1, 11, 12,
- 13, 14, 1, 1, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 16, 1, 17, 1, 15, 1, 18, 19, 20, 21,
-
- 22, 23, 24, 25, 26, 15, 15, 27, 15, 28,
- 29, 30, 15, 31, 32, 33, 34, 35, 15, 15,
- 36, 15, 37, 1, 38, 1, 1, 1, 1, 1,
+ 6, 7, 1, 8, 9, 1, 10, 11, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 1, 13, 14,
+ 15, 16, 1, 1, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 18, 1, 19, 1, 17, 1, 20, 21, 22, 23,
+
+ 24, 25, 26, 27, 28, 17, 17, 29, 30, 31,
+ 32, 33, 17, 34, 35, 36, 37, 38, 17, 39,
+ 40, 17, 41, 1, 42, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static const YY_CHAR yy_meta[39] =
+static const YY_CHAR yy_meta[43] =
{ 0,
- 1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
- 1, 1, 1, 1, 3, 1, 1, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 1, 1
+ 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
+ 3, 3, 1, 1, 1, 1, 4, 1, 1, 3,
+ 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 1, 1
} ;
-static const flex_int16_t yy_base[148] =
+static const flex_int16_t yy_base[163] =
{ 0,
- 0, 0, 36, 37, 38, 43, 166, 167, 167, 162,
- 167, 167, 167, 167, 42, 154, 167, 167, 167, 167,
- 0, 167, 167, 21, 25, 138, 26, 30, 134, 32,
- 127, 129, 137, 35, 129, 167, 167, 154, 153, 146,
- 151, 150, 149, 167, 148, 167, 147, 139, 0, 117,
- 111, 117, 117, 126, 116, 108, 114, 111, 106, 106,
- 109, 103, 106, 111, 104, 101, 105, 0, 127, 60,
- 0, 126, 167, 110, 99, 99, 104, 93, 101, 103,
- 99, 102, 97, 85, 93, 0, 83, 0, 84, 36,
- 93, 110, 109, 108, 101, 167, 106, 72, 87, 0,
-
- 79, 0, 81, 77, 0, 70, 71, 0, 0, 72,
- 67, 71, 78, 0, 57, 0, 0, 75, 78, 73,
- 0, 71, 73, 0, 68, 58, 0, 57, 0, 71,
- 59, 0, 0, 65, 66, 57, 0, 59, 0, 0,
- 167, 70, 73, 62, 76, 79, 82
+ 0, 0, 40, 41, 42, 47, 194, 195, 195, 190,
+ 195, 195, 195, 195, 41, 48, 45, 48, 195, 195,
+ 195, 195, 0, 195, 195, 27, 31, 165, 40, 160,
+ 37, 159, 39, 169, 151, 153, 162, 46, 153, 195,
+ 195, 181, 180, 172, 178, 177, 176, 195, 175, 63,
+ 65, 195, 174, 0, 0, 142, 135, 142, 142, 152,
+ 142, 133, 132, 139, 135, 130, 130, 133, 130, 126,
+ 129, 135, 123, 126, 123, 128, 0, 152, 76, 0,
+ 151, 195, 0, 133, 121, 122, 127, 115, 124, 126,
+ 116, 121, 124, 119, 106, 115, 0, 0, 104, 0,
+
+ 0, 105, 41, 115, 134, 133, 132, 124, 195, 130,
+ 92, 109, 0, 101, 0, 103, 99, 0, 0, 91,
+ 92, 0, 0, 93, 86, 87, 79, 0, 78, 0,
+ 0, 76, 79, 74, 0, 72, 74, 0, 69, 58,
+ 0, 57, 0, 72, 59, 0, 0, 66, 67, 58,
+ 0, 57, 0, 0, 195, 102, 106, 108, 112, 77,
+ 116, 120
} ;
-static const flex_int16_t yy_def[148] =
+static const flex_int16_t yy_def[163] =
{ 0,
- 141, 1, 142, 142, 143, 143, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 144, 141, 141, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 145, 141, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 146, 146, 141,
- 147, 145, 141, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 141, 141, 141, 141, 141, 141, 144, 144, 144,
-
- 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 141, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 0, 141, 141, 141, 141, 141, 141
+ 155, 1, 156, 156, 157, 157, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 158, 155, 155, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 159, 160, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 161, 161, 155, 162,
+ 159, 155, 160, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+
+ 158, 158, 158, 158, 155, 155, 155, 155, 155, 155,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 155, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 0, 155, 155, 155, 155, 155,
+ 155, 155
} ;
-static const flex_int16_t yy_nxt[206] =
+static const flex_int16_t yy_nxt[238] =
{ 0,
8, 9, 10, 11, 12, 13, 8, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 21, 28, 21, 21, 29, 30, 21, 31, 32,
- 33, 34, 21, 21, 35, 21, 36, 37, 39, 39,
- 42, 43, 40, 40, 44, 42, 43, 55, 46, 44,
- 47, 50, 51, 52, 56, 57, 58, 60, 53, 65,
- 61, 112, 94, 95, 49, 96, 95, 66, 96, 113,
- 38, 38, 38, 41, 41, 41, 72, 72, 72, 92,
- 140, 92, 97, 139, 97, 138, 137, 136, 135, 134,
- 133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
-
- 123, 122, 121, 120, 119, 118, 117, 116, 71, 115,
- 94, 69, 68, 114, 111, 110, 109, 108, 107, 106,
- 105, 104, 103, 102, 101, 100, 99, 98, 73, 93,
- 91, 90, 89, 88, 87, 86, 85, 84, 83, 82,
- 81, 80, 79, 78, 77, 76, 75, 74, 48, 73,
- 45, 71, 71, 71, 70, 69, 68, 67, 64, 63,
- 62, 59, 54, 48, 45, 141, 7, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
-
- 141, 141, 141, 141, 141
+ 27, 28, 29, 30, 31, 23, 23, 32, 33, 34,
+ 23, 35, 36, 37, 38, 23, 23, 39, 23, 23,
+ 40, 41, 43, 43, 46, 47, 44, 44, 48, 46,
+ 47, 50, 51, 48, 52, 51, 51, 53, 51, 51,
+ 56, 57, 58, 61, 64, 65, 67, 59, 126, 73,
+ 68, 62, 74, 51, 51, 51, 51, 127, 107, 83,
+ 154, 75, 108, 54, 108, 109, 153, 109, 152, 151,
+ 150, 149, 148, 147, 146, 145, 144, 143, 142, 141,
+
+ 140, 54, 42, 42, 42, 42, 45, 45, 45, 45,
+ 55, 55, 81, 81, 81, 81, 105, 139, 105, 105,
+ 110, 138, 110, 110, 137, 136, 135, 134, 133, 132,
+ 131, 130, 80, 129, 107, 78, 77, 128, 125, 124,
+ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114,
+ 113, 112, 111, 82, 106, 104, 103, 102, 101, 100,
+ 99, 98, 97, 96, 95, 94, 93, 92, 91, 90,
+ 89, 88, 87, 86, 85, 84, 82, 49, 80, 80,
+ 80, 79, 78, 77, 76, 72, 71, 70, 69, 66,
+ 63, 60, 49, 155, 7, 155, 155, 155, 155, 155,
+
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155
} ;
-static const flex_int16_t yy_chk[206] =
+static const flex_int16_t yy_chk[238] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 4,
- 5, 5, 3, 4, 5, 6, 6, 27, 15, 6,
- 15, 24, 24, 25, 27, 28, 28, 30, 25, 34,
- 30, 90, 70, 115, 144, 115, 70, 34, 70, 90,
- 142, 142, 142, 143, 143, 143, 145, 145, 145, 146,
- 138, 146, 147, 136, 147, 135, 134, 131, 130, 128,
- 126, 125, 123, 122, 120, 119, 118, 113, 112, 111,
-
- 110, 107, 106, 104, 103, 101, 99, 98, 97, 95,
- 94, 93, 92, 91, 89, 87, 85, 84, 83, 82,
- 81, 80, 79, 78, 77, 76, 75, 74, 72, 69,
- 67, 66, 65, 64, 63, 62, 61, 60, 59, 58,
- 57, 56, 55, 54, 53, 52, 51, 50, 48, 47,
- 45, 43, 42, 41, 40, 39, 38, 35, 33, 32,
- 31, 29, 26, 16, 10, 7, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
-
- 141, 141, 141, 141, 141
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 3, 4, 5, 5, 3, 4, 5, 6,
+ 6, 15, 15, 6, 16, 17, 17, 16, 18, 18,
+ 26, 26, 27, 29, 31, 31, 33, 27, 103, 38,
+ 33, 29, 38, 50, 50, 51, 51, 103, 79, 160,
+ 152, 38, 79, 17, 129, 79, 150, 129, 149, 148,
+ 145, 144, 142, 140, 139, 137, 136, 134, 133, 132,
+
+ 127, 50, 156, 156, 156, 156, 157, 157, 157, 157,
+ 158, 158, 159, 159, 159, 159, 161, 126, 161, 161,
+ 162, 125, 162, 162, 124, 121, 120, 117, 116, 114,
+ 112, 111, 110, 108, 107, 106, 105, 104, 102, 99,
+ 96, 95, 94, 93, 92, 91, 90, 89, 88, 87,
+ 86, 85, 84, 81, 78, 76, 75, 74, 73, 72,
+ 71, 70, 69, 68, 67, 66, 65, 64, 63, 62,
+ 61, 60, 59, 58, 57, 56, 53, 49, 47, 46,
+ 45, 44, 43, 42, 39, 37, 36, 35, 34, 32,
+ 30, 28, 10, 7, 155, 155, 155, 155, 155, 155,
+
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155
} ;
/* Table of booleans, true if rule could match eol. */
-static const flex_int32_t yy_rule_can_match_eol[49] =
+static const flex_int32_t yy_rule_can_match_eol[53] =
{ 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, };
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
-#line 2 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 1 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
+#line 2 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
#include <stdio.h>
#include <string>
#include "idlc/ast/tidlc_y.hpp"
#define YY_USER_ACTION yylloc->columns(yyleng);
-#line 581 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 593 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_l.cpp"
-#line 583 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 595 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_l.cpp"
#define INITIAL 0
#define COMMENT 1
}
{
-#line 28 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 28 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
-#line 31 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 31 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
std::string comments;
std::string values;
-#line 877 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 889 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_l.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 142 )
+ if ( yy_current_state >= 156 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 167 );
+ while ( yy_base[yy_current_state] != 195 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
case 1:
YY_RULE_SETUP
-#line 35 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 35 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; BEGIN(COMMENT); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 36 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 36 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); BEGIN(INITIAL); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 37 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 37 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; comments += "\n"; BEGIN(INITIAL); }
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 38 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 38 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); BEGIN(INITIAL); }
YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 39 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 39 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->lines(yyleng); }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 40 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 40 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); }
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 41 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 41 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return 0; }
YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
-#line 43 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 43 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 45 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 45 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ BEGIN(VALUE); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 46 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 46 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
BEGIN(INITIAL);
yylval->token = new tidl::Token(values, comments);
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 51 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 51 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ values += yytext; yylloc->step(); }
YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 53 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 53 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ yylloc->lines(yyleng); yylloc->step(); }
YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 55 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 55 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
; // ignore all whitespace
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 56 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 56 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_COMMA; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 57 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 57 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_BRACE_OPEN; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 58 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 58 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_BRACE_CLOSE; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 59 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 59 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_LEFT; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 60 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 60 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_RIGHT; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 61 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 61 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_SEMICOLON; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 62 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 62 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_VOID;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 66 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 66 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_CHAR;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 70 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 70 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SHORT;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 74 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 74 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_INT;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 78 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 78 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_LONG;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 82 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 82 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_FLOAT;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 86 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 86 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_DOUBLE;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 90 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 90 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_BUNDLE;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 94 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 94 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_FILE;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 98 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 98 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_STRING;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 102 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 102 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_BOOL;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 106 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 106 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_PROTOCOL;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 110 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 110 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_IN; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 111 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 111 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_OUT; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 112 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 112 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_REF; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 113 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 113 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_ASYNC; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 114 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 114 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_DELEGATE; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 115 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 115 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_META_OPEN; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 116 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 116 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_META_CLOSE; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 117 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 117 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_LIST;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 121 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 121 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
- return yy::parser::token::T_ARRAY;
+ return yy::parser::token::T_ENUM;
}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 125 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 125 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
- return yy::parser::token::T_STRUCTURE;
+ return yy::parser::token::T_ARRAY;
}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 129 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 129 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
- return yy::parser::token::T_INTERFACE;
+ return yy::parser::token::T_MAP;
}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 133 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 133 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
- return yy::parser::token::T_ID;
+ return yy::parser::token::T_SET;
}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 137 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 137 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
- return yy::parser::token::T_NUMBER;
+ return yy::parser::token::T_STRUCTURE;
}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 141 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 141 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
+{
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_INTERFACE;
+ }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 145 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
+{
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_ID;
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 149 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
+{
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_NUMBER;
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 153 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
+{
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_HEX_NUMBER;
+ }
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 157 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ // Square Bracket
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SB_OPEN;
}
YY_BREAK
-case 45:
+case 49:
YY_RULE_SETUP
-#line 145 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 161 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ // Square Bracket
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SB_CLOSE;
}
YY_BREAK
-case 46:
+case 50:
YY_RULE_SETUP
-#line 149 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 165 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_EQUAL; }
YY_BREAK
-case 47:
+case 51:
YY_RULE_SETUP
-#line 150 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_UNKNOWN; }
+#line 166 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_DOT; }
YY_BREAK
-case 48:
+case 52:
YY_RULE_SETUP
-#line 152 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 168 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
ECHO;
YY_BREAK
-#line 1261 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 1305 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_l.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(VALUE):
yyterminate();
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 142 )
+ if ( yy_current_state >= 156 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 142 )
+ if ( yy_current_state >= 156 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 141);
+ yy_is_jam = (yy_current_state == 155);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state;
#define YYTABLES_NAME "yytables"
-#line 152 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 168 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.ll"
/* First part of user declarations. */
-#line 1 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:240
+#line 1 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:240
#include <stdio.h>
#include <stdlib.h>
#include "idlc/ast/parameter.h"
#include "idlc/ast/interface.h"
#include "idlc/ast/element.h"
+#include "idlc/ast/enum.h"
#include "idlc/ast/structure.h"
#include "idlc/ast/block.h"
#include "idlc/ast/attribute.h"
#define lex_scanner ps->Scanner()
+tidl::Enums* currentInterfaceEnums;
+tidl::Declarations* currentDeclarations = nullptr;
+tidl::Document* document = nullptr;
-#line 77 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:240
+#line 81 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:240
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
;
/* Copy the second part of user declarations. */
-#line 109 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:263
+#line 113 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:263
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
static void yyerror (const yy::parser::location_type *yylocationp, yy::parser& yyparser, tidl::Parser* ps, const char* msg);
-#line 131 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:263
+#line 135 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:263
#include <stdio.h>
#include <stdlib.h>
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 23
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 396
+#define YYLAST 649
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 39
+#define YYNTOKENS 43
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 21
+#define YYNNTS 25
/* YYNRULES -- Number of rules. */
-#define YYNRULES 73
+#define YYNRULES 92
/* YYNRULES -- Number of states. */
-#define YYNSTATES 139
+#define YYNSTATES 172
/* YYMAXRHS -- Maximum number of symbols on right-hand side of rule. */
-#define YYMAXRHS 8
+#define YYMAXRHS 9
/* YYMAXLEFT -- Maximum number of symbols to the left of a handle
accessed by $0, $-1, etc., in any rule. */
#define YYMAXLEFT 0
/* YYTRANSLATE(X) -- Bison symbol number corresponding to X. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 293
+#define YYMAXUTOK 297
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38
+ 35, 36, 37, 38, 39, 40, 41, 42
};
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
{
- 0, 100, 100, 105, 110, 124, 127, 130, 135, 148,
- 157, 163, 168, 174, 181, 189, 200, 206, 211, 215,
- 219, 225, 233, 244, 250, 255, 261, 268, 274, 282,
- 287, 292, 299, 307, 318, 324, 337, 345, 360, 365,
- 370, 375, 379, 383, 387, 391, 397, 405, 416, 422,
- 425, 428, 433, 436, 440, 446, 449, 455, 458, 475,
- 478, 482, 486, 490, 494, 498, 502, 506, 516, 520,
- 524, 530, 537, 541
+ 0, 116, 116, 121, 127, 141, 145, 149, 154, 167,
+ 176, 182, 188, 194, 199, 205, 212, 221, 234, 241,
+ 249, 262, 266, 270, 274, 278, 282, 288, 296, 307,
+ 313, 318, 322, 326, 332, 340, 351, 357, 362, 368,
+ 375, 381, 389, 395, 403, 408, 413, 420, 429, 440,
+ 446, 459, 467, 482, 487, 492, 497, 501, 505, 509,
+ 513, 519, 527, 538, 544, 547, 550, 555, 558, 562,
+ 568, 571, 577, 580, 597, 600, 604, 608, 612, 616,
+ 620, 624, 628, 638, 642, 646, 690, 717, 727, 740,
+ 744, 748, 756
};
#endif
"$end", "error", "$undefined", "T_LEFT", "T_RIGHT", "T_COMMA",
"T_SEMICOLON", "T_BRACE_OPEN", "T_BRACE_CLOSE", "T_IN", "T_OUT", "T_REF",
"T_ASYNC", "T_META_OPEN", "T_META_CLOSE", "T_EQUAL", "T_DELEGATE",
- "T_UNKNOWN", "T_ID", "T_NUMBER", "T_STRUCTURE", "T_INTERFACE", "T_CHAR",
- "T_SHORT", "T_INT", "T_LONG", "T_FLOAT", "T_DOUBLE", "T_VOID",
- "T_BUNDLE", "T_STRING", "T_BOOL", "T_LIST", "T_ARRAY", "T_VALUE",
- "T_SB_OPEN", "T_SB_CLOSE", "T_FILE", "T_PROTOCOL", "$accept", "start",
- "blocks", "block", "protocol_block", "structure_block", "elements",
- "element", "attributes", "attribute", "interface_block", "declarations",
- "declaration", "parameter_list", "direction_specifier", "parameter",
- "parameter_type", "base_type", "raw_type", "container_type",
+ "T_DOT", "T_ID", "T_NUMBER", "T_HEX_NUMBER", "T_STRUCTURE",
+ "T_INTERFACE", "T_CHAR", "T_SHORT", "T_INT", "T_LONG", "T_FLOAT",
+ "T_DOUBLE", "T_VOID", "T_BUNDLE", "T_STRING", "T_BOOL", "T_LIST",
+ "T_ARRAY", "T_MAP", "T_SET", "T_VALUE", "T_SB_OPEN", "T_SB_CLOSE",
+ "T_FILE", "T_PROTOCOL", "T_ENUM", "$accept", "start", "blocks", "block",
+ "protocol_block", "structure_block", "enums", "enum", "fields", "field",
+ "elements", "element", "attributes", "attribute", "interface_block",
+ "declarations", "declaration", "parameter_list", "direction_specifier",
+ "parameter", "parameter_type", "base_type", "raw_type", "container_type",
"container_type_name", YY_NULLPTR
};
#endif
-#define YYPACT_NINF -70
-#define YYTABLE_NINF -61
+#define YYPACT_NINF -76
+#define YYTABLE_NINF -76
// YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
// STATE-NUM.
static const short int yypact[] =
{
- -9, 15, 39, 43, 2, 14, -9, -70, -70, -70,
- -70, 47, 302, 10, 62, 343, 45, -70, 48, 5,
- -70, -70, -70, -70, -70, 302, -70, -70, -70, -70,
- -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
- -70, 220, -70, 24, -70, 54, 302, 343, -70, 44,
- -70, 88, -70, 50, -70, 343, 37, 3, 72, 77,
- 253, 94, -70, -70, 96, -70, 117, 359, 286, 121,
- 118, 55, 106, 120, -70, -70, 122, 55, 124, 154,
- -70, -70, -70, -70, 112, -70, -70, -70, -70, 119,
- -70, -70, -70, -70, -70, -70, -70, 113, 71, 359,
- -70, 114, -70, 55, -70, -70, 90, 55, -70, 127,
- -70, 7, 327, -70, -70, 100, 129, 103, 343, 130,
- 131, -70, 85, -70, 87, 187, -70, -70, -70, 132,
- 134, -70, 135, 136, -70, -70, -70, -70, -70
+ 4, 13, 14, 48, 51, 11, 4, -76, -76, -76,
+ -76, 82, 523, 41, 89, 590, 43, -76, 23, 7,
+ -76, -76, -76, -76, -76, 523, -76, -76, 60, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, 396, -76, 17, -76, 68, 108, 590,
+ -76, 53, -76, 180, -76, 57, -76, 570, -7, 6,
+ 73, 63, 432, 75, 121, -76, -76, 122, -76, 124,
+ 609, 128, 87, -76, 468, 216, 141, 144, 148, 146,
+ -76, -76, 150, 144, 154, 570, 252, -76, -76, -76,
+ -76, 140, -76, -76, -76, -76, -76, 22, 152, -76,
+ -76, 504, -76, -76, -76, -76, -76, -76, -76, 142,
+ 95, 609, -76, 143, -76, 144, -76, -76, 97, 144,
+ 288, -76, 156, 609, -76, 147, -76, 45, 551, -76,
+ -76, 99, 158, 102, -76, 570, 168, 69, 54, -76,
+ 160, 177, -76, 67, -76, 70, 570, 324, -76, -76,
+ 105, -76, -76, -76, -76, -76, 179, 181, -76, 183,
+ 184, 360, -76, 186, 187, -76, -76, -76, -76, -76,
+ -76, -76
};
// YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
static const unsigned char yydefact[] =
{
0, 0, 0, 0, 0, 0, 2, 3, 7, 6,
- 5, 0, 0, 0, 0, 0, 0, 23, 0, 0,
- 21, 9, 8, 1, 4, 0, 13, 20, 70, 61,
- 62, 63, 64, 65, 66, 60, 67, 68, 69, 72,
- 73, 0, 14, 0, 59, 0, 0, 0, 31, 0,
- 58, 0, 32, 0, 57, 0, 0, 0, 0, 0,
- 0, 20, 11, 15, 0, 18, 0, 0, 0, 0,
- 0, 0, 0, 0, 29, 33, 0, 0, 0, 0,
- 25, 26, 24, 22, 0, 12, 16, 19, 17, 0,
- 10, 30, 45, 48, 49, 50, 51, 53, 0, 0,
- 46, 0, 55, 0, 34, 44, 0, 0, 27, 0,
- 71, 0, 52, 56, 54, 0, 0, 0, 0, 0,
- 0, 47, 0, 41, 0, 0, 42, 43, 40, 0,
- 0, 35, 0, 0, 28, 36, 37, 38, 39
+ 5, 0, 0, 0, 0, 0, 0, 36, 0, 0,
+ 34, 9, 8, 1, 4, 0, 15, 33, 85, 76,
+ 77, 78, 79, 80, 81, 75, 82, 83, 84, 89,
+ 90, 91, 92, 0, 27, 0, 74, 0, 0, 0,
+ 46, 0, 73, 0, 47, 0, 72, 0, 0, 0,
+ 0, 0, 0, 0, 33, 13, 28, 0, 31, 0,
+ 0, 0, 0, 16, 0, 0, 0, 0, 0, 0,
+ 44, 48, 0, 0, 0, 0, 0, 38, 39, 37,
+ 35, 0, 14, 86, 29, 32, 30, 0, 0, 12,
+ 17, 0, 10, 45, 60, 63, 64, 65, 66, 68,
+ 0, 0, 61, 0, 70, 0, 49, 59, 0, 0,
+ 0, 40, 0, 0, 87, 0, 11, 0, 67, 71,
+ 69, 0, 0, 0, 42, 0, 0, 24, 0, 19,
+ 0, 0, 62, 0, 56, 0, 0, 0, 88, 21,
+ 0, 18, 20, 57, 58, 55, 0, 0, 50, 0,
+ 0, 0, 41, 25, 26, 51, 52, 53, 54, 43,
+ 22, 23
};
// YYPGOTO[NTERM-NUM].
static const short int yypgoto[] =
{
- -70, -70, -70, 150, -70, -70, -19, -36, -70, 99,
- -70, -46, -51, -69, -70, 49, -70, -64, -10, -70,
- -70
+ -76, -76, -76, 188, -76, -76, -55, -68, -76, 55,
+ -20, -33, -76, 126, -76, -48, -53, -75, -76, 71,
+ -76, -64, -9, -76, -76
};
// YYDEFGOTO[NTERM-NUM].
-static const signed char yydefgoto[] =
+static const short int yydefgoto[] =
{
- -1, 5, 6, 7, 8, 9, 41, 42, 19, 20,
- 10, 51, 52, 98, 99, 100, 101, 53, 54, 44,
- 45
+ -1, 5, 6, 7, 8, 9, 72, 73, 138, 139,
+ 43, 44, 19, 20, 10, 53, 54, 110, 111, 112,
+ 113, 55, 56, 46, 47
};
// YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
// number is the opposite. If YYTABLE_NINF, syntax error.
static const short int yytable[] =
{
- 75, 69, 43, 89, 81, 63, 60, 102, 106, 79,
- 58, 1, 2, 102, 23, 43, 11, 46, 75, 119,
- 21, 22, 12, 120, 63, 64, 3, 68, 75, 4,
- 65, 43, 63, 13, 115, 113, 43, 82, 117, 102,
- 14, 59, 66, 102, 17, 70, 15, 71, 102, 56,
- 43, 76, 55, 77, 25, 26, 93, 16, 43, -52,
- -52, 18, 72, 57, 94, 95, 96, 67, 78, 47,
- 48, 80, 125, 28, 75, 111, 112, 29, 30, 31,
- 32, 33, 34, 97, 36, 37, 38, 39, 40, 73,
- 18, 128, 50, 131, 116, 112, 74, 129, 84, 132,
- 86, 130, 87, 133, 122, 112, 28, 124, 112, 103,
- 29, 30, 31, 32, 33, 34, 49, 36, 37, 38,
- 39, 40, 73, 88, 92, 50, 104, 107, 105, 91,
- 109, -60, 114, 110, 118, 123, 126, 127, 135, 28,
- 136, 137, 138, 29, 30, 31, 32, 33, 34, 49,
- 36, 37, 38, 39, 40, 73, 24, 83, 50, 0,
- 0, 121, 108, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 28, 0, 0, 0, 29, 30, 31, 32,
- 33, 34, 49, 36, 37, 38, 39, 40, 73, 0,
- 0, 50, 0, 0, 0, 134, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 28, 0, 0, 0, 29,
- 30, 31, 32, 33, 34, 49, 36, 37, 38, 39,
- 40, 61, 0, 0, 50, 0, 0, 0, 62, 0,
+ 81, 75, 85, 45, 100, 62, 97, 88, 118, 86,
+ 66, 23, 60, 114, 11, 14, 45, 100, 67, 114,
+ 12, 15, 81, 68, 58, 1, 2, 123, 74, 66,
+ 87, 13, 16, 81, 45, 69, 124, 120, 59, 45,
+ 131, 66, 3, 89, 133, 4, 61, 129, 48, 17,
+ 57, 114, 101, 45, 76, 114, 77, 140, 82, 136,
+ 83, 141, 151, 45, 114, 45, 18, 81, 66, 21,
+ 22, 78, 137, 155, 149, 84, 158, 63, 100, 156,
+ 146, 70, 159, 157, 150, 91, 160, 147, 27, 25,
+ 26, 18, 45, 93, 81, 99, 49, 50, 161, 127,
+ 128, 132, 128, 143, 128, 28, 145, 128, 81, 27,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 163, 164, 28, 94, 95, 71,
+ 96, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 105, 98, 104, -67, -67,
+ 71, 115, 116, 106, 107, 108, 117, 119, 122, 125,
+ -75, 130, 28, 135, 144, 137, 153, 29, 30, 31,
+ 32, 33, 34, 109, 36, 37, 38, 39, 40, 41,
+ 42, 79, 148, 154, 52, 165, 90, 166, 80, 167,
+ 168, 170, 171, 152, 24, 0, 0, 0, 28, 142,
+ 0, 0, 0, 29, 30, 31, 32, 33, 34, 51,
+ 36, 37, 38, 39, 40, 41, 42, 79, 0, 0,
+ 52, 0, 0, 0, 103, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 28, 0, 0, 0, 0, 29,
+ 30, 31, 32, 33, 34, 51, 36, 37, 38, 39,
+ 40, 41, 42, 79, 0, 0, 52, 0, 0, 0,
+ 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 29, 30, 31, 32, 33,
+ 34, 51, 36, 37, 38, 39, 40, 41, 42, 79,
+ 0, 0, 52, 0, 0, 0, 134, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 28, 0, 0, 0,
+ 0, 29, 30, 31, 32, 33, 34, 51, 36, 37,
+ 38, 39, 40, 41, 42, 79, 0, 0, 52, 0,
+ 0, 0, 162, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0, 0, 29, 30, 31,
+ 32, 33, 34, 51, 36, 37, 38, 39, 40, 41,
+ 42, 79, 0, 0, 52, 0, 0, 0, 169, 0,
0, 0, 0, 0, 0, 0, 0, 0, 28, 0,
- 0, 0, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 61, 0, 0, 0, 0, 0,
- 0, 85, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 28, 0, 0, 0, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 61, 0, 0,
- 0, 0, 0, 0, 90, 0, 0, 0, 0, 0,
- 0, 0, 0, 27, 28, 0, 0, 0, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 28, 0, 0, 0, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 94, 95, 96, 0,
- 0, 0, 0, 0, 0, 28, 0, 0, 0, 29,
- 30, 31, 32, 33, 34, 97, 36, 37, 38, 39,
- 40, 28, 0, 0, 50, 29, 30, 31, 32, 33,
- 34, 49, 36, 37, 38, 39, 40, 28, 0, 0,
- 50, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 0, 0, 0, 50
+ 0, 0, 0, 29, 30, 31, 32, 33, 34, 51,
+ 36, 37, 38, 39, 40, 41, 42, 64, 0, 0,
+ 52, 0, 0, 0, 65, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 28, 0, 0, 0, 0, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 64, 0, 0, 0, 0, 0, 0,
+ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 64,
+ 0, 0, 0, 0, 0, 0, 102, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 28, 0, 0, 0,
+ 0, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 64, 0, 0, 0, 0,
+ 0, 0, 126, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 28, 0, 27, 0, 0, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 28, 0, 0, 0, 0, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 106, 107, 108, 0, 0, 0, 0, 0, 0, 28,
+ 0, 0, 0, 0, 29, 30, 31, 32, 33, 34,
+ 109, 36, 37, 38, 39, 40, 41, 42, 28, 0,
+ 0, 52, 0, 29, 30, 31, 32, 33, 34, 51,
+ 36, 37, 38, 39, 40, 41, 42, 0, 28, 0,
+ 52, 0, 71, 29, 30, 31, 32, 33, 34, 51,
+ 36, 37, 38, 39, 40, 41, 42, 28, 0, 0,
+ 52, 0, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 0, 0, 0, 52
};
-static const signed char yycheck[] =
-{
- 51, 47, 12, 67, 1, 41, 25, 71, 77, 55,
- 5, 20, 21, 77, 0, 25, 1, 7, 69, 12,
- 18, 19, 7, 16, 60, 1, 35, 46, 79, 38,
- 6, 41, 68, 18, 103, 99, 46, 34, 107, 103,
- 1, 36, 18, 107, 1, 1, 7, 3, 112, 1,
- 60, 1, 7, 3, 7, 8, 1, 18, 68, 4,
- 5, 18, 18, 15, 9, 10, 11, 13, 18, 7,
- 8, 34, 118, 18, 125, 4, 5, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 1,
- 18, 6, 37, 6, 4, 5, 8, 12, 21, 12,
- 6, 16, 6, 16, 4, 5, 18, 4, 5, 3,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 1, 6, 6, 37, 6, 3, 6, 8,
- 18, 18, 18, 14, 7, 6, 6, 6, 6, 18,
- 6, 6, 6, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 1, 6, 58, 37, -1,
- -1, 112, 8, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 18, -1, -1, -1, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 1, -1,
- -1, 37, -1, -1, -1, 8, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 18, -1, -1, -1, 22,
+static const short int yycheck[] =
+{
+ 53, 49, 57, 12, 72, 25, 70, 1, 83, 57,
+ 43, 0, 5, 77, 1, 1, 25, 85, 1, 83,
+ 7, 7, 75, 6, 1, 21, 22, 5, 48, 62,
+ 37, 18, 18, 86, 43, 18, 14, 85, 15, 48,
+ 115, 74, 38, 37, 119, 41, 39, 111, 7, 1,
+ 7, 115, 72, 62, 1, 119, 3, 12, 1, 123,
+ 3, 16, 8, 72, 128, 74, 18, 120, 101, 18,
+ 19, 18, 18, 6, 5, 18, 6, 17, 146, 12,
+ 135, 13, 12, 16, 15, 22, 16, 135, 1, 7,
+ 8, 18, 101, 18, 147, 8, 7, 8, 146, 4,
+ 5, 4, 5, 4, 5, 18, 4, 5, 161, 1,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 1, -1, -1, 37, -1, -1, -1, 8, -1,
+ 33, 34, 35, 36, 19, 20, 18, 6, 6, 42,
+ 6, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 1, 18, 6, 4, 5,
+ 42, 3, 6, 9, 10, 11, 6, 3, 18, 7,
+ 18, 18, 18, 7, 6, 18, 6, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 1, 14, 6, 40, 6, 60, 6, 8, 6,
+ 6, 5, 5, 138, 6, -1, -1, -1, 18, 128,
+ -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 1, -1, -1,
+ 40, -1, -1, -1, 8, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 18, -1, -1, -1, -1, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 1, -1, -1, 40, -1, -1, -1,
+ 8, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 18, -1, -1, -1, -1, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 1,
+ -1, -1, 40, -1, -1, -1, 8, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 18, -1, -1, -1,
+ -1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 1, -1, -1, 40, -1,
+ -1, -1, 8, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 18, -1, -1, -1, -1, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 1, -1, -1, 40, -1, -1, -1, 8, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 18, -1,
- -1, -1, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 1, -1, -1, -1, -1, -1,
- -1, 8, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 18, -1, -1, -1, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 1, -1, -1,
- -1, -1, -1, -1, 8, -1, -1, -1, -1, -1,
- -1, -1, -1, 1, 18, -1, -1, -1, 22, 23,
+ -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 1, -1, -1,
+ 40, -1, -1, -1, 8, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 18, -1, -1, -1, -1, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 18, -1, -1, -1, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 9, 10, 11, -1,
- -1, -1, -1, -1, -1, 18, -1, -1, -1, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 18, -1, -1, 37, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 18, -1, -1,
- 37, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 33, -1, -1, -1, 37
+ 34, 35, 36, 1, -1, -1, -1, -1, -1, -1,
+ 8, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 18, -1, -1, -1, -1, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 1,
+ -1, -1, -1, -1, -1, -1, 8, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 18, -1, -1, -1,
+ -1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 1, -1, -1, -1, -1,
+ -1, -1, 8, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 18, -1, 1, -1, -1, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 18, -1, -1, -1, -1, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 9, 10, 11, -1, -1, -1, -1, -1, -1, 18,
+ -1, -1, -1, -1, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 18, -1,
+ -1, 40, -1, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, -1, 18, -1,
+ 40, -1, 42, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 18, -1, -1,
+ 40, -1, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, -1, -1, -1, 40
};
// YYSTOS[STATE-NUM] -- The (internal number of the) accessing
// symbol of state STATE-NUM.
static const unsigned char yystos[] =
{
- 0, 20, 21, 35, 38, 40, 41, 42, 43, 44,
- 49, 1, 7, 18, 1, 7, 18, 1, 18, 47,
- 48, 18, 19, 0, 42, 7, 8, 1, 18, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 45, 46, 57, 58, 59, 7, 7, 8, 28,
- 37, 50, 51, 56, 57, 7, 1, 15, 5, 36,
- 45, 1, 8, 46, 1, 6, 18, 13, 45, 50,
- 1, 3, 18, 1, 8, 51, 1, 3, 18, 50,
- 34, 1, 34, 48, 21, 8, 6, 6, 6, 56,
- 8, 8, 6, 1, 9, 10, 11, 28, 52, 53,
- 54, 55, 56, 3, 6, 6, 52, 3, 8, 18,
- 14, 4, 5, 56, 18, 52, 4, 52, 7, 12,
- 16, 54, 4, 6, 4, 50, 6, 6, 6, 12,
- 16, 6, 12, 16, 8, 6, 6, 6, 6
+ 0, 21, 22, 38, 41, 44, 45, 46, 47, 48,
+ 57, 1, 7, 18, 1, 7, 18, 1, 18, 55,
+ 56, 18, 19, 0, 46, 7, 8, 1, 18, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 53, 54, 65, 66, 67, 7, 7,
+ 8, 29, 40, 58, 59, 64, 65, 7, 1, 15,
+ 5, 39, 53, 17, 1, 8, 54, 1, 6, 18,
+ 13, 42, 49, 50, 53, 58, 1, 3, 18, 1,
+ 8, 59, 1, 3, 18, 49, 58, 37, 1, 37,
+ 56, 22, 8, 18, 6, 6, 6, 64, 18, 8,
+ 50, 53, 8, 8, 6, 1, 9, 10, 11, 29,
+ 60, 61, 62, 63, 64, 3, 6, 6, 60, 3,
+ 58, 8, 18, 5, 14, 7, 8, 4, 5, 64,
+ 18, 60, 4, 60, 8, 7, 64, 18, 51, 52,
+ 12, 16, 62, 4, 6, 4, 49, 58, 14, 5,
+ 15, 8, 52, 6, 6, 6, 12, 16, 6, 12,
+ 16, 58, 8, 19, 20, 6, 6, 6, 6, 8,
+ 5, 5
};
// YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
static const unsigned char yyr1[] =
{
- 0, 39, 40, 41, 41, 42, 42, 42, 43, 43,
- 44, 44, 44, 44, 45, 45, 45, 46, 46, 46,
- 46, 47, 47, 47, 48, 48, 48, 49, 49, 49,
- 49, 49, 50, 50, 50, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 52, 52, 52, 53,
- 53, 53, 54, 54, 54, 55, 55, 56, 56, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 58, 59, 59
+ 0, 43, 44, 45, 45, 46, 46, 46, 47, 47,
+ 48, 48, 48, 48, 48, 48, 49, 49, 50, 51,
+ 51, 52, 52, 52, 52, 52, 52, 53, 53, 53,
+ 54, 54, 54, 54, 55, 55, 55, 56, 56, 56,
+ 57, 57, 57, 57, 57, 57, 57, 58, 58, 58,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 60, 60, 60, 61, 61, 61, 62, 62, 62,
+ 63, 63, 64, 64, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 66, 66, 67,
+ 67, 67, 67
};
// YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
static const unsigned char yyr2[] =
{
0, 2, 1, 1, 2, 1, 1, 1, 2, 2,
- 5, 4, 5, 3, 1, 2, 3, 3, 2, 3,
- 1, 1, 3, 1, 3, 3, 3, 5, 8, 4,
- 5, 3, 1, 2, 3, 6, 7, 7, 7, 7,
- 6, 5, 6, 6, 3, 3, 1, 3, 1, 1,
- 1, 1, 0, 1, 2, 1, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 1, 1
+ 5, 6, 5, 4, 5, 3, 1, 2, 5, 1,
+ 2, 2, 4, 4, 1, 3, 3, 1, 2, 3,
+ 3, 2, 3, 1, 1, 3, 1, 3, 3, 3,
+ 5, 8, 6, 9, 4, 5, 3, 1, 2, 3,
+ 6, 7, 7, 7, 7, 6, 5, 6, 6, 3,
+ 3, 1, 3, 1, 1, 1, 1, 0, 1, 2,
+ 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 3, 4, 6, 1,
+ 1, 1, 1
};
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0
};
/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0
};
/* YYIMMEDIATE[RULE-NUM] -- True iff rule #RULE-NUM is not to be deferred, as
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0
};
/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
switch (yyn)
{
case 2:
-#line 100 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 116 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->SetDoc((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.doc));
}
-#line 1102 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1206 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 3:
-#line 105 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 121 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).doc) = new tidl::Document();
+ document = ((*yyvalp).doc);
if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk) != NULL)
((*yyvalp).doc)->AddBlock((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk));
}
-#line 1112 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1217 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 4:
-#line 110 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 127 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).doc) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.doc);
}
}
}
-#line 1129 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1234 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 5:
-#line 124 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 141 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.interf);
+ currentInterfaceEnums = nullptr;
}
-#line 1137 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1243 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 6:
-#line 127 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 145 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.structure);
+ currentInterfaceEnums = nullptr;
}
-#line 1145 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1252 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 7:
-#line 130 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 149 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk);
}
-#line 1153 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1260 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 8:
-#line 135 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 154 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
int ver = atoi((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString().c_str());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1171 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1278 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 9:
-#line 148 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 167 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in protocol version : " + (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(),
(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1183 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1290 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 10:
-#line 157 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 176 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
- ((*yyvalp).structure) = new tidl::Structure((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
- (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ ((*yyvalp).structure) = new tidl::Structure((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms), new tidl::Enums(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1194 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1301 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 11:
-#line 163 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+#line 182 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).structure) = new tidl::Structure((((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.enumerations), (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ }
+#line 1312 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 12:
+#line 188 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).structure) = new tidl::Structure((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), new tidl::Elements(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.enumerations), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ }
+#line 1323 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 13:
+#line 194 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).structure) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1204 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1333 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 12:
-#line 168 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 14:
+#line 199 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"Please check it before an open brace.\"",
(((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).structure) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
-#line 1215 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1344 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 13:
-#line 174 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 15:
+#line 205 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in structure declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).structure) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
}
-#line 1225 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1354 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 14:
-#line 181 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 16:
+#line 212 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enumerations) = new (std::nothrow) tidl::Enums();
+ currentInterfaceEnums = ((*yyvalp).enumerations);
+ if (((*yyvalp).enumerations) != nullptr) {
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration) != nullptr) {
+ ((*yyvalp).enumerations)->Add(std::unique_ptr<tidl::Enum>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration)));
+ }
+ }
+ }
+#line 1368 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 17:
+#line 221 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enumerations) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.enumerations);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration) != nullptr) {
+ if (((*yyvalp).enumerations)->Exist(*(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration))) {
+ ps->ReportError("syntax error. \"Already Exists\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration);
+ } else {
+ ((*yyvalp).enumerations)->Add(std::unique_ptr<tidl::Enum>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enumeration)));
+ }
+ }
+ }
+#line 1384 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 18:
+#line 234 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enumeration) = new tidl::Enum((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.enum_fields), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ }
+#line 1394 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 19:
+#line 241 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_fields) = new (std::nothrow) tidl::Fields();
+ if (((*yyvalp).enum_fields) != nullptr) {
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field) != nullptr) {
+ ((*yyvalp).enum_fields)->Add(std::unique_ptr<tidl::Field>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field)));
+ }
+ }
+ }
+#line 1407 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 20:
+#line 249 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_fields) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.enum_fields);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field) != nullptr) {
+ if (((*yyvalp).enum_fields)->Exist(*(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field))) {
+ ps->ReportError("syntax error. \"Already Exists\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field);
+ } else {
+ ((*yyvalp).enum_fields)->Add(std::unique_ptr<tidl::Field>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.enum_field)));
+ }
+ }
+ }
+#line 1423 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 21:
+#line 262 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_field) = new (std::nothrow) tidl::Field((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->ToString(), "", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ }
+#line 1432 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 22:
+#line 266 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_field) = new (std::nothrow) tidl::Field((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ }
+#line 1441 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 23:
+#line 270 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_field) = new (std::nothrow) tidl::Field((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ }
+#line 1450 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 24:
+#line 274 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_field) = new (std::nothrow) tidl::Field((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), "", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ }
+#line 1459 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 25:
+#line 278 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_field) = new (std::nothrow) tidl::Field((((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
+ }
+#line 1468 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 26:
+#line 282 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).enum_field) = new (std::nothrow) tidl::Field((((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
+ }
+#line 1477 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 27:
+#line 288 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).elms) = new (std::nothrow) tidl::Elements();
if (((*yyvalp).elms) != nullptr) {
}
}
}
-#line 1238 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1490 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 15:
-#line 189 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 28:
+#line 296 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).elms) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms);
if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm) != nullptr) {
}
}
}
-#line 1254 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1506 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 16:
-#line 200 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 29:
+#line 307 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in elements declarations.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
((*yyvalp).elms) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.elms);
}
-#line 1263 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1515 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 17:
-#line 206 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 30:
+#line 313 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).elm) = new tidl::Element((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.b_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.b_type)->GetComments(),
(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
}
-#line 1273 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1525 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 18:
-#line 211 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 31:
+#line 318 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).elm) = NULL;
}
-#line 1282 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1534 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 19:
-#line 215 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 32:
+#line 322 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in element declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).elm) = NULL;
}
-#line 1291 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1543 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 20:
-#line 219 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 33:
+#line 326 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in element declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).elm) = NULL;
}
-#line 1300 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1552 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 21:
-#line 225 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 34:
+#line 332 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).attrs) = new (std::nothrow) tidl::Attributes();
if (((*yyvalp).attrs) != nullptr) {
}
}
}
-#line 1313 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1565 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 22:
-#line 233 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 35:
+#line 340 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).attrs) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.attrs);
if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr) != nullptr) {
}
}
}
-#line 1329 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1581 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 23:
-#line 244 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 36:
+#line 351 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in attributes", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).attrs) = new tidl::Attributes();
}
-#line 1338 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1590 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 24:
-#line 250 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 37:
+#line 357 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).attr) = new tidl::Attribute((((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1348 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1600 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 25:
-#line 255 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 38:
+#line 362 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in attribute declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).attr) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1359 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1611 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 26:
-#line 261 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 39:
+#line 368 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in attribute declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).attr) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
}
-#line 1369 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1621 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 27:
-#line 268 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 40:
+#line 375 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
- ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
+ ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), new tidl::Enums(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
new tidl::Attributes(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1380 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1632 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 28:
-#line 274 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 41:
+#line 381 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
- ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.attrs),
- (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yyloc).begin.line);
+ ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), new tidl::Enums(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.attrs), (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1393 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1645 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 29:
-#line 282 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 42:
+#line 389 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.enumerations), (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->GetComments(),
+ new tidl::Attributes(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ }
+#line 1656 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 43:
+#line 395 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.enumerations), (((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.attrs),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-8)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ }
+#line 1669 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 44:
+#line 403 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).interf) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1403 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1679 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 30:
-#line 287 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 45:
+#line 408 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in interface declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).interf) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
-#line 1413 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1689 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 31:
-#line 292 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 46:
+#line 413 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in interface declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).interf) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
}
-#line 1423 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1699 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 32:
-#line 299 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 47:
+#line 420 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).decls) = new (std::nothrow) tidl::Declarations();
+ currentDeclarations = ((*yyvalp).decls);
if (((*yyvalp).decls) != nullptr) {
if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl) != nullptr) {
((*yyvalp).decls)->Add(std::unique_ptr<tidl::Declaration>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)));
}
}
}
-#line 1436 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1713 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 33:
-#line 307 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 48:
+#line 429 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).decls) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls);
if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl) != nullptr) {
}
}
}
-#line 1452 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1729 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 34:
-#line 318 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 49:
+#line 440 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in methods declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).decls) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.decls);
}
-#line 1461 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1738 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 35:
-#line 324 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 50:
+#line 446 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
if (ps->IsGroupEnabled()) {
ps->ReportError("Group does not support 'sync' method type", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
}
-#line 1479 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1756 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 36:
-#line 337 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 51:
+#line 459 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).decl) = new tidl::Declaration((((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString(),
std::unique_ptr<tidl::BaseType>(new tidl::BaseType("void", (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments())),
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
-#line 1492 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1769 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 37:
-#line 345 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 52:
+#line 467 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
if (ps->IsGroupEnabled()) {
ps->ReportError("Group does not support 'delegate' method type", (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
}
-#line 1512 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1789 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 38:
-#line 360 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 53:
+#line 482 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
-#line 1522 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1799 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 39:
-#line 365 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 54:
+#line 487 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
-#line 1532 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1809 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 40:
-#line 370 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 55:
+#line 492 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No async\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
-#line 1542 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1819 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 41:
-#line 375 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 56:
+#line 497 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1551 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1828 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 42:
-#line 379 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 57:
+#line 501 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1560 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1837 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 43:
-#line 383 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 58:
+#line 505 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1569 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1846 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 44:
-#line 387 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 59:
+#line 509 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1578 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1855 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 45:
-#line 391 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 60:
+#line 513 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1587 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1864 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 46:
-#line 397 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 61:
+#line 519 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).params) = new tidl::Parameters();
if (((*yyvalp).params) != nullptr) {
}
}
}
-#line 1600 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1877 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 47:
-#line 405 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 62:
+#line 527 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).params) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.params);
if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param) != nullptr) {
}
}
}
-#line 1616 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1893 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 48:
-#line 416 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 63:
+#line 538 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
ps->ReportError("syntax error in parameter list", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).params) = new tidl::Parameters();
}
-#line 1625 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1902 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 49:
-#line 422 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 64:
+#line 544 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).direction) = new tidl::Token("in", "");
}
-#line 1633 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1910 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 50:
-#line 425 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 65:
+#line 547 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).direction) = new tidl::Token("out", "");
}
-#line 1641 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1918 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 51:
-#line 428 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 66:
+#line 550 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).direction) = new tidl::Token("ref", "");
}
-#line 1649 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1926 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 52:
-#line 433 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 67:
+#line 555 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).param) = nullptr;
}
-#line 1657 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1934 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 53:
-#line 436 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 68:
+#line 558 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).param) = nullptr;
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1666 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1943 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 54:
-#line 440 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 69:
+#line 562 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).param) = new tidl::Parameter((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.p_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1675 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1952 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 55:
-#line 446 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 70:
+#line 568 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).p_type) = new tidl::ParameterType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type));
}
-#line 1683 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1960 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 56:
-#line 449 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 71:
+#line 571 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).p_type) = new tidl::ParameterType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction)->ToString());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction);
}
-#line 1692 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1969 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 57:
-#line 455 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 72:
+#line 577 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type);
}
-#line 1700 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1977 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 58:
-#line 458 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 73:
+#line 580 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
if (ps->IsGroupEnabled()) {
ps->ReportError("Group does not support 'file' type", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
}
-#line 1720 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 1997 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 59:
-#line 475 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 74:
+#line 597 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type);
}
-#line 1728 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2005 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 60:
-#line 478 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 75:
+#line 600 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("void", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1737 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2014 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 61:
-#line 482 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 76:
+#line 604 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("char", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1746 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2023 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 62:
-#line 486 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 77:
+#line 608 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("short", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1755 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2032 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 63:
-#line 490 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 78:
+#line 612 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("int", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1764 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2041 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 64:
-#line 494 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 79:
+#line 616 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("long", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1773 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2050 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 65:
-#line 498 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 80:
+#line 620 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("float", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1782 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2059 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 66:
-#line 502 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 81:
+#line 624 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("double", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1791 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2068 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 67:
-#line 506 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 82:
+#line 628 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
if (ps->IsCionEnabled()) {
ps->ReportError("Cion does not support 'bundle' type", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
}
-#line 1806 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2083 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 68:
-#line 516 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 83:
+#line 638 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("string", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1815 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2092 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 69:
-#line 520 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 84:
+#line 642 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).b_type) = new tidl::BaseType("bool", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1824 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2101 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 70:
-#line 524 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 85:
+#line 646 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
- ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments(), true);
+ bool found = false;
+ tidl::BaseType::UserType type;
+ if (currentInterfaceEnums) {
+ for (auto& e : *currentInterfaceEnums) {
+ if (e->GetID() == (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString()) {
+ type = tidl::BaseType::UserType::ENUM;
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found && document) {
+ for (auto& b : document->GetBlocks()) {
+ if (b->GetType() == tidl::Block::TYPE_STRUCTURE
+ && b->GetID() == (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString()) {
+ type = tidl::BaseType::UserType::STRUCTURE;
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if(!found && currentDeclarations) {
+ for (auto& d : *currentDeclarations) {
+ if (d->GetMethodType() == tidl::Declaration::MethodType::DELEGATE) {
+ if (d->GetID() == (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString()) {
+ type = tidl::BaseType::UserType::DELEGATE;
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (found) {
+ ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments(), type);
+ } else {
+ ps->ReportError("Unknown type : " + (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ ((*yyvalp).b_type) = NULL;
+ }
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1833 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2150 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 71:
-#line 530 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 86:
+#line 690 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ bool found = false;
+ if (document) {
+ for (auto& b : document->GetBlocks()) {
+ if (b->GetType() == tidl::Block::TYPE_STRUCTURE
+ && b->GetID() == (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString()) {
+ for (auto& e : b->GetEnums()) {
+ if (e->GetID() == (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString()) {
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (found) {
+ ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString() + "." + (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString() , (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->GetComments(), tidl::BaseType::UserType::ENUM);
+ } else {
+ ps->ReportError("Unknown type : " + (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString() + "." + (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
+ ((*yyvalp).b_type) = NULL;
+ }
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
+ }
+#line 2180 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 87:
+#line 717 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
- ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->GetComments());
- ((*yyvalp).b_type)->SetMetaType((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.b_type));
- delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString() == "map") {
+ ps->ReportError("syntax error. The value must be existed.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ } else {
+ ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->GetComments());
+ ((*yyvalp).b_type)->SetMetaType((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.b_type));
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ }
}
-#line 1843 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2195 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 72:
-#line 537 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 88:
+#line 727 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString() != "map") {
+ ps->ReportError("syntax error. The container type must be \"map\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ } else {
+ ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->GetComments());
+ ((*yyvalp).b_type)->SetKeyType((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.b_type));
+ ((*yyvalp).b_type)->SetValueType((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.b_type));
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ }
+ }
+#line 2211 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 89:
+#line 740 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).token) = new tidl::Token("list", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1852 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2220 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 73:
-#line 541 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ case 90:
+#line 744 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
((*yyvalp).token) = new tidl::Token("array", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1861 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2229 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 91:
+#line 748 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ if (ps->GetVersion() < 2) {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ ps->ReportError("try to use protocol version 2.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ }
+ ((*yyvalp).token) = new tidl::Token("map", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ }
+#line 2242 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 92:
+#line 756 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ if (ps->GetVersion() < 2) {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ ps->ReportError("try to use protocol version 2.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ }
+ ((*yyvalp).token) = new tidl::Token("set", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ }
+#line 2255 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
-#line 1865 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+#line 2259 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
default: break;
}
}
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-70)))
+ (!!((Yystate) == (-76)))
/** True iff LR state YYSTATE has only a default reduction (regardless
* of token). */
/* User initialization code. */
yylloc.initialize ();
-#line 3340 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2270
+#line 3734 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2270
if (! yyinitGLRStack (yystackp, YYINITDEPTH))
goto yyexhaustedlab;
-#line 547 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:2584
+#line 766 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:2584
#include <ctype.h>
}
-#line 3653 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
+#line 4047 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
/*------------------.
| Report an error. |
namespace yy {
-#line 3670 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
+#line 4064 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
/// Build a parser object.
parser::parser (tidl::Parser* ps_yyarg)
:
#endif
} // yy
-#line 3751 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
+#line 4145 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
// C++ GLR parser skeleton written by Akim Demaille.
-#ifndef YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
-# define YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
+#ifndef YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
+# define YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
#include <stdexcept>
namespace yy {
-#line 52 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
+#line 52 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
/// A Bison parser.
/// Symbol semantic values.
union semantic_type
{
- #line 37 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.cc:329
+ #line 41 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc.yy" // glr.cc:329
tidl::Document* doc;
tidl::Interface* interf;
tidl::Block* blk;
tidl::Attribute* attr;
tidl::Attributes* attrs;
+ tidl::Enum* enumeration;
+ tidl::Enums* enumerations;
+ tidl::Field* enum_field;
+ tidl::Fields* enum_fields;
-#line 83 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
+#line 87 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
};
#else
typedef YYSTYPE semantic_type;
T_META_CLOSE = 269,
T_EQUAL = 270,
T_DELEGATE = 271,
- T_UNKNOWN = 272,
+ T_DOT = 272,
T_ID = 273,
T_NUMBER = 274,
- T_STRUCTURE = 275,
- T_INTERFACE = 276,
- T_CHAR = 277,
- T_SHORT = 278,
- T_INT = 279,
- T_LONG = 280,
- T_FLOAT = 281,
- T_DOUBLE = 282,
- T_VOID = 283,
- T_BUNDLE = 284,
- T_STRING = 285,
- T_BOOL = 286,
- T_LIST = 287,
- T_ARRAY = 288,
- T_VALUE = 289,
- T_SB_OPEN = 290,
- T_SB_CLOSE = 291,
- T_FILE = 292,
- T_PROTOCOL = 293
+ T_HEX_NUMBER = 275,
+ T_STRUCTURE = 276,
+ T_INTERFACE = 277,
+ T_CHAR = 278,
+ T_SHORT = 279,
+ T_INT = 280,
+ T_LONG = 281,
+ T_FLOAT = 282,
+ T_DOUBLE = 283,
+ T_VOID = 284,
+ T_BUNDLE = 285,
+ T_STRING = 286,
+ T_BOOL = 287,
+ T_LIST = 288,
+ T_ARRAY = 289,
+ T_MAP = 290,
+ T_SET = 291,
+ T_VALUE = 292,
+ T_SB_OPEN = 293,
+ T_SB_CLOSE = 294,
+ T_FILE = 295,
+ T_PROTOCOL = 296,
+ T_ENUM = 297
};
};
} // yy
-#line 306 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
+#line 314 "/opt/data/tizen/public/platform/core/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
-#endif // !YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
+#endif // !YY_YY_OPT_DATA_TIZEN_PUBLIC_PLATFORM_CORE_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
: name_(std::move(name)), comments_(std::move(comments)) {
}
-BaseType::BaseType(std::string name, std::string comments,
- bool user_defined)
+BaseType::BaseType(std::string name, std::string comments, bool user_defined)
: Token(std::move(name), std::move(comments)), user_defined_(user_defined) {
+ if (user_defined)
+ user_type_ = UserType::STRUCTURE;
+ else
+ user_type_ = UserType::DEFAULT;
}
+BaseType::BaseType(std::string name, std::string comments, UserType user_type)
+ : Token(std::move(name), std::move(comments)), user_defined_(true),
+ user_type_(user_type) {}
+
BaseType::BaseType(const BaseType& type)
: Token(type.ToString(), type.GetComments()),
- user_defined_(type.IsUserDefinedType()) {
+ user_defined_(type.IsUserDefinedType()), user_type_(type.GetUserDefinedType()) {
if (type.GetMetaType() != nullptr)
SetMetaType(new BaseType(*type.GetMetaType()));
}
ParameterType::ParameterType(BaseType* type)
- : type_(type), dir_(Direction::IN) {
+ : type_(type),
+ dir_(Direction::IN) {
}
ParameterType::ParameterType(BaseType* type, const std::string& dir)
class BaseType : public Token {
public:
- explicit BaseType(std::string name, std::string comments,
+ enum class UserType {
+ DEFAULT,
+ STRUCTURE,
+ DELEGATE,
+ ENUM,
+ };
+ BaseType(std::string name, std::string comments,
bool user_defined = false);
+ BaseType(std::string name, std::string comments,
+ UserType user_type);
BaseType(const BaseType& type);
void SetMetaType(BaseType* type);
std::string GetFullName(bool use_underbar = false) const;
bool IsUserDefinedType() const;
+ BaseType::UserType GetUserDefinedType() const {
+ return user_type_;
+ }
+
private:
std::unique_ptr<BaseType> meta_type_;
std::unique_ptr<BaseType> key_type_;
std::unique_ptr<BaseType> value_type_;
bool user_defined_;
+ UserType user_type_;
};
class ParameterType {
std::unique_ptr<Element>(
new Element(value_type->GetFullName(true), value_type, "", __LINE__)));
- auto* st = new Structure(std::move(type_name), elms, "", __LINE__);
+ auto* st = new Structure(std::move(type_name), elms, new tidl::Enums(),
+ "", __LINE__);
if (st == nullptr) {
delete elms;
return nullptr;
new Element(elm_type->GetFullName(true), elm_type, "", __LINE__)));
auto* st = new Structure(
- std::move(type_name), elms, "", __LINE__);
+ std::move(type_name), elms, new tidl::Enums(), "", __LINE__);
if (st == nullptr) {
delete elms;
return nullptr;
}
std::string CGeneratorBase::GetFullNameFromType(const BaseType& type) {
- return type.GetFullName(true);
+ std::string str = type.GetFullName(true);
+ return GetEnumTypeString(str);
}
std::string CGeneratorBase::GetFullNameFromType(const BaseType& type,
str += GetFullNameFromType(*type.GetValueType(), iface);
}
- return str;
+ return GetEnumTypeString(str);
}
std::string CGeneratorBase::GetDataTypeString(const BaseType& type,
- bool is_pointer) {
- if (type.IsUserDefinedType())
+ bool is_pointer, const std::string& id) {
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ auto n = type.ToString().find('.');
+ if (id.empty()&& n == std::string::npos) {
+ if (is_pointer)
+ return GetEnumTypeString(ParameterType::Direction::OUT, type,
+ GetEnumBockString(type.ToString()));
+ else
+ return GetEnumTypeString(ParameterType::Direction::IN, type,
+ GetEnumBockString(type.ToString()));
+ }
+
+ if (is_pointer)
+ return GetEnumTypeString(ParameterType::Direction::OUT, type, id);
+ else
+ return GetEnumTypeString(ParameterType::Direction::IN, type, id);
+ }
+
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE)
return GetHandlePrefix() + "_" + type.ToString() + "_h ";
if (type.GetMetaType() != nullptr || type.GetKeyType() != nullptr)
return type_map_[type.ToString()];
}
-std::string CGeneratorBase::GetReturnTypeString(const BaseType& type) {
- if (type.IsUserDefinedType())
+std::string CGeneratorBase::GetReturnTypeString(const BaseType& type,
+ const std::string& id) {
+
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ return GetEnumTypeString(ParameterType::Direction::IN, type, id);
+ else if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE)
return GetHandlePrefix() + "_" + type.ToString() + "_h ";
if (type.GetMetaType() != nullptr || type.GetKeyType() != nullptr)
- return GetHandlePrefix() + "_" + GetFullNameFromType(type) + "_h ";
+ return GetEnumTypeString(GetHandlePrefix() + "_" +
+ GetFullNameFromType(type) + "_h ");
return type_map_[type.ToString()];
}
return false;
}
+std::string CGeneratorBase::GetEnumTypeString(const std::string& id) {
+ std::string block_id;
+ std::string type_id;
+
+ auto n = id.find('.');
+ if (n == std::string::npos) {
+ return id;
+ } else {
+ block_id = id.substr(0, n);
+ type_id = id.substr(n + 1, id.size() - (n + 1));
+ return block_id + "_" + type_id;
+ }
+}
+
+std::string CGeneratorBase::GetEnumTypeString(
+ ParameterType::Direction direction, const BaseType& type,
+ const std::string& id) {
+ std::string block_id;
+ std::string type_id;
+
+ auto n = type.ToString().find('.');
+ if (n == std::string::npos) {
+ block_id = id;
+ type_id = GetFullNameFromType(type);
+ } else {
+ block_id = type.ToString().substr(0, n);
+ type_id = type.ToString().substr(n + 1, type.ToString().size() - (n + 1));
+ }
+
+ if (direction == ParameterType::Direction::IN)
+ return GetHandlePrefix() + "_" + block_id + "_" + type_id + " ";
+ else
+ return GetHandlePrefix() + "_" + block_id + "_" + type_id + " *";
+}
+
std::string CGeneratorBase::GetParamTypeString(
- ParameterType::Direction direction, const BaseType& type) {
+ ParameterType::Direction direction, const BaseType& type,
+ const std::string& id) {
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ auto n = type.ToString().find('.');
+ if (id.empty()&& n == std::string::npos)
+ return GetEnumTypeString(direction, type,
+ GetEnumBockString(type.ToString()));
+ else
+ return GetEnumTypeString(direction, type, id);
+ }
+
if (type.IsUserDefinedType() ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
+ std::string ret;
if (direction == ParameterType::Direction::IN)
- return GetHandlePrefix() + "_" + GetFullNameFromType(type) + "_h ";
+ ret = GetHandlePrefix() + "_" + GetFullNameFromType(type) + "_h ";
else
- return GetHandlePrefix() + "_" + GetFullNameFromType(type) + "_h *";
+ ret= GetHandlePrefix() + "_" + GetFullNameFromType(type) + "_h *";
+
+ return GetEnumTypeString(ret);
}
if (type.ToString() == "string" || type.ToString() == "file") {
std::string CGeneratorBase::GetParamTypeString(
ParameterType::Direction direction, const BaseType& type,
const Interface& iface) {
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ return GetEnumTypeString(direction, type, iface.GetID());
+
if (type.IsUserDefinedType() ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
return type_map_[type.ToString()] + "*";
}
+std::string CGeneratorBase::GetEnumBockString(const std::string& id) {
+ for (auto& b : GetDocument().GetBlocks()) {
+ for (auto& e : b->GetEnums()) {
+ if (e->GetID() == id) {
+ return b->GetID();
+ }
+ }
+ }
+ return {};
+}
+
std::string CGeneratorBase::GetArgTypeString(const BaseType& type,
const Interface& iface) {
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
- type.GetKeyType() != nullptr)
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ return GetEnumTypeString(ParameterType::Direction::IN, type, iface.GetID());
+
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
+ type.GetMetaType() != nullptr || type.GetKeyType() != nullptr)
return GetHandlePrefix() + "_" + GetFullNameFromType(type, iface) + "_h ";
return type_map_[type.ToString()];
}
std::string CGeneratorBase::GetErrorValue(const BaseType& type) {
- if (type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr ||
type.ToString() == "bundle" ||
std::string GetFullNameFromType(const BaseType& type);
std::string GetFullNameFromType(const BaseType& type, const Interface& iface);
- std::string GetDataTypeString(const BaseType& type, bool is_pointer = true);
- std::string GetReturnTypeString(const BaseType& type);
+ std::string GetDataTypeString(const BaseType& type, bool is_pointer = true,
+ const std::string& id = std::string());
+ std::string GetReturnTypeString(const BaseType& type,
+ const std::string& id = std::string());
std::string GetParamTypeString(ParameterType::Direction direction,
- const BaseType& type);
+ const BaseType& type, const std::string& id = std::string());
std::string GetParamTypeString(ParameterType::Direction direction,
const BaseType& type, const Interface& iface);
std::string GetArgTypeString(const BaseType& type, const Interface& iface);
std::string GetErrorValue(const BaseType& type);
+ std::string GetEnumTypeString(const std::string& id);
+ std::string GetEnumBockString(const std::string& id);
void AddStructureFromType(const BaseType& type);
void AddStructureFromType(const BaseType& type, const Interface& iface);
std::string Tab(int cnt);
std::string Trim(const std::string& str);
std::string RemoveSpaces(const std::string& str);
+ std::string GetEnumTypeString(ParameterType::Direction direction,
+ const BaseType& type, const std::string& id);
bool StructureExist(const Structure* st);
private:
const Structure& st) {
ReplaceAll(CB_STRUCTURE_HANDLE, {
{ "<PREFIX>", GetHandlePrefix() },
- { "<NAME>", st.GetID() }
+ { "<NAME>", GetEnumTypeString(st.GetID()) }
})
.Transform([&](std::string str) {
return SmartIndent(str);
rpc_port_unit_map_write_<TYPE_NAME>(map, index, h->value[i]);
)__c_cb";
+constexpr const char CB_STRUCTURE_ARRAY_ENUM_UNIT_MAP_WRITE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(map, index, (int)h->value[i]);
+)__c_cb";
+
constexpr const char CB_STRUCTURE_ARRAY_BUNDLE_UNIT_MAP_WRITE[] =
R"__c_cb(
rpc_port_unit_map_write_bundle(map, index, h->value[i]);
}
)__c_cb";
+constexpr const char CB_STRUCTURE_ARRAY_ENUM_UNIT_MAP_READ[] =
+R"__c_cb(
+ret = rpc_port_unit_map_read_int(map, index, (int *)&h->value[i]);
+if (ret != RPC_PORT_ERROR_NONE) {
+ _E("Failed to read int. error(%d)", ret);
+ rpc_port_unit_map_destroy(map);
+ set_last_result(ret);
+ return;
+}
+)__c_cb";
+
constexpr const char CB_STRUCTURE_ARRAY_BUNDLE_UNIT_MAP_READ[] =
R"__c_cb(
ret = rpc_port_unit_map_read_bundle(map, index, &h->value[i]);
namespace {
bool IsPtrType(const BaseType& type) {
- if (type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr ||
type.ToString() == "string" ||
const Structure& st) {
auto& elm = *(st.GetElements().begin());
auto& type = elm->GetType();
- auto element_type = GetDataTypeString(type, false);
+ std::string element_type = GetDataTypeString(type, false);
ReplaceAll(CB_STRUCTURE_ARRAY_DEF)
.Change("<PREFIX>", GetHandlePrefix())
.Out(stream);
}
-std::string CBodyGeneratorBase::GenBaseElements(const Elements& elms) {
+std::string CBodyGeneratorBase::GenBaseElements(const Elements& elms, const std::string& id) {
std::string code;
for (const auto& elm : elms) {
auto& type = elm->GetType();
- auto param_type = GetDataTypeString(type, false);
+ auto param_type = GetDataTypeString(type, false, id);
code += param_type + elm->GetID() + ";";
code += NLine(1);
}
ReplaceAll(CB_STRUCTURE_BASE_DEF, {
{ "<PREFIX>", GetHandlePrefix() },
{ "<NAME>", st.GetID() },
- { "<ELEMENTS>", GenBaseElements(elms) }
+ { "<ELEMENTS>", GenBaseElements(elms, st.GetID()) }
})
.Transform([&](std::string str) {
return SmartIndent(str);
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = CB_STRUCTURE_ARRAY_ENUM_UNIT_MAP_WRITE;
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_ARRAY_USER_DEFINED_UNIT_MAP_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type));
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = CB_STRUCTURE_ARRAY_ENUM_UNIT_MAP_READ;
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_ARRAY_USER_DEFINED_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type));
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = CB_STRUCTURE_ARRAY_BASE_FREE;
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_ARRAY_USER_DEFINED_FREE)
.Change("<PREFIX>", GetHandlePrefix())
const Structure& st) {
auto& elm = *(st.GetElements().begin());
auto& type = elm->GetType();
- auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type);
- auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT, type);
+
auto element_type = GetDataTypeString(type, false);
- auto element_type_size = GetDataTypeString(type, false);
+ auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type);
+ auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT, type);
+ auto element_type_size = element_type;
+
element_type_size = RemoveLastSpaces(element_type_size);
ReplaceAll(CB_STRUCTURE_ARRAY_BASE)
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = CB_STRUCTURE_LIST_BASE_FREE;
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_LIST_USER_DEFINED_FREE)
.Change("<PREFIX>", GetHandlePrefix())
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = CB_STRUCTURE_LIST_ENUM_UNIT_MAP_WRITE;
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_LIST_USER_DEFINED_UNIT_MAP_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type));
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = ReplaceAll(CB_STRUCTURE_LIST_ENUM_UNIT_MAP_READ)
+ .Change("<VALUE_TYPE>",
+ RemoveLastSpaces(
+ GetParamTypeString(ParameterType::Direction::IN, type,
+ GetEnumBockString(type.ToString()))));
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_LIST_USER_DEFINED_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type));
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = ReplaceAll(CB_STRUCTURE_LIST_ENUM_ADD)
+ .Change("<VALUE_TYPE>",
+ RemoveLastSpaces(
+ GetParamTypeString(ParameterType::Direction::IN, type,
+ GetEnumBockString(type.ToString()))));
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_LIST_USER_DEFINED_ADD)
.Change("<PREFIX>", GetHandlePrefix())
const Structure& st) {
auto& elm = *(st.GetElements().begin());
auto& type = elm->GetType();
+ auto data_type = GetDataTypeString(type, true);
auto param_type = GetParamTypeString(ParameterType::Direction::IN, type);
ReplaceAll(CB_STRUCTURE_LIST_BASE)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", st.GetID())
- .Change("<DATA_TYPE>", GetDataTypeString(type, true))
+ .Change("<DATA_TYPE>", data_type)
.Change("<DATA_FREE>", GenListDataFree(elm))
.Change("<PARAM_TYPE_IN>", param_type)
.Change("<UNIT_MAP_WRITE>", GenListUnitMapWrite(elm))
std::string CBodyGeneratorBase::GenMapLookupValueSet(
const BaseType& value_type) {
std::string code;
- if (value_type.IsUserDefinedType() ||
+ if (value_type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ value_type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
value_type.GetMetaType() != nullptr ||
value_type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_MAP_LOOKUP_VALUE_USER_DEFINED_SET)
std::string CBodyGeneratorBase::GenMapInsertNewKeyFree(
const BaseType& key_type) {
std::string code;
- if (key_type.IsUserDefinedType() ||
+ if (key_type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ key_type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
key_type.GetMetaType() != nullptr ||
key_type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_MAP_INSERT_NEW_KEY_USER_DEFINED_FREE)
std::string CBodyGeneratorBase::GenMapInsertNewValueImpl(
const BaseType& key_type, const BaseType& value_type) {
std::string code;
- if (value_type.IsUserDefinedType() ||
+ if (value_type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ value_type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
value_type.GetMetaType() != nullptr ||
value_type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_MAP_INSERT_NEW_VALUE_USER_DEFINED_IMPL)
std::string CBodyGeneratorBase::GenMapInsertNewKeyImpl(
const BaseType& key_type) {
std::string code;
- if (key_type.IsUserDefinedType() ||
+ if (key_type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ key_type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
key_type.GetMetaType() != nullptr ||
key_type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_MAP_INSERT_NEW_KEY_USER_DEFINED_IMPL)
std::string CBodyGeneratorBase::GenMapFreeFunc(
const BaseType& type) {
std::string code;
- if (type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_MAP_USER_DEFINED_FREE_FUNC)
std::string CBodyGeneratorBase::GenMapUnitMapValueRead(
const BaseType& type) {
std::string code;
- code = ReplaceAll(CB_MAP_UNIT_MAP_VALUE_READ)
- .Change("<VALUE>", type.GetFullName(true));
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ code = ReplaceAll(CB_MAP_UNIT_MAP_VALUE_ENUM_TYPE_READ)
+ .Change("<VALUE>", type.GetFullName(true));
+ else
+ code = ReplaceAll(CB_MAP_UNIT_MAP_VALUE_READ)
+ .Change("<VALUE>", type.GetFullName(true));
return RemoveLine(code);
}
std::string CBodyGeneratorBase::GenMapUnitMapKeyRead(
const BaseType& type) {
std::string code;
- code = ReplaceAll(CB_MAP_UNIT_MAP_KEY_READ)
- .Change("<KEY>", type.GetFullName(true));
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ code = ReplaceAll(CB_MAP_UNIT_MAP_KEY_ENUM_TYPE_READ)
+ .Change("<KEY>", type.GetFullName(true));
+ else
+ code = ReplaceAll(CB_MAP_UNIT_MAP_KEY_READ)
+ .Change("<KEY>", type.GetFullName(true));
return RemoveLine(code);
}
.Change("<VALUE>", type.GetFullName(true))
.Change("<VALUE_TYPE>",
RemoveLastSpaces(GetDataTypeString(type, false)));
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = ReplaceAll(CB_MAP_UNIT_MAP_VALUE_WRITE_ENUM_TYPE)
+ .Change("<KEY>", type.GetFullName(true));
} else {
code = ReplaceAll(CB_MAP_UNIT_MAP_VALUE_WRITE_BASE_TYPE)
.Change("<VALUE>", type.GetFullName(true))
code = ReplaceAll(CB_MAP_UNIT_MAP_KEY_WRITE_PTR_TYPE)
.Change("<KEY>", type.GetFullName(true))
.Change("<KEY_TYPE>", RemoveLastSpaces(GetDataTypeString(type, false)));
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = ReplaceAll(CB_MAP_UNIT_MAP_KEY_ENUM_BASE_TYPE)
+ .Change("<KEY>", type.GetFullName(true));
} else {
code = ReplaceAll(CB_MAP_UNIT_MAP_KEY_WRITE_BASE_TYPE)
.Change("<KEY>", type.GetFullName(true))
std::string CBodyGeneratorBase::GenSetInsert(const BaseType& type) {
std::string code;
- if (type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_SET_INSERT_KEY_USER_DEFINED_IMPL)
std::string CBodyGeneratorBase::GenSetKeyFreeFunc(const BaseType& type) {
std::string code;
- if (type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.GetMetaType() != nullptr ||
type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_SET_USER_DEFINED_FREE_FUNC)
std::string CBodyGeneratorBase::GenSetUnitMapKeyRead(const BaseType& type) {
std::string code;
- code = ReplaceAll(CB_SET_UNIT_MAP_KEY_READ)
- .Change("<KEY>", type.GetFullName(true));
+
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ code = CB_SET_UNIT_MAP_KEY_ENUM_TYPE_READ;
+ else
+ code = ReplaceAll(CB_SET_UNIT_MAP_KEY_READ)
+ .Change("<KEY>", type.GetFullName(true));
return RemoveLine(code);
}
code = ReplaceAll(CB_SET_UNIT_MAP_KEY_WRITE_PTR_TYPE)
.Change("<KEY>", type.GetFullName(true))
.Change("<KEY_TYPE>", RemoveLastSpaces(GetDataTypeString(type, false)));
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code = CB_SET_UNIT_MAP_KEY_WRITE_ENUM_TYPE;
} else {
code = ReplaceAll(CB_SET_UNIT_MAP_KEY_WRITE_BASE_TYPE)
.Change("<KEY>", type.GetFullName(true))
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
- type.GetKeyType() != nullptr) {
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
+ type.GetMetaType() != nullptr || type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_BASE_USER_DEFINED_FREE)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", GetFullNameFromType(type))
std::string code;
for (const auto& elm : elms) {
auto& type = elm->GetType();
- code += ReplaceAll(CB_STRUCTURE_BASE_UNIT_MAP_WRITE)
- .Change("<ELEMENT_TYPE>", GetFullNameFromType(type))
- .Change("<ELEMENT_NAME>", elm->GetID());
+
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ code += ReplaceAll(CB_STRUCTURE_ENUM_UNIT_MAP_WRITE)
+ .Change("<ELEMENT_NAME>", elm->GetID());
+ else
+ code += ReplaceAll(CB_STRUCTURE_BASE_UNIT_MAP_WRITE)
+ .Change("<ELEMENT_TYPE>", GetFullNameFromType(type))
+ .Change("<ELEMENT_NAME>", elm->GetID());
}
return RemoveLine(code);
std::string code;
for (const auto& elm : elms) {
auto& type = elm->GetType();
- code += ReplaceAll(CB_STRUCTURE_BASE_UNIT_MAP_READ)
- .Change("<ELEMENT_TYPE>", GetFullNameFromType(type))
- .Change("<ELEMENT_NAME>", elm->GetID());
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ code += ReplaceAll(CB_STRUCTURE_ENUM_UNIT_MAP_READ)
+ .Change("<ELEMENT_NAME>", elm->GetID());
+ else
+ code += ReplaceAll(CB_STRUCTURE_BASE_UNIT_MAP_READ)
+ .Change("<ELEMENT_TYPE>", GetFullNameFromType(type))
+ .Change("<ELEMENT_NAME>", elm->GetID());
}
return RemoveLine(code);
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
- type.GetKeyType() != nullptr) {
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
+ type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetMetaType() != nullptr || type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_BASE_USER_DEFINED_SET)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", GetFullNameFromType(type))
const std::unique_ptr<Element>& elm) {
std::string code;
auto& type = elm->GetType();
- if (type.IsUserDefinedType() ||
- type.GetMetaType() != nullptr ||
- type.GetKeyType() != nullptr) {
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
+ type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetMetaType() != nullptr || type.GetKeyType() != nullptr) {
code = ReplaceAll(CB_STRUCTURE_BASE_USER_DEFINED_GET)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", GetFullNameFromType(type))
std::string code;
for (const auto& elm : elms) {
auto& type = elm->GetType();
- auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type);
- auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT,
- type);
+ auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type, name);
+ auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT, type, name);
code += ReplaceAll(CB_STRUCTURE_BASE_SET_GET)
.Change("<PREFIX>", GetHandlePrefix())
void CBodyGeneratorBase::AddParameterType(
std::shared_ptr<ParameterType> param_type) {
+ if (param_type->GetBaseType().GetUserDefinedType() == BaseType::UserType::ENUM)
+ return;
+
std::string key = param_type->GetBaseType().GetFullName(true) +
std::to_string(static_cast<int>(param_type->GetDirection()));
+ key = GetEnumTypeString(key);
+
if (param_types_.find(key) != param_types_.end())
return;
if (type.ToString() == "delegate") {
code = std::string(CB_UNIT_MAP_DELEGATE_WRITE);
} else {
- code = ReplaceAll(CB_UNIT_MAP_USER_DEFINED_WRITE)
+ code += ReplaceAll(CB_UNIT_MAP_USER_DEFINED_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type))
.Change("<PARAM_TYPE>",
GetParamTypeString(ParameterType::Direction::IN,
std::string ctor = GetHandlePrefix() + "_" +
GetFullNameFromType(param_type.GetBaseType()) + "_create";
code = ReplaceAll(CB_UNIT_MAP_USER_DEFINED_READ)
- .Change("<TYPE_NAME>", GetFullNameFromType(type))
+ .Change("<TYPE_NAME>", GetEnumTypeString(GetFullNameFromType(type)))
.Change("<PARAM_TYPE_OUT>",
GetParamTypeString(ParameterType::Direction::OUT,
param_type.GetBaseType()))
const Structure& st);
void GenStructureSetBaseDefinition(std::ofstream& stream,
const Structure& st);
- std::string GenBaseElements(const Elements& elms);
+ std::string GenBaseElements(const Elements& elms, const std::string& id);
void GenStructureBaseDefinition(std::ofstream& stream, const Structure& st);
std::string GenArrayUnitMapWrite(const std::unique_ptr<Element>& elm);
)__c_cb";
/**
+ * <ELEMENT_NAME> The name of the element of the structure.
+ */
+constexpr const char CB_STRUCTURE_ENUM_UNIT_MAP_WRITE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(map, "<ELEMENT_NAME>", (int)h-><ELEMENT_NAME>);
+)__c_cb";
+
+/**
* <ELEMENT_TYPE> The type of the element of the structure.
* <ELEMENT_NAME> The name of the element of the structure.
*/
)__c_cb";
/**
+ * <ELEMENT_TYPE> The type of the element of the structure.
+ * <ELEMENT_NAME> The name of the element of the structure.
+ */
+constexpr const char CB_STRUCTURE_ENUM_UNIT_MAP_READ[] =
+R"__c_cb(
+rpc_port_unit_map_read_int(map, "<ELEMENT_NAME>", (int *)&h-><ELEMENT_NAME>);
+)__c_cb";
+
+/**
* <ELEMENT_NAME> The name of the element of the structure.
* <PREFIX> The prefix of the element type.
* <NAME> The name of the element type.
rpc_port_unit_map_write_<TYPE_NAME>(map, index, value);
)__c_cb";
+constexpr const char CB_STRUCTURE_LIST_ENUM_UNIT_MAP_WRITE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(map, index, (int)value);
+)__c_cb";
+
constexpr const char CB_STRUCTURE_LIST_BUNDLE_UNIT_MAP_WRITE[] =
R"__c_cb(
rpc_port_unit_map_write_bundle(map, index, value);
h->list = g_list_append(h->list, value);
)__c_cb";
+constexpr const char CB_STRUCTURE_LIST_ENUM_UNIT_MAP_READ[] =
+R"__c_cb(
+value = calloc(1, sizeof(sizeof(<VALUE_TYPE>)));
+if (value == nullptr) {
+ _E("Out of memory");
+ rpc_port_unit_map_destroy(map);
+ set_last_result(RPC_PORT_ERROR_OUT_OF_MEMORY);
+ return;
+}
+
+ret = rpc_port_unit_map_read_int(map, index, (int*)&value);
+if (ret != RPC_PORT_ERROR_NONE) {
+ _E("Failed to read int. error(%d)", ret);
+ free(value);
+ rpc_port_unit_map_destroy(map);
+ set_last_result(ret);
+ return;
+}
+
+h->list = g_list_append(h->list, value);
+)__c_cb";
+
constexpr const char CB_STRUCTURE_LIST_BUNDLE_UNIT_MAP_READ[] =
R"__c_cb(
value = nullptr;
return RPC_PORT_ERROR_NONE;
)__c_cb";
+constexpr const char CB_STRUCTURE_LIST_ENUM_ADD[] =
+R"__c_cb(
+<VALUE_TYPE> *new_value;
+
+if (h == nullptr) {
+ _E("Invalid parameter");
+ return RPC_PORT_ERROR_INVALID_PARAMETER;
+}
+
+new_value = calloc(1, sizeof(<VALUE_TYPE>));
+if (new_value == nullptr) {
+ _E("Out of memory");
+ return RPC_PORT_ERROR_OUT_OF_MEMORY;
+}
+
+*new_value = value;
+
+h->list = g_list_append(h->list, new_value);
+
+return RPC_PORT_ERROR_NONE;
+)__c_cb";
+
constexpr const char CB_STRUCTURE_LIST_BUNDLE_ADD[] =
R"__c_cb(
bundle *new_value;
*/
constexpr const char CB_STRUCTURE_LIST_BASE_ADD[] =
R"__c_cb(
-<VALUE_TYPE>*new_value;
+<VALUE_TYPE> *new_value;
if (h == nullptr) {
_E("Invalid parameter");
rpc_port_unit_map_write_<KEY>(info->map, name, *(<KEY_TYPE> *)key);
)__c_cb";
+constexpr const char CB_MAP_UNIT_MAP_KEY_ENUM_BASE_TYPE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(info->map, name, *(int *)key);
+)__c_cb";
+
/**
* <VALUE> The name of the value.
* <VALUE_TYPE> The type of the value.
rpc_port_unit_map_write_<VALUE>(info->map, name, (<VALUE_TYPE>)value);
)__c_cb";
+constexpr const char CB_MAP_UNIT_MAP_VALUE_WRITE_ENUM_TYPE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(info->map, name, *(int *)value);
+)__c_cb";
+
/**
* <VALUE> The name of the value.
* <VALUE_TYPE> The pointer type of the value.
rpc_port_unit_map_read_<KEY>(map, name, &key);
)__c_cb";
+constexpr const char CB_MAP_UNIT_MAP_KEY_ENUM_TYPE_READ[] =
+R"__c_cb(
+rpc_port_unit_map_read_int(map, name, (int *)&key);
+)__c_cb";
+
/**
* <VALUE> The name of the value.
*/
rpc_port_unit_map_read_<VALUE>(map, name, &value);
)__c_cb";
+constexpr const char CB_MAP_UNIT_MAP_VALUE_ENUM_TYPE_READ[] =
+R"__c_cb(
+rpc_port_unit_map_read_int(map, name, (int *)&value);
+)__c_cb";
+
/**
* <KEY_TYPE> The type of the key.
*/
rpc_port_unit_map_write_<KEY>(info->map, name, (<KEY_TYPE>)key);
)__c_cb";
+constexpr const char CB_SET_UNIT_MAP_KEY_WRITE_ENUM_TYPE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(info->map, name, *(int *)key);
+)__c_cb";
+
/**
* <KEY> The name of the key.
* <KEY_TYPE> The pointer type of the key.
rpc_port_unit_map_write_<KEY>(info->map, name, *(<KEY_TYPE> *)key);
)__c_cb";
+constexpr const char CB_SET_UNIT_MAP_KEY_ENUM_TYPE_READ[] =
+R"__c_cb(
+rpc_port_unit_map_read_int(map, name, (int *)&key);
+)__c_cb";
+
/**
* <KEY> The name of the key.
*/
auto& param_type = param->GetParameterType();
auto& type = param_type.GetBaseType();
- if (type.IsUserDefinedType() || type.GetMetaType() != nullptr) {
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code += ReplaceAll(CB_INTERFACE_METHOD_ENUM_UNIT_MAP_WRITE)
+ .Change("<TYPE_NAME>", param->GetID())
+ .Change("<ARG>", param->GetID());
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr) {
code += ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
.Change("<ARG>", param->GetID());
} else {
code += ReplaceAll(CB_INTERFACE_METHOD_BASE_UNIT_MAP_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
+ .Change("<ARG_NAME>", param->GetID())
.Change("<ARG>", param->GetID());
}
}
const Interface& iface, const BaseType& type,
const std::string& arg_name, const std::string& arg) {
std::string code;
- if (type.IsUserDefinedType() || type.GetMetaType() != nullptr) {
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code += ReplaceAll(CB_INTERFACE_METHOD_EMUM_UNIT_MAP_READ)
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
+ } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr) {
code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
.Change("<ARG_NAME>", arg_name)
for (const auto& p : decl.GetParameters()) {
auto& param_type = p->GetParameterType();
auto& type = param_type.GetBaseType();
- if (type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.ToString() == "list" ||
type.ToString() == "array" ||
type.ToString() == "bundle" ||
/**
* <TYPE_NAME> The type name of the argument.
+ * <ARG> The argument.
+ */
+constexpr const char CB_INTERFACE_METHOD_ENUM_UNIT_MAP_WRITE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(map_, "<ARG_NAME>", (int)<ARG>);
+)__c_cb";
+
+/**
+ * <TYPE_NAME> The type name of the argument.
* <ARG_NAME> The argument name.
* <ARG> The argument.
*/
* <ARG_NAME> The argument name.
* <ARG> The argument.
*/
+constexpr const char CB_INTERFACE_METHOD_EMUM_UNIT_MAP_READ[] =
+R"__c_cb(
+res_ = rpc_port_unit_map_read_int(map_, "<ARG_NAME>", (int *)&<ARG>);
+if (res_ != RPC_PORT_ERROR_NONE) {
+ _E("Failed to read <TYPE_NAME>. error(%d)", res_);
+ rpc_port_unit_map_destroy(map_);
+ break;
+}
+)__c_cb";
+
+/**
+ * <ARG_NAME> The argument name.
+ * <ARG> The argument.
+ */
constexpr const char CB_INTERFACE_METHOD_BUNDLE_UNIT_MAP_READ[] =
R"__c_cb(
<ARG> = nullptr;
GenPragmaOnce(stream);
GenIncludeDefaultHeaders(stream, false);
GenExplicitLinkageOpen(stream);
+ GenEnums(stream);
GenStructureHandles(stream);
GenInterfaceHandles(stream);
GenStructures(stream);
void CGroupHeaderGenerator::GenInterfaceMethodBase(std::ofstream& stream,
const Interface& iface, const Declaration& decl) {
ReplaceAll(CB_INTERFACE_METHOD_BASE, {
- { "<RETURN_TYPE>", GetReturnTypeString(decl.GetType()) },
+ { "<RETURN_TYPE>", GetReturnTypeString(decl.GetType(), iface.GetID()) },
{ "<PREFIX>", GetHandlePrefix() },
{ "<NAME>", iface.GetID() },
{ "<METHOD_NAME>", decl.GetID() },
}
}
+void CHeaderGeneratorBase::GenEnums(std::ofstream& stream) {
+ for (auto& b : GetDocument().GetBlocks()) {
+ GenEnum(stream, *b);
+ }
+}
+
+void CHeaderGeneratorBase::GenEnum(std::ofstream& stream,
+ const Block& block) {
+ for (auto& e : block.GetEnums()) {
+ std::string enums;
+ for (auto& f : e->GetFields()) {
+ if (f->GetValue().empty())
+ enums += f->GetID() + "," + NLine(1);
+ else
+ enums += f->GetID() + " = " + f->GetValue() + "," + NLine(1);
+ }
+
+ ReplaceAll(CB_ENUM_BASE, {{"<ENUMS>", enums},
+ {"<PREFIX>", GetHandlePrefix()},
+ {"<NAME>", e->GetID()},
+ {"<OWNER_NAME>", block.GetID()}})
+ .Transform([&](std::string str) { return SmartIndent(str); })
+ .Out(stream);
+ }
+}
+
void CHeaderGeneratorBase::GenStructureArrayBase(std::ofstream& stream,
const Structure& st) {
auto& elm = *(st.GetElements().begin());
auto& type = elm->GetType();
- auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type);
- auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT, type);
+ std::string id;
+
+ auto n = type.ToString().find('.');
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM &&
+ n == std::string::npos)
+ id = GetEnumBockString(type.ToString());
+ else
+ id = st.GetID();
+
+ auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type, id);
+ auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT, type, id);
ReplaceAll(CB_STRUCTURE_ARRAY_BASE)
.Change("<PREFIX>", GetHandlePrefix())
- .Change("<NAME>", st.GetID())
+ .Change("<NAME>", GetEnumTypeString(st.GetID()))
.Change("<PARAM_TYPE_IN>", param_type_in)
.Change("<PARAM_TYPE_OUT>", param_type_out)
.Transform([&](std::string code) { return SmartIndent(code); })
const Structure& st) {
auto& elm = *(st.GetElements().begin());
auto& type = elm->GetType();
- auto param_type = GetParamTypeString(ParameterType::Direction::IN, type);
+ std::string id;
+
+ auto n = type.ToString().find('.');
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM &&
+ n == std::string::npos)
+ id = GetEnumBockString(type.ToString());
+ else
+ id = st.GetID();
+
+
+ auto param_type = GetParamTypeString(ParameterType::Direction::IN, type, id);
ReplaceAll(CB_STRUCTURE_LIST_BASE)
.Change("<PREFIX>", GetHandlePrefix())
- .Change("<NAME>", st.GetID())
+ .Change("<NAME>", GetEnumTypeString(st.GetID()))
.Change("<PARAM_TYPE_IN>", param_type)
.Transform([&](std::string code) { return SmartIndent(code); })
.Out(stream);
ReplaceAll(CB_STRUCTURE_MAP_BASE)
.Change("<PREFIX>", GetHandlePrefix())
- .Change("<NAME>", st.GetID())
+ .Change("<NAME>", GetEnumTypeString(st.GetID()))
.Change("<KEY_PARAM_TYPE>", key_param_type)
.Change("<VALUE_PARAM_TYPE>", value_param_type)
.Change("<VALUE_PARAM_TYPE_OUT>", value_param_type_out)
for (const auto& e : st.GetElements()) {
auto& type = e->GetType();
- auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type);
- auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT,
- type);
+ auto param_type_in = GetParamTypeString(ParameterType::Direction::IN, type, st.GetID());
+ auto param_type_out = GetParamTypeString(ParameterType::Direction::OUT, type, st.GetID());
ReplaceAll(CB_STRUCTURE_BASE_SET_GET)
.Change("<PREFIX>", GetHandlePrefix())
virtual ~CHeaderGeneratorBase() = default;
void GenStructures(std::ofstream& stream) override;
+ void GenEnums(std::ofstream& stream);
private:
void GenStructureArrayBase(std::ofstream& stream, const Structure& st);
void GenStructureSetBase(std::ofstream& stream, const Structure& st);
void GenStructureBase(std::ofstream& stream, const Structure& st);
void GenStructure(std::ofstream& stream, const Structure& st);
+ void GenEnum(std::ofstream& stream, const Block& block);
};
} // namespace version2
namespace version2 {
/**
+ * <PREFIX> The prefix of the enum.
+ * <OWNER_NAME> The name of the owner.
+ * <NAME> The name of the enum.
+ */
+constexpr const char CB_ENUM_BASE[] =
+R"__c_cb(
+/**
+ * @brief The <PREFIX>_<OWNER_NAME>_<NAME> enum.
+ */
+typedef enum {
+ <ENUMS>
+} <PREFIX>_<OWNER_NAME>_<NAME>;
+)__c_cb";
+
+/**
* <PREFIX> The prefix of the structure. e.g. rpc_port_proxy_ or rpc_port_stub_
* <NAME> The name of the structure.
*/
for (const auto& p : decl.GetParameters()) {
auto& param_type = p->GetParameterType();
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.GetMetaType() != nullptr ||
type.ToString() == "bundle" ||
type.ToString() == "string" ||
continue;
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type)) {
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE) {
code += ReplaceAll(CB_INTERFACE_METHOD_DELEGATE_UNIT_MAP_WRITE)
.Change("<ARG>", param->GetID());
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code += ReplaceAll(CB_INTERFACE_METHOD_ENUM_UNIT_MAP_WRITE)
+ .Change("<ARG_NAME>", param->GetID())
+ .Change("<ARG>", param->GetID());
} else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr) {
code += ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
} else {
code += ReplaceAll(CB_INTERFACE_METHOD_BASE_UNIT_MAP_WRITE)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
+ .Change("<ARG_NAME>", param->GetID())
.Change("<ARG>", param->GetID());
}
}
const Interface& iface, const BaseType& type,
const std::string& arg_name, const std::string& arg) {
std::string code;
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
+ type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
type.GetMetaType() != nullptr) {
code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
.Change("<ARG_NAME>", arg_name)
.Change("<ARG>", arg);
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code += ReplaceAll(CB_INTERFACE_METHOD_EMUM_UNIT_MAP_READ)
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
} else if (type.ToString() == "bundle") {
code = ReplaceAll(CB_INTERFACE_METHOD_BUNDLE_UNIT_MAP_READ)
.Change("<ARG_NAME>", arg_name)
void CProxyBodyGenerator::GenMethodBase(std::ofstream& stream,
const Interface& iface, const Declaration& decl) {
ReplaceAll(CB_INTERFACE_METHOD_BASE)
- .Change("<RETURN_TYPE>", GetReturnTypeString(decl.GetType()))
+ .Change("<RETURN_TYPE>", GetReturnTypeString(decl.GetType(), iface.GetID()))
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", iface.GetID())
.Change("<METHOD_NAME>", decl.GetID())
const Interface& iface, const Declaration& decl) {
std::string enum_value = GetHandlePrefix() + "_" + iface.GetID() +
"_DELEGATE_" + decl.GetID();
- bool has_free = false;
- std::string delegate_args_free = GenDelegateArgsFree(iface, decl, has_free);
+ std::string delegate_args_free = GenDelegateArgsFree(iface, decl);
ReplaceAll(CB_INTERFACE_DELEGATE_BASE)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<DELEGATE_UNIT_MAP_READ>", GenDelegateUnitMapRead(iface, decl))
.Change("<DELEGATE_ARGS_FREE>", delegate_args_free)
.Change("<DELEGATE_CALLBACK_ARGS>", GenDelegateCallbackArgs(decl))
- .Change("<GOTO_STATEMENT>", has_free ? "out:" + NLine(1) : "")
.Transform([&](std::string code) { return SmartIndent(code); })
.Out(stream);
}
for (const auto& param : decl.GetParameters()) {
auto& param_type = param->GetParameterType();
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
+ type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
type.ToString() == "list" ||
type.ToString() == "array") {
code += ReplaceAll(CB_INTERFACE_DELEGATE_USER_DEFINED_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
.Change("<ARG>", param->GetID());
+
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code += ReplaceAll(CB_INTERFACE_DELEGATE_ENUM_UNIT_MAP_READ)
+ .Change("<ARG_NAME>", param->GetID())
+ .Change("<ARG>", param->GetID());
} else if (type.ToString() == "bundle") {
code += ReplaceAll(CB_INTERFACE_DELEGATE_BUNDLE_UNIT_MAP_READ)
.Change("<ARG>", param->GetID());
} else {
code += ReplaceAll(CB_INTERFACE_DELEGATE_BASE_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
+ .Change("<ARG_NAME>", param->GetID())
.Change("<ARG>", param->GetID());
}
}
for (const auto& param : decl.GetParameters()) {
auto& param_type = param->GetParameterType();
auto& type = param_type.GetBaseType();
- code += GetArgTypeString(type, iface) + param->GetID() + " = " +
- GetErrorValue(param_type.GetBaseType()) + ";" + NLine(1);
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ code += GetArgTypeString(type, iface) + param->GetID() + ";" + NLine(1);
+ else
+ code += GetArgTypeString(type, iface) + param->GetID() + " = " +
+ GetErrorValue(param_type.GetBaseType()) + ";" + NLine(1);
}
return code;
}
std::string CProxyBodyGenerator::GenDelegateArgsFree(const Interface& iface,
- const Declaration& decl, bool& has_free) {
+ const Declaration& decl) {
std::string code;
for (const auto& param : decl.GetParameters()) {
auto& param_type = param->GetParameterType();
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.ToString() == "list" ||
type.ToString() == "array") {
code += ReplaceAll(CB_INTERFACE_DELEGATE_USER_DEFINED_ARG_FREE)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", GetFullNameFromType(type, iface))
.Change("<ARG>", param->GetID());
- has_free = true;
} else if (type.ToString() == "bundle") {
code += ReplaceAll(CB_INTERFACE_DELEGATE_BUNDLE_ARG_FREE,
"<ARG>", param->GetID());
- has_free = true;
} else if (type.ToString() == "string" || type.ToString() == "file") {
code += ReplaceAll(CB_INTERFACE_DELEGATE_STRING_ARG_FREE,
"<ARG>", param->GetID());
- has_free = true;
}
}
std::string GenDelegateArgsDecl(const Interface& iface,
const Declaration& decl);
std::string GenDelegateArgsFree(const Interface& iface,
- const Declaration& decl, bool& has_free);
+ const Declaration& decl);
void GenInterfaceDelegateEnumBase(std::ofstream& stream,
const Interface& iface);
void GenDelegateDefinition(std::ofstream& stream);
}
}
-<GOTO_STATEMENT>
+out:
<DELEGATE_ARGS_FREE>
+ return;
}
)__c_cb";
* <TYPE_NAME> The type name of the argument.
* <ARG> The argument.
*/
+constexpr const char CB_INTERFACE_DELEGATE_ENUM_UNIT_MAP_READ[] =
+R"__c_cb(
+ret = rpc_port_unit_map_read_int(map, "<ARG_NAME>", (int *)&<ARG>);
+if (ret != RPC_PORT_ERROR_NONE) {
+ _E("Failed to read <TYPE_NAME>. error(%d)", ret);
+ goto out;
+}
+)__c_cb";
+
+
+/**
+ * <TYPE_NAME> The type name of the argument.
+ * <ARG> The argument.
+ */
constexpr const char CB_INTERFACE_DELEGATE_BASE_UNIT_MAP_READ[] =
R"__c_cb(
-ret = rpc_port_unit_map_read_<TYPE_NAME>(map, "<ARG>", &<ARG>);
+ret = rpc_port_unit_map_read_<TYPE_NAME>(map, "<ARG_NAME>", &<ARG>);
if (ret != RPC_PORT_ERROR_NONE) {
_E("Failed to read <TYPE_NAME>. error(%d)", ret);
goto out;
*/
constexpr const char CB_INTERFACE_METHOD_BASE_UNIT_MAP_WRITE[] =
R"__c_cb(
-rpc_port_unit_map_write_<TYPE_NAME>(map_, "<ARG>", <ARG>);
+rpc_port_unit_map_write_<TYPE_NAME>(map_, "<ARG_NAME>", <ARG>);
+)__c_cb";
+
+/**
+ * <TYPE_NAME> The type name of the argument.
+ * <ARG> The argument.
+ */
+constexpr const char CB_INTERFACE_METHOD_ENUM_UNIT_MAP_WRITE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(map_, "<ARG_NAME>", (int)<ARG>);
)__c_cb";
/**
)__c_cb";
/**
+ * <ARG_NAME> The argument name.
+ * <ARG> The argument.
+ */
+constexpr const char CB_INTERFACE_METHOD_EMUM_UNIT_MAP_READ[] =
+R"__c_cb(
+res_ = rpc_port_unit_map_read_int(map_, "<ARG_NAME>", (int *)&<ARG>);
+if (res_ != RPC_PORT_ERROR_NONE) {
+ _E("Failed to read <TYPE_NAME>. error(%d)", res_);
+ rpc_port_unit_map_destroy(map_);
+ break;
+}
+)__c_cb";
+
+/**
* <TYPE_NAME> The type name of the argument.
* <ARG_NAME> The argument name.
* <ARG> The argument.
GenPragmaOnce(stream);
GenIncludeDefaultHeaders(stream, false);
GenExplicitLinkageOpen(stream);
+ GenEnums(stream);
GenStructureHandles(stream);
GenInterfaceHandles(stream);
GenStructures(stream);
void CProxyHeaderGenerator::GenInterfaceMethodBase(std::ofstream& stream,
const Interface& iface, const Declaration& decl) {
ReplaceAll(CB_INTERFACE_METHOD_BASE)
- .Change("<RETURN_TYPE>", GetReturnTypeString(decl.GetType()))
+ .Change("<RETURN_TYPE>", GetReturnTypeString(decl.GetType(), iface.GetID()))
.Change("<PREFIX>", GetHandlePrefix())
.Change("<NAME>", iface.GetID())
.Change("<METHOD_NAME>", decl.GetID())
for (const auto& p : decl.GetParameters()) {
auto& param_type = p->GetParameterType();
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.ToString() == "list" ||
type.ToString() == "array" ||
type.ToString() == "bundle" ||
for (const auto& p : decl.GetParameters()) {
auto& param_type = p->GetParameterType();
auto& type = param_type.GetBaseType();
- args_decl += GetArgTypeString(type, iface) + p->GetID() + " = " +
- GetErrorValue(type) + ";" + NLine(1);
+ if (type.GetUserDefinedType() == BaseType::UserType::ENUM)
+ args_decl += GetArgTypeString(type, iface) + p->GetID() + ";" + NLine(1);
+ else
+ args_decl += GetArgTypeString(type, iface) + p->GetID() + " = " +
+ GetErrorValue(type) + ";" + NLine(1);
}
if (decl.GetMethodType() == Declaration::MethodType::SYNC) {
continue;
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type)){
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE){
parcel_read_code = ReplaceAll(CB_INTERFACE_METHOD_DELEGATE_UNIT_MAP_READ)
.Change("<PREFIX>", GetHandlePrefix())
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
.Change("<ARG_NAME>", std::string("delegate"))
.Change("<ARG>", p->GetID());
-
- } else if (type.IsUserDefinedType() || type.GetMetaType() != nullptr) {
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ code += ReplaceAll(CB_INTERFACE_METHOD_EMUM_UNIT_MAP_READ)
+ .Change("<ARG_NAME>", p->GetID())
+ .Change("<ARG>", p->GetID());
+ } else if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetMetaType() != nullptr) {
parcel_read_code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_READ)
.Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
.Change("<ARG_NAME>", p->GetID())
const std::string& arg_name, const std::string& arg) {
std::string parcel_write_code;
- if (IsDelegateType(iface, type)) {
- parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_DELEGATE_UNIT_MAP_WRITE)
+ if (type.GetUserDefinedType() == BaseType::UserType::DELEGATE) {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_DELEGATE_UNIT_MAP_WRITE)
.Change("<ARG_NAME>", std::string("delegate"))
.Change("<ARG>", arg);
- } else if (type.IsUserDefinedType() ||
- type.ToString() == "list" ||
- type.ToString() == "array") {
- parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_WRITE)
- .Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
- .Change("<ARG_NAME>", arg_name)
- .Change("<ARG>", arg);
- parcel_write_code += GetPrivateSharingString(type, iface, "port", arg);
- } else if (type.ToString() == "bundle") {
- parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_BUNDLE_UNIT_MAP_WRITE)
- .Change("<ARG_NAME>", arg_name)
- .Change("<ARG>", arg);
- } else if (type.ToString() == "string") {
- parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_STRING_UNIT_MAP_WRITE)
- .Change("<ARG_NAME>", arg_name)
- .Change("<ARG>", arg);
- } else if (type.ToString() == "file") {
- parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_STRING_UNIT_MAP_WRITE)
+ } else if (type.GetUserDefinedType() == BaseType::UserType::ENUM) {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_ENUM_UNIT_MAP_WRITE)
.Change("<ARG_NAME>", arg_name)
.Change("<ARG>", arg);
- parcel_write_code += GetPrivateSharingString(type, iface, "port", arg_name);
- } else {
- parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_BASE_UNIT_MAP_WRITE)
- .Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
- .Change("<ARG_NAME>", arg_name)
- .Change("<ARG>", arg);
- }
+ } else if (type.IsUserDefinedType() ||
+ type.ToString() == "list" ||
+ type.ToString() == "array") {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_WRITE)
+ .Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
+ parcel_write_code += GetPrivateSharingString(type, iface, "port", arg);
+ } else if (type.ToString() == "bundle") {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_BUNDLE_UNIT_MAP_WRITE)
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
+ } else if (type.ToString() == "string") {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_STRING_UNIT_MAP_WRITE)
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
+ } else if (type.ToString() == "file") {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_STRING_UNIT_MAP_WRITE)
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
+ parcel_write_code += GetPrivateSharingString(type, iface, "port", arg_name);
+ } else {
+ parcel_write_code = ReplaceAll(CB_INTERFACE_METHOD_BASE_UNIT_MAP_WRITE)
+ .Change("<TYPE_NAME>", GetFullNameFromType(type, iface))
+ .Change("<ARG_NAME>", arg_name)
+ .Change("<ARG>", arg);
+ }
return parcel_write_code;
}
for (const auto& p : decl.GetParameters()) {
auto& param_type = p->GetParameterType();
auto& type = param_type.GetBaseType();
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.ToString() == "list" ||
type.ToString() == "array") {
free_code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_FREE,
if (decl.GetMethodType() == Declaration::MethodType::SYNC) {
auto& type = decl.GetType();
- if (IsDelegateType(iface, type) ||
- type.IsUserDefinedType() ||
+ if (type.GetUserDefinedType() == BaseType::UserType::STRUCTURE ||
+ type.GetUserDefinedType() == BaseType::UserType::DELEGATE ||
type.ToString() == "list" ||
type.ToString() == "array") {
free_code = ReplaceAll(CB_INTERFACE_METHOD_USER_DEFINED_FREE,
* <TYPE_NAME> The type name of the argument.
* <ARG> The argument.
*/
+constexpr const char CB_INTERFACE_METHOD_ENUM_UNIT_MAP_WRITE[] =
+R"__c_cb(
+rpc_port_unit_map_write_int(map_, "<ARG_NAME>", (int)<ARG>);
+)__c_cb";
+
+
+/**
+ * <TYPE_NAME> The type name of the argument.
+ * <ARG> The argument.
+ */
constexpr const char CB_INTERFACE_METHOD_USER_DEFINED_UNIT_MAP_WRITE[] =
R"__c_cb(
rpc_port_unit_map_write_<TYPE_NAME>(map_, "<ARG_NAME>", <ARG>);
)__c_cb";
/**
+ * <ARG_NAME> The argument name.
+ * <ARG> The argument.
+ */
+constexpr const char CB_INTERFACE_METHOD_EMUM_UNIT_MAP_READ[] =
+R"__c_cb(
+ret_ = rpc_port_unit_map_read_int(map, "<ARG_NAME>", (int *)&<ARG>);
+if (ret_ != RPC_PORT_ERROR_NONE) {
+ _E("Failed to read <TYPE_NAME>. error(%d)", ret_);
+ goto out;
+}
+)__c_cb";
+
+/**
* <TYPE_NAME> The type name of the argument.
* <ARG_NAME> The argument name.
* <ARG> The argument.
GenPragmaOnce(stream);
GenIncludeDefaultHeaders(stream, false);
GenExplicitLinkageOpen(stream);
+ GenEnums(stream);
GenStructureHandles(stream);
GenInterfaceHandles(stream);
GenStructures(stream);
void CStubHeaderGenerator::GenInterfaceMethodCallbackBase(std::ofstream& stream,
const Interface& iface, const Declaration& decl) {
std::string code(ReplaceAll(CB_INTERFACE_METHOD_CALLBACK_BASE, {
- { "<RETURN_TYPE>", GetReturnTypeString(decl.GetType()) },
+ { "<RETURN_TYPE>", GetReturnTypeString(decl.GetType(), iface.GetID()) },
{ "<PREFIX>", GetHandlePrefix() },
{ "<NAME>", iface.GetID() },
{ "<METHOD_NAME>", decl.GetID() },
assert(elms != nullptr);
elms->Add(std::move(elm));
- auto* st = new Structure(type_name, elms, "", __LINE__);
+ auto* st = new Structure(type_name, elms, new tidl::Enums(), "", __LINE__);
assert(st != nullptr);
AddStructureFromType(*type.GetMetaType());
assert(elms != nullptr);
elms->Add(std::move(elm));
- auto* st = new Structure(type_name, elms, "", __LINE__);
+ auto* st = new Structure(type_name, elms, new tidl::Enums(), "", __LINE__);
assert(st != nullptr);
AddStructureFromType(*type.GetMetaType(), iface);
${CMAKE_CURRENT_SOURCE_DIR}/../../idlc/gen/generator.cc
${CMAKE_CURRENT_SOURCE_DIR}/../../idlc/ast/parser.cc
${CMAKE_CURRENT_SOURCE_DIR}/../../idlc/ast/attribute.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../idlc/ast/enum.cc
)
ADD_DEFINITIONS("-DFULLVER=\"${FULLVER}\"")
virtual void SetUp() {
testBlock = new tidl::Block("TestBlock", tidl::Block::TYPE_INTERFACE,
- "", 28);
+ new tidl::Enums(), "", 28);
}
virtual void TearDown() {
delete testBlock;
TEST_F(BlockTest, Block_Constructor) {
tidl::Block* block = new tidl::Block("StructureBlock",
- tidl::Block::TYPE_STRUCTURE, "", __LINE__);
+ tidl::Block::TYPE_STRUCTURE, new tidl::Enums(), "", __LINE__);
EXPECT_NE(block, nullptr);
delete block;
}
TEST_F(BlockTest, Block_GetComments) {
std::string comments = "Test Block";
tidl::Block* block = new tidl::Block("StructureBlock",
- tidl::Block::TYPE_STRUCTURE, comments, __LINE__);
+ tidl::Block::TYPE_STRUCTURE, new tidl::Enums(), comments, __LINE__);
EXPECT_NE(block, nullptr);
EXPECT_EQ(block->GetComments(), comments);
delete block;
virtual void SetUp() {
document = new tidl::Document();
block = new tidl::Block("TestBlock", tidl::Block::TYPE_INTERFACE,
- "", __LINE__);
+ new tidl::Enums(), "", __LINE__);
}
virtual void TearDown() {
}
TEST_F(DocumentTest, Document_ExistBlock) {
document->AddBlock(block);
tidl::Block* testBlock = new tidl::Block("TestBlock",
- tidl::Block::TYPE_INTERFACE, "", __LINE__);
+ tidl::Block::TYPE_INTERFACE, new tidl::Enums(), "", __LINE__);
EXPECT_NE(testBlock, nullptr);
EXPECT_EQ(document->ExistBlock(testBlock), true);
delete testBlock;
TEST_F(InterfaceTest, Interface_Constructor) {
tidl::Interface* interface = new tidl::Interface("TestInterface", decls,
- "", new tidl::Attributes(), __LINE__);
+ new tidl::Enums(), "", new tidl::Attributes(), __LINE__);
EXPECT_NE(interface, nullptr);
delete interface;
}
TEST_F(InterfaceTest, Interface_GetDeclrations) {
tidl::Interface* interface = new tidl::Interface("TestInterface", decls,
- "", new tidl::Attributes(), __LINE__);
+ new tidl::Enums(), "", new tidl::Attributes(), __LINE__);
EXPECT_NE(interface, nullptr);
bool flag = false;
TEST_F(InterfaceTest, Interface_GetID) {
tidl::Interface* interface = new tidl::Interface("TestInterface", decls,
- "", new tidl::Attributes(), __LINE__);
+ new tidl::Enums(), "", new tidl::Attributes(), __LINE__);
EXPECT_NE(interface, nullptr);
EXPECT_EQ(interface->GetID(), "TestInterface");
delete interface;
TEST_F(InterfaceTest, Interface_GetType) {
tidl::Interface* interface = new tidl::Interface("TestInterface", decls,
- "", new tidl::Attributes(), __LINE__);
+ new tidl::Enums(), "", new tidl::Attributes(), __LINE__);
EXPECT_NE(interface, nullptr);
EXPECT_EQ(interface->GetType(), tidl::Interface::TYPE_INTERFACE);
delete interface;
TEST_F(InterfaceTest, Interface_GetLine) {
unsigned line = __LINE__;
tidl::Interface* interface = new tidl::Interface("TestInterface", decls,
- "", new tidl::Attributes(), line);
+ new tidl::Enums(), "", new tidl::Attributes(), line);
EXPECT_NE(interface, nullptr);
EXPECT_EQ(interface->GetLine(), line);
delete interface;
TEST_F(InterfaceTest, Interface_GetComments) {
std::string comments = "Test Interface";
tidl::Interface* interface = new tidl::Interface("TestInterface", decls,
- comments, new tidl::Attributes(), __LINE__);
+ new tidl::Enums(), comments, new tidl::Attributes(), __LINE__);
EXPECT_NE(interface, nullptr);
EXPECT_EQ(interface->GetComments(), comments);
delete interface;
TEST_F(StructureTest, Structure_Constructor) {
tidl::Structure* structure = new tidl::Structure("TestStructure", elms,
- "", __LINE__);
+ new tidl::Enums(), "", __LINE__);
EXPECT_NE(structure, nullptr);
delete structure;
}
TEST_F(StructureTest, Structure_GetElements) {
tidl::Structure* structure = new tidl::Structure("TestStructure", elms,
- "", __LINE__);
+ new tidl::Enums(), "", __LINE__);
EXPECT_NE(structure, nullptr);
int count = 0;
TEST_F(StructureTest, Structure_GetID) {
tidl::Structure* structure = new tidl::Structure("TestStructure", elms,
- "", __LINE__);
+ new tidl::Enums(), "", __LINE__);
EXPECT_NE(structure, nullptr);
EXPECT_EQ(structure->GetID(), "TestStructure");
delete structure;
TEST_F(StructureTest, Structure_GetType) {
tidl::Structure* structure = new tidl::Structure("TestStructure", elms,
- "", __LINE__);
+ new tidl::Enums(), "", __LINE__);
EXPECT_NE(structure, nullptr);
EXPECT_EQ(structure->GetType(), tidl::Structure::TYPE_STRUCTURE);
delete structure;
TEST_F(StructureTest, Structure_GetLine) {
unsigned line = __LINE__;
tidl::Structure* structure = new tidl::Structure("TestStructure", elms,
- "", line);
+ new tidl::Enums(), "", line);
EXPECT_NE(structure, nullptr);
EXPECT_EQ(structure->GetLine(), line);
delete structure;
TEST_F(StructureTest, Structure_GetComments) {
std::string comments = "Test Structure";
tidl::Structure* structure = new tidl::Structure("TestStructure", elms,
- comments, __LINE__);
+ new tidl::Enums(), comments, __LINE__);
EXPECT_NE(structure, nullptr);
EXPECT_EQ(structure->GetComments(), comments);
delete structure;