| 1 |
/* |
| 2 |
* Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. |
| 3 |
* SPDX-License-Identifier: HPND |
| 4 |
*/ |
| 5 |
#pragma once |
| 6 |
|
| 7 |
#include "config.h" |
| 8 |
|
| 9 |
#include "ast.h" |
| 10 |
#include "scanner-utils.h" |
| 11 |
|
| 12 |
ExprDef * |
| 13 |
ExprCreateString(xkb_atom_t str); |
| 14 |
|
| 15 |
ExprDef * |
| 16 |
ExprCreateInteger(int64_t ival); |
| 17 |
|
| 18 |
ExprDef * |
| 19 |
ExprCreateFloat(void); |
| 20 |
|
| 21 |
ExprDef * |
| 22 |
ExprCreateBoolean(bool set); |
| 23 |
|
| 24 |
ExprDef * |
| 25 |
ExprCreateKeyName(xkb_atom_t key_name); |
| 26 |
|
| 27 |
ExprDef * |
| 28 |
ExprCreateKeySym(xkb_keysym_t keysym); |
| 29 |
|
| 30 |
ExprDef * |
| 31 |
ExprCreateIdent(xkb_atom_t ident); |
| 32 |
|
| 33 |
ExprDef * |
| 34 |
ExprCreateUnary(enum stmt_type op, ExprDef *child); |
| 35 |
|
| 36 |
ExprDef * |
| 37 |
ExprCreateBinary(enum stmt_type op, ExprDef *left, ExprDef *right); |
| 38 |
|
| 39 |
ExprDef * |
| 40 |
ExprCreateFieldRef(xkb_atom_t element, xkb_atom_t field); |
| 41 |
|
| 42 |
ExprDef * |
| 43 |
ExprCreateArrayRef(xkb_atom_t element, xkb_atom_t field, ExprDef *entry); |
| 44 |
|
| 45 |
ExprDef * |
| 46 |
ExprEmptyList(void); |
| 47 |
|
| 48 |
ExprDef * |
| 49 |
ExprCreateAction(xkb_atom_t name, ExprDef *args); |
| 50 |
|
| 51 |
ExprDef * |
| 52 |
ExprCreateActionList(ExprDef *actions); |
| 53 |
|
| 54 |
ExprDef * |
| 55 |
ExprCreateKeySymList(xkb_keysym_t sym); |
| 56 |
|
| 57 |
ExprDef * |
| 58 |
ExprAppendKeySymList(ExprDef *list, xkb_keysym_t sym); |
| 59 |
|
| 60 |
ExprDef * |
| 61 |
ExprKeySymListAppendString(struct scanner *param, |
| 62 |
ExprDef *expr, const char *string); |
| 63 |
|
| 64 |
xkb_keysym_t |
| 65 |
KeysymParseString(struct scanner *scanner, const char *string); |
| 66 |
|
| 67 |
KeycodeDef * |
| 68 |
KeycodeCreate(xkb_atom_t name, int64_t value); |
| 69 |
|
| 70 |
KeyAliasDef * |
| 71 |
KeyAliasCreate(xkb_atom_t alias, xkb_atom_t real); |
| 72 |
|
| 73 |
VModDef * |
| 74 |
VModCreate(xkb_atom_t name, ExprDef *value); |
| 75 |
|
| 76 |
VarDef * |
| 77 |
VarCreate(ExprDef *name, ExprDef *value); |
| 78 |
|
| 79 |
VarDef * |
| 80 |
BoolVarCreate(xkb_atom_t ident, bool set); |
| 81 |
|
| 82 |
InterpDef * |
| 83 |
InterpCreate(xkb_keysym_t sym, ExprDef *match); |
| 84 |
|
| 85 |
KeyTypeDef * |
| 86 |
KeyTypeCreate(xkb_atom_t name, VarDef *body); |
| 87 |
|
| 88 |
SymbolsDef * |
| 89 |
SymbolsCreate(xkb_atom_t keyName, VarDef *symbols); |
| 90 |
|
| 91 |
GroupCompatDef * |
| 92 |
GroupCompatCreate(int64_t group, ExprDef *def); |
| 93 |
|
| 94 |
ModMapDef * |
| 95 |
ModMapCreate(xkb_atom_t modifier, ExprDef *keys); |
| 96 |
|
| 97 |
LedMapDef * |
| 98 |
LedMapCreate(xkb_atom_t name, VarDef *body); |
| 99 |
|
| 100 |
LedNameDef * |
| 101 |
LedNameCreate(int64_t ndx, ExprDef *name, bool virtual); |
| 102 |
|
| 103 |
IncludeStmt * |
| 104 |
IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge); |
| 105 |
|
| 106 |
XkbFile * |
| 107 |
XkbFileCreate(enum xkb_file_type type, char *name, ParseCommon *defs, |
| 108 |
enum xkb_map_flags flags); |
| 109 |
|
| 110 |
void |
| 111 |
FreeStmt(ParseCommon *stmt); |