source: CMT/HEAD/source/cmt_parser.h

Last change on this file was 663, checked in by rybkin, 10 years ago

See C.L. 522

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