OILS / _gen / frontend / consts.h View on Github | oilshell.org

55 lines, 40 significant
1#ifndef CONSTS_H
2#define CONSTS_H
3
4#include "mycpp/runtime.h"
5
6#include "_gen/frontend/id_kind.asdl.h"
7#include "_gen/frontend/option.asdl.h"
8#include "_gen/core/runtime.asdl.h"
9#include "_gen/frontend/types.asdl.h"
10
11namespace consts {
12
13extern List<int>* STRICT_ALL;
14extern List<int>* YSH_UPGRADE;
15extern List<int>* YSH_ALL;
16extern List<int>* DEFAULT_TRUE;
17extern List<int>* PARSE_OPTION_NUMS;
18extern List<int>* SHOPT_OPTION_NUMS;
19extern List<int>* SET_OPTION_NUMS;
20extern List<int>* VISIBLE_SHOPT_NUMS;
21extern List<BigStr*>* BUILTIN_NAMES;
22extern List<BigStr*>* OSH_KEYWORD_NAMES;
23extern List<BigStr*>* SET_OPTION_NAMES;
24extern List<BigStr*>* SHOPT_OPTION_NAMES;
25
26extern int NO_INDEX;
27
28extern BigStr* gVersion;
29
30int RedirDefaultFd(id_kind_asdl::Id_t id);
31types_asdl::redir_arg_type_t RedirArgType(id_kind_asdl::Id_t id);
32types_asdl::bool_arg_type_t BoolArgType(id_kind_asdl::Id_t id);
33id_kind_asdl::Kind GetKind(id_kind_asdl::Id_t id);
34
35types_asdl::opt_group_t OptionGroupNum(BigStr* s);
36option_asdl::option_t OptionNum(BigStr* s);
37option_asdl::builtin_t LookupNormalBuiltin(BigStr* s);
38option_asdl::builtin_t LookupAssignBuiltin(BigStr* s);
39option_asdl::builtin_t LookupSpecialBuiltin(BigStr* s);
40bool IsControlFlow(BigStr* s);
41BigStr* ControlFlowName(int i);
42bool IsKeyword(BigStr* s);
43BigStr* LookupCharC(BigStr* c);
44BigStr* LookupCharPrompt(BigStr* c);
45
46BigStr* OptionName(option_asdl::option_t opt_num);
47
48Tuple2<runtime_asdl::state_t, runtime_asdl::emit_t> IfsEdge(runtime_asdl::state_t state, runtime_asdl::char_kind_t ch);
49
50extern BigStr* ASSIGN_ARG_RE;
51
52} // namespace consts
53
54#endif // CONSTS_H
55