[1] | 1 | #ifndef __cmt_parser_h__ |
---|
| 2 | #define __cmt_parser_h__ |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | Generation of shell scripts : |
---|
| 6 | We consider for the moment only csh and sh |
---|
| 7 | */ |
---|
| 8 | typedef enum |
---|
| 9 | { |
---|
| 10 | Csh, |
---|
| 11 | Sh, |
---|
| 12 | Bat, |
---|
| 13 | Make |
---|
| 14 | } PrintMode; |
---|
| 15 | |
---|
| 16 | typedef enum |
---|
| 17 | { |
---|
| 18 | mgr_style, |
---|
| 19 | cmt_style, |
---|
| 20 | no_version_style, |
---|
| 21 | none_style |
---|
| 22 | } CmtDirStyle; |
---|
| 23 | |
---|
| 24 | typedef enum |
---|
| 25 | { |
---|
| 26 | with_version_directory, |
---|
| 27 | without_version_directory |
---|
| 28 | } CmtStructuringStyle; |
---|
| 29 | |
---|
| 30 | typedef enum |
---|
| 31 | { |
---|
| 32 | default_filtering_mode, |
---|
| 33 | block_private_uses, |
---|
| 34 | reach_private_uses |
---|
| 35 | } CmtScopeFilteringMode; |
---|
| 36 | |
---|
| 37 | /* |
---|
| 38 | Commands correspond to keywords in the requirements file. |
---|
| 39 | */ |
---|
| 40 | typedef enum |
---|
| 41 | { |
---|
| 42 | CommandNone, |
---|
| 43 | CommandAlias, |
---|
| 44 | CommandApplication, |
---|
| 45 | CommandApplyPattern, |
---|
| 46 | CommandApplyTag, |
---|
| 47 | CommandAuthor, |
---|
| 48 | CommandBranches, |
---|
| 49 | CommandBuildStrategy, |
---|
| 50 | CommandCleanupScript, |
---|
| 51 | CommandCmtPathPattern, |
---|
| 52 | CommandDocument, |
---|
| 53 | CommandIgnorePattern, |
---|
| 54 | CommandIncludeDirs, |
---|
| 55 | CommandIncludePath, |
---|
| 56 | CommandLanguage, |
---|
| 57 | CommandLibrary, |
---|
| 58 | CommandMacro, |
---|
| 59 | CommandMacroPrepend, |
---|
| 60 | CommandMacroAppend, |
---|
| 61 | CommandMacroRemove, |
---|
| 62 | CommandMacroRemoveAll, |
---|
| 63 | CommandMakeFragment, |
---|
| 64 | CommandManager, |
---|
| 65 | CommandPackage, |
---|
| 66 | CommandPath, |
---|
| 67 | CommandPathAppend, |
---|
| 68 | CommandPathPrepend, |
---|
| 69 | CommandPathRemove, |
---|
| 70 | CommandPattern, |
---|
| 71 | CommandPrivate, |
---|
| 72 | CommandProject, |
---|
| 73 | CommandPublic, |
---|
| 74 | CommandSet, |
---|
| 75 | CommandSetAppend, |
---|
| 76 | CommandSetPrepend, |
---|
| 77 | CommandSetRemove, |
---|
| 78 | CommandSetupScript, |
---|
| 79 | CommandSetupStrategy, |
---|
| 80 | CommandTag, |
---|
| 81 | CommandTagExclude, |
---|
| 82 | CommandUse, |
---|
| 83 | CommandVersion, |
---|
| 84 | CommandVersionStrategy, |
---|
| 85 | Commands |
---|
| 86 | } CommandType; |
---|
| 87 | |
---|
| 88 | /* |
---|
| 89 | The scope is modified while the requirements file is read |
---|
| 90 | when the keywords public or private are met. |
---|
| 91 | It is also set to public when a used requirements file is read. |
---|
| 92 | */ |
---|
| 93 | |
---|
| 94 | typedef enum |
---|
| 95 | { |
---|
| 96 | DeveloperMode, |
---|
| 97 | UserMode |
---|
| 98 | } AccessMode; |
---|
| 99 | |
---|
| 100 | typedef enum |
---|
| 101 | { |
---|
| 102 | ScopeUnspecified, |
---|
| 103 | ScopePublic, |
---|
| 104 | ScopePrivate |
---|
| 105 | } ScopeType; |
---|
| 106 | |
---|
| 107 | typedef enum |
---|
| 108 | { |
---|
| 109 | Unspecified = -1, |
---|
| 110 | Off = 0, |
---|
| 111 | On = 1 |
---|
| 112 | } State; |
---|
| 113 | |
---|
| 114 | typedef enum |
---|
| 115 | { |
---|
| 116 | PriorityLowest = 0, |
---|
| 117 | PriorityDefault = 1, |
---|
| 118 | PriorityVersion = 2, |
---|
| 119 | PriorityUname = 3, |
---|
| 120 | PrioritySite = 4, |
---|
| 121 | PriorityUserTag = 5, |
---|
| 122 | PriorityTag = 6, |
---|
| 123 | PriorityConfig = 7, |
---|
| 124 | PriorityArgument = 8 |
---|
| 125 | } Priority; |
---|
| 126 | |
---|
| 127 | typedef enum |
---|
| 128 | { |
---|
| 129 | SetupScript, |
---|
| 130 | CleanupScript |
---|
| 131 | } ScriptType; |
---|
| 132 | |
---|
| 133 | typedef enum |
---|
| 134 | { |
---|
| 135 | BestFit, // The current default |
---|
| 136 | BestFitNoCheck, // The current default without compatibility check |
---|
| 137 | FirstChoice, // The first reference will not be overridden |
---|
| 138 | LastChoice, // The last reference wins |
---|
| 139 | KeepAll, // Keep all uses |
---|
| 140 | |
---|
| 141 | Strategies |
---|
| 142 | } VersionStrategy; |
---|
| 143 | |
---|
| 144 | // |
---|
| 145 | // Build strategy is a mix of various options |
---|
| 146 | // + predefined values should be multiples of 2^n |
---|
| 147 | // + effective value is an OR of these options |
---|
| 148 | // + all options should be specified inthis enum as pairs |
---|
| 149 | // of <option> - no<option>. One of them being preset to zero |
---|
| 150 | // (which represents the default) the other being set to a unique 2^n value. |
---|
| 151 | // |
---|
| 152 | typedef enum |
---|
| 153 | { |
---|
| 154 | PrototypesMask = 0x1, |
---|
| 155 | Prototypes = 0x0, |
---|
| 156 | NoPrototypes = PrototypesMask, |
---|
| 157 | |
---|
| 158 | KeepMakefilesMask = 0x2, |
---|
| 159 | RebuildMakefiles = 0x0, |
---|
| 160 | KeepMakefiles = KeepMakefilesMask, |
---|
| 161 | |
---|
| 162 | InstallAreaMask = 0x4, |
---|
| 163 | WithInstallArea = 0x0, |
---|
| 164 | WithoutInstallArea = InstallAreaMask, |
---|
| 165 | |
---|
| 166 | DefaultBuildStrategy = Prototypes | RebuildMakefiles | WithInstallArea |
---|
| 167 | } BuildStrategy; |
---|
| 168 | |
---|
| 169 | typedef enum |
---|
| 170 | { |
---|
| 171 | SetupConfigMask = 0x1, |
---|
| 172 | SetupConfig = 0x0, |
---|
| 173 | SetupNoConfig = SetupConfigMask, |
---|
| 174 | |
---|
| 175 | SetupRootMask = 0x2, |
---|
| 176 | SetupRoot = 0x0, |
---|
| 177 | SetupNoRoot = SetupRootMask, |
---|
| 178 | |
---|
| 179 | SetupCleanupMask = 0x4, |
---|
| 180 | SetupCleanup = 0x0, |
---|
| 181 | SetupNoCleanup = SetupCleanupMask, |
---|
| 182 | |
---|
| 183 | DefaultSetupStrategy = SetupConfig | SetupRoot | SetupCleanup |
---|
| 184 | } SetupStrategy; |
---|
| 185 | |
---|
| 186 | typedef enum |
---|
| 187 | { |
---|
| 188 | Application, |
---|
| 189 | Library, |
---|
| 190 | Document |
---|
| 191 | } ConstituentType; |
---|
| 192 | |
---|
| 193 | /* |
---|
| 194 | Command line action |
---|
| 195 | */ |
---|
| 196 | typedef enum |
---|
| 197 | { |
---|
| 198 | action_none, |
---|
| 199 | action_awk, |
---|
| 200 | action_broadcast, |
---|
| 201 | |
---|
| 202 | action_build, |
---|
| 203 | |
---|
| 204 | action_build_constituent_makefile, |
---|
| 205 | action_build_constituents_makefile, |
---|
| 206 | action_build_dependencies, |
---|
| 207 | action_build_library_links, |
---|
| 208 | action_build_make_setup, |
---|
| 209 | action_build_msdev, |
---|
| 210 | action_build_CMT_pacman, |
---|
| 211 | // Visual Studio.net Support |
---|
| 212 | action_build_vsnet, |
---|
| 213 | action_build_os9_makefile, |
---|
| 214 | action_build_prototype, |
---|
| 215 | action_build_readme, |
---|
| 216 | action_build_tag_makefile, |
---|
| 217 | action_build_temporary_name, |
---|
| 218 | action_build_triggers, |
---|
| 219 | action_build_windefs, |
---|
| 220 | |
---|
| 221 | action_check, |
---|
| 222 | |
---|
| 223 | action_check_configuration, |
---|
| 224 | action_check_files, |
---|
| 225 | action_check_version, |
---|
| 226 | action_checkout, |
---|
| 227 | action_cleanup, |
---|
| 228 | action_config, |
---|
| 229 | action_create, |
---|
| 230 | action_cvsbranches, |
---|
| 231 | action_cvssubpackages, |
---|
| 232 | action_cvstags, |
---|
| 233 | action_expand_model, |
---|
| 234 | action_filter, |
---|
| 235 | action_help, |
---|
| 236 | action_load, |
---|
| 237 | action_lock, |
---|
| 238 | action_remove, |
---|
| 239 | action_remove_library_links, |
---|
| 240 | action_run, |
---|
| 241 | action_run_sequence, |
---|
| 242 | |
---|
| 243 | action_set_version, |
---|
| 244 | action_set_versions, |
---|
| 245 | |
---|
| 246 | action_setup, |
---|
| 247 | |
---|
| 248 | action_show, |
---|
| 249 | |
---|
| 250 | action_show_all_tags, |
---|
| 251 | action_show_applied_patterns, |
---|
| 252 | action_show_author, |
---|
| 253 | action_show_branches, |
---|
| 254 | action_show_clients, |
---|
| 255 | action_show_cmtpath_patterns, |
---|
| 256 | action_show_constituent, |
---|
| 257 | action_show_constituent_names, |
---|
| 258 | action_show_constituents, |
---|
| 259 | action_show_cycles, |
---|
| 260 | action_show_fragment, |
---|
| 261 | action_show_fragments, |
---|
| 262 | action_show_groups, |
---|
| 263 | action_show_include_dirs, |
---|
| 264 | action_show_language, |
---|
| 265 | action_show_languages, |
---|
| 266 | action_show_macro, |
---|
| 267 | action_show_macro_value, |
---|
| 268 | action_show_macro_names, |
---|
| 269 | action_show_macros, |
---|
| 270 | action_show_manager, |
---|
| 271 | action_show_packages, |
---|
| 272 | action_show_path, |
---|
| 273 | action_show_pattern, |
---|
| 274 | action_show_pattern_names, |
---|
| 275 | action_show_patterns, |
---|
| 276 | action_show_projects, |
---|
| 277 | action_show_setup, |
---|
| 278 | action_show_pwd, |
---|
| 279 | action_show_set, |
---|
| 280 | action_show_set_names, |
---|
| 281 | action_show_set_value, |
---|
| 282 | action_show_sets, |
---|
| 283 | action_show_strategies, |
---|
| 284 | action_show_tags, |
---|
| 285 | action_show_use_paths, |
---|
| 286 | action_show_uses, |
---|
| 287 | action_show_version, |
---|
| 288 | action_show_versions, |
---|
| 289 | |
---|
| 290 | action_system, |
---|
| 291 | action_unlock, |
---|
| 292 | action_version |
---|
| 293 | } ActionType; |
---|
| 294 | |
---|
| 295 | #define SLASH '/' |
---|
| 296 | |
---|
| 297 | class Use; |
---|
| 298 | typedef Use* UseRef; |
---|
| 299 | |
---|
| 300 | #include "cmt_std.h" |
---|
| 301 | #include "cmt_string.h" |
---|
| 302 | #include "cmt_vector.h" |
---|
| 303 | #include "cmt.h" |
---|
| 304 | |
---|
| 305 | #endif |
---|