source: CMT/v1r12p20020606/src/cmt_parser.h @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 6.6 KB
Line 
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  */
8typedef enum
9{
10  Csh,
11  Sh,
12  Bat,
13  Make
14} PrintMode;
15
16typedef enum
17{
18  mgr_style,
19  cmt_style,
20  none_style
21} CmtDirStyle;
22
23/*
24  Commands correspond to keywords in the requirements file.
25  */
26typedef enum
27{
28  CommandNone,
29  CommandAlias,            /* alias            */
30  CommandApplication,      /* application      */
31  CommandApplyPattern,     /* apply_pattern    */
32  CommandAuthor,           /* author           */
33  CommandBranches,         /* branch           */
34  CommandBuildStrategy,    /* build strategy   */
35  CommandCleanupScript,    /* user script      */
36  CommandDocument,         /* document         */
37  CommandIgnorePattern,    /* ignore_pattern   */
38  CommandIncludeDirs,      /* include_dirs     */
39  CommandIncludePath,      /* include_path     */
40  CommandLanguage,         /* language         */
41  CommandLibrary,          /* library          */
42  CommandMacro,            /* macro            */
43  CommandMacroPrepend,     /* +macro           */
44  CommandMacroAppend,      /* macro+           */
45  CommandMacroRemove,      /* macro-           */
46  CommandMacroRemoveAll,   /* macro--          */
47  CommandMakeFragment,     /* make_fragment    */
48  CommandManager,          /* package manager  */
49  CommandPackage,          /* package name     */
50  CommandPath,             /* package path     */
51  CommandPathAppend,       /* path             */
52  CommandPathPrepend,      /* path             */
53  CommandPathRemove,       /* path             */
54  CommandPattern,          /* pattern          */
55  CommandPrivate,          /* private          */
56  CommandPublic,           /* public           */
57  CommandSet,              /* set              */
58  CommandSetAppend,        /* set_append       */
59  CommandSetPrepend,       /* set_prepend      */
60  CommandSetRemove,        /* set_remove       */
61  CommandSetupScript,      /* user script      */
62  CommandTag,              /* tag              */
63  CommandTagExclude,       /* tag_exclude      */
64  CommandUse,              /* use              */
65  CommandVersion,          /* package version  */
66  CommandVersionStrategy,  /* version strategy */
67  Commands
68} CommandType;
69
70/*
71  The scope is modified while the requirements file is read
72  when the keywords public or private are met.
73  It is also set to public when a used requirements file is read.
74  */
75
76typedef enum
77{
78  DeveloperMode,
79  UserMode
80} AccessMode;
81
82typedef enum
83{
84  ScopeUnspecified,
85  ScopePublic,
86  ScopePrivate
87} ScopeType;
88
89typedef enum
90{
91  Unspecified = -1,
92  Off = 0,
93  On = 1
94} State;
95
96typedef enum
97{
98  PriorityLowest = 0,
99  PriorityDefault = 1,
100  PriorityUname = 2,
101  PrioritySite = 3,
102  PriorityUserTag = 4,
103  PriorityTag = 5,
104  PriorityConfig = 6,
105  PriorityArgument = 7
106} Priority;
107
108typedef enum
109{
110  SetupScript,
111  CleanupScript
112} ScriptType;
113
114typedef enum
115{
116  BestFit,            // The current default
117  BestFitNoCheck,     // The current default without compatibility check
118  FirstChoice,        // The first reference will not be overridden
119  LastChoice,         // The last reference wins
120  KeepAll,            // Keep all uses
121
122  Strategies
123} VersionStrategy;
124
125//
126// Build strategy is a mix of various options
127//  + predefined values should be multiples of 2^n
128//  + effective value is an OR of these options
129//  + all options should be specified inthis enum as pairs
130//    of <option> - no<option>. One of them being preset to zero
131//    (which represents the default) the other being set to a unique 2^n value.
132//
133typedef enum
134{
135  PrototypesMask = 0x1,
136  Prototypes = 0x0,
137  NoPrototypes = PrototypesMask,
138
139  KeepMakefilesMask = 0x2,
140  RebuildMakefiles = 0x0,
141  KeepMakefiles = KeepMakefilesMask,
142
143  DefaultBuildStrategy = Prototypes | RebuildMakefiles
144} BuildStrategy;
145
146typedef enum
147{
148  Application,
149  Library,
150  Document
151} ConstituentType;
152
153/*
154  Command line action
155  */
156typedef enum
157{
158  action_none,
159  action_awk,
160  action_broadcast,
161
162  action_build_constituent_makefile,
163  action_build_constituents_makefile,
164  action_build_dependencies,
165  action_build_library_links,
166  action_build_make_setup,
167  action_build_msdev,
168  action_build_os9_makefile,
169  action_build_prototype,
170  action_build_readme,
171  action_build_tag_makefile,
172  action_build_temporary_name,
173  action_build_triggers,
174  action_build_windefs,
175
176  action_check_configuration,
177  action_check_files,
178  action_check_version,
179  action_checkout,          // HSG - add to handle the checkout command
180  action_cleanup,
181  action_config,
182  action_create,
183  action_cvsbranches,
184  action_cvssubpackages,
185  action_cvstags,
186  action_expand_model,
187  action_filter,            // CA  - handle free text filtering
188  action_help,
189  action_load,
190  action_lock,
191  action_remove,
192  action_remove_library_links,
193  action_run,
194  action_run_sequence,
195  action_setup,
196
197  action_show_all_tags,
198  action_show_applied_patterns,
199  action_show_author,                // s a
200  action_show_branches,              // s b
201  action_show_clients,               // s cl
202  action_show_constituent,
203  action_show_constituent_names,     // s c...
204  action_show_constituents,          // s c...
205  action_show_fragment,              // s f
206  action_show_fragments,             // s fragments
207  action_show_groups,                // s groups
208  action_show_include_dirs,
209  action_show_language,              // s l
210  action_show_languages,             // s languages
211  action_show_macro,                 // s m
212  action_show_macro_names,
213  action_show_macro_value,           // s macro_value
214  action_show_macros,                // s macros
215  action_show_manager,               // s manager
216  action_show_packages,              // s packages
217  action_show_path,                  // s path
218  action_show_pattern,
219  action_show_pattern_names,
220  action_show_patterns,
221  action_show_pwd,                   // s pwd
222  action_show_set,                   // s s
223  action_show_set_names,
224  action_show_set_value,             // s set_value
225  action_show_sets,                  // s sets
226  action_show_strategies,            // s strategies
227  action_show_tags,                  // s tags
228  action_show_uses,                  // s u
229  action_show_version,               // s version
230  action_show_versions,              // s versions
231
232  action_system,
233  action_unlock,
234  action_version
235} ActionType;
236
237#define SLASH '/'
238
239class Use;
240typedef Use* UseRef;
241
242#include "cmt_std.h"
243#include "cmt_string.h"
244#include "cmt_vector.h"
245#include "cmt.h"
246
247#endif
Note: See TracBrowser for help on using the repository browser.