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

57 lines, 42 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::option_t UnimplOptionNum(BigStr* s);
38option_asdl::builtin_t LookupNormalBuiltin(BigStr* s);
39option_asdl::builtin_t LookupAssignBuiltin(BigStr* s);
40option_asdl::builtin_t LookupSpecialBuiltin(BigStr* s);
41bool IsControlFlow(BigStr* s);
42BigStr* ControlFlowName(int i);
43bool IsKeyword(BigStr* s);
44BigStr* LookupCharC(BigStr* c);
45BigStr* LookupCharPrompt(BigStr* c);
46
47BigStr* OptionName(option_asdl::option_t opt_num);
48
49Tuple2<runtime_asdl::state_t, runtime_asdl::emit_t> IfsEdge(runtime_asdl::state_t state, runtime_asdl::char_kind_t ch);
50
51extern BigStr* ASSIGN_ARG_RE;
52extern BigStr* TEST_V_RE;
53
54} // namespace consts
55
56#endif // CONSTS_H
57