cmt_parser.h Source File

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

# cmt_parser.h

Go to the documentation of this file.

    00001 #ifndef __cmt_parser_h__
    00002 #define __cmt_parser_h__
    00003
    00004 /*
    00005   Generation of shell scripts :
    00006   We consider for the moment only csh and sh
    00007   */
    00008 typedef enum
    00009 {
    00010   Csh,
    00011   Sh,
    00012   Bat,
    00013   Make
    00014 } PrintMode;
    00015
    00016 typedef enum
    00017 {
    00018   mgr_style,
    00019   cmt_style,
    00020   none_style
    00021 } CmtDirStyle;
    00022
    00023 /*
    00024   Commands correspond to keywords in the requirements file.
    00025   */
    00026 typedef enum
    00027 {
    00028   CommandNone,
    00029   CommandAlias,            /* alias            */
    00030   CommandApplication,      /* application      */
    00031   CommandApplyPattern,     /* apply_pattern    */
    00032   CommandAuthor,           /* author           */
    00033   CommandBranches,         /* branch           */
    00034   CommandBuildStrategy,    /* build strategy   */
    00035   CommandCleanupScript,    /* user script      */
    00036   CommandDocument,         /* document         */
    00037   CommandIgnorePattern,    /* ignore_pattern   */
    00038   CommandIncludeDirs,      /* include_dirs     */
    00039   CommandIncludePath,      /* include_path     */
    00040   CommandLanguage,         /* language         */
    00041   CommandLibrary,          /* library          */
    00042   CommandMacro,            /* macro            */
    00043   CommandMacroPrepend,     /* +macro           */
    00044   CommandMacroAppend,      /* macro+           */
    00045   CommandMacroRemove,      /* macro-           */
    00046   CommandMacroRemoveAll,   /* macro--          */
    00047   CommandMakeFragment,     /* make_fragment    */
    00048   CommandManager,          /* package manager  */
    00049   CommandPackage,          /* package name     */
    00050   CommandPath,             /* package path     */
    00051   CommandPathAppend,       /* path             */
    00052   CommandPathPrepend,      /* path             */
    00053   CommandPathRemove,       /* path             */
    00054   CommandPattern,          /* pattern          */
    00055   CommandPrivate,          /* private          */
    00056   CommandPublic,           /* public           */
    00057   CommandSet,              /* set              */
    00058   CommandSetAppend,        /* set_append       */
    00059   CommandSetPrepend,       /* set_prepend      */
    00060   CommandSetRemove,        /* set_remove       */
    00061   CommandSetupScript,      /* user script      */
    00062   CommandTag,              /* tag              */
    00063   CommandTagExclude,       /* tag_exclude      */
    00064   CommandUse,              /* use              */
    00065   CommandVersion,          /* package version  */
    00066   CommandVersionStrategy,  /* version strategy */
    00067   Commands
    00068 } CommandType;
    00069
    00070 /*
    00071   The scope is modified while the requirements file is read
    00072   when the keywords public or private are met.
    00073   It is also set to public when a used requirements file is read.
    00074   */
    00075
    00076 typedef enum
    00077 {
    00078   DeveloperMode,
    00079   UserMode
    00080 } AccessMode;
    00081
    00082 typedef enum
    00083 {
    00084   ScopeUnspecified,
    00085   ScopePublic,
    00086   ScopePrivate
    00087 } ScopeType;
    00088
    00089 typedef enum
    00090 {
    00091   Unspecified = -1,
    00092   Off = 0,
    00093   On = 1
    00094 } State;
    00095
    00096 typedef enum
    00097 {
    00098   PriorityLowest = 0,
    00099   PriorityDefault = 1,
    00100   PriorityUname = 2,
    00101   PrioritySite = 3,
    00102   PriorityUserTag = 4,
    00103   PriorityTag = 5,
    00104   PriorityConfig = 6,
    00105   PriorityArgument = 7
    00106 } Priority;
    00107
    00108 typedef enum
    00109 {
    00110   SetupScript,
    00111   CleanupScript
    00112 } ScriptType;
    00113
    00114 typedef enum
    00115 {
    00116   BestFit,            // The current default
    00117   BestFitNoCheck,     // The current default without compatibility check
    00118   FirstChoice,        // The first reference will not be overridden
    00119   LastChoice,         // The last reference wins
    00120   KeepAll,            // Keep all uses
    00121
    00122   Strategies
    00123 } VersionStrategy;
    00124
    00125 //
    00126 // Build strategy is a mix of various options
    00127 //  + predefined values should be multiples of 2^n
    00128 //  + effective value is an OR of these options
    00129 //  + all options should be specified inthis enum as pairs
    00130 //    of <option> - no<option>. One of them being preset to zero
    00131 //    (which represents the default) the other being set to a unique 2^n value.
    00132 //
    00133 typedef enum
    00134 {
    00135   PrototypesMask = 0x1,
    00136   Prototypes = 0x0,
    00137   NoPrototypes = PrototypesMask,
    00138
    00139   KeepMakefilesMask = 0x2,
    00140   RebuildMakefiles = 0x0,
    00141   KeepMakefiles = KeepMakefilesMask,
    00142
    00143   DefaultBuildStrategy = Prototypes | RebuildMakefiles
    00144 } BuildStrategy;
    00145
    00146 typedef enum
    00147 {
    00148   Application,
    00149   Library,
    00150   Document
    00151 } ConstituentType;
    00152
    00153 /*
    00154   Command line action
    00155   */
    00156 typedef enum
    00157 {
    00158   action_none,
    00159   action_awk,
    00160   action_broadcast,
    00161
    00162   action_build_constituent_makefile,
    00163   action_build_constituents_makefile,
    00164   action_build_dependencies,
    00165   action_build_library_links,
    00166   action_build_make_setup,
    00167   action_build_msdev,
    00168   action_build_os9_makefile,
    00169   action_build_prototype,
    00170   action_build_readme,
    00171   action_build_tag_makefile,
    00172   action_build_temporary_name,
    00173   action_build_triggers,
    00174   action_build_windefs,
    00175
    00176   action_check_configuration,
    00177   action_check_files,
    00178   action_check_version,
    00179   action_checkout,          // HSG - add to handle the checkout command
    00180   action_cleanup,
    00181   action_config,
    00182   action_create,
    00183   action_cvsbranches,
    00184   action_cvssubpackages,
    00185   action_cvstags,
    00186   action_expand_model,
    00187   action_filter,            // CA  - handle free text filtering
    00188   action_help,
    00189   action_load,
    00190   action_lock,
    00191   action_remove,
    00192   action_remove_library_links,
    00193   action_run,
    00194   action_run_sequence,
    00195   action_setup,
    00196
    00197   action_show_all_tags,
    00198   action_show_applied_patterns,
    00199   action_show_author,                // s a
    00200   action_show_branches,              // s b
    00201   action_show_clients,               // s cl
    00202   action_show_constituent,
    00203   action_show_constituent_names,     // s c...
    00204   action_show_constituents,          // s c...
    00205   action_show_fragment,              // s f
    00206   action_show_fragments,             // s fragments
    00207   action_show_groups,                // s groups
    00208   action_show_include_dirs,
    00209   action_show_language,              // s l
    00210   action_show_languages,             // s languages
    00211   action_show_macro,                 // s m
    00212   action_show_macro_names,
    00213   action_show_macro_value,           // s macro_value
    00214   action_show_macros,                // s macros
    00215   action_show_manager,               // s manager
    00216   action_show_packages,              // s packages
    00217   action_show_path,                  // s path
    00218   action_show_pattern,
    00219   action_show_pattern_names,
    00220   action_show_patterns,
    00221   action_show_pwd,                   // s pwd
    00222   action_show_set,                   // s s
    00223   action_show_set_names,
    00224   action_show_set_value,             // s set_value
    00225   action_show_sets,                  // s sets
    00226   action_show_strategies,            // s strategies
    00227   action_show_tags,                  // s tags
    00228   action_show_uses,                  // s u
    00229   action_show_version,               // s version
    00230   action_show_versions,              // s versions
    00231
    00232   action_system,
    00233   action_unlock,
    00234   action_version
    00235 } ActionType;
    00236
    00237 #define SLASH '/'
    00238
    00239 class Use;
    00240 typedef Use* UseRef;
    00241
    00242 #include "cmt_std.h"
    00243 #include "cmt_string.h"
    00244 #include "cmt_vector.h"
    00245 #include "cmt.h"
    00246
    00247 #endif