Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

actions.h

00001 #ifdef WIN32
00002 #pragma warning (disable : 4786)
00003 #endif
00004 
00005 #ifndef __ACTIONS_H_INCLUDED__
00006 #define __ACTIONS_H_INCLUDED__
00007 //this file contains all auxiliary structures needed to parse web service declaration files
00008 #include "TranslationUnit.h"
00009 
00010 #include <list>
00011 #include <map>
00012 #include <string>
00013 
00014 using namespace std;
00015 
00016 extern map<string,int> lexer_keys; //keyword map in the lexical analyzer.
00017 
00018 //auxiliary enums used by the parser
00019 enum CLASSTYPE {WSCLASS=1, BEANCLASS};
00020 
00021 //auxiliary structs and type definitions used by the parser.
00022 
00023 typedef list<int> token_list;
00024 typedef list<string*> string_list;
00025 
00026 struct expression
00027 {
00028   union
00029   {
00030     int n;
00031   } expr;
00032 };
00033 
00034 typedef list<expression*> expression_list;
00035 
00036 struct param_declarator
00037 {
00038   token_list ptr_ops;        //optional
00039   string decl_id;    //must;
00040   expression_list arr_dim; //optional
00041 };
00042 
00043 struct param_decl
00044 {
00045   string_list* decl_specs; //must
00046   param_declarator* param; //must
00047   bool bdef; //true if there is a default value
00048   expression* defval;
00049 };
00050 
00051 typedef list<param_decl*> param_decl_list;
00052 
00053 struct base_specifier
00054 {
00055         int access;
00056         string* class_name;
00057 };
00058 
00059 typedef list<base_specifier*> base_specifier_list;
00060 
00061 struct class_head
00062 {
00063         string* class_name;
00064         base_specifier_list* baselist;
00065 };
00066 
00067 struct member_declarator
00068 {
00069         string* declarator_id;    //must
00070         param_decl_list* params;  //optional
00071   expression_list array_indexes;  //optional
00072   token_list ptr_ops;       //optional
00073   bool bpure;               //optional
00074   bool bdestructor;                                     //optional true if this is a destructor
00075   bool method;              //must
00076   expression* expr;         //optional
00077 };
00078 
00079 typedef list<member_declarator*> member_declarator_list;
00080 
00081 //global functions used by the parser
00082 void translation_unit_start();
00083 bool is_defined_class(const char* identifier);
00084 bool is_webservice_class(const char* classname);
00085 void add_member_declaration(string_list* decl_specs, member_declarator_list* member_decl_list);
00086 
00087 //global variables used by the parser
00088 extern TranslationUnit* g_pTranslationUnit; //ultimate container of parsed information
00089 extern string g_classname; //this holds the class name while the body of a class is being parsed.
00090 extern list<string> g_classesfound;
00091 extern int g_currentclasstype;
00092 extern WSClass* g_pCurrentWSClass;
00093 extern BeanClass* g_pCurrentBeanClass;
00094 extern int g_currentaccessspecifier;
00095 extern bool g_bdestructor_seen;
00096 
00097 #endif //__ACTIONS_H_INCLUDED__

Generated on Fri Apr 9 12:21:28 2004 for axiscpp by doxygen1.2.18