Motr  M0
sem.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_XCODE_FF2C_SEM_H__
26 #define __MOTR_XCODE_FF2C_SEM_H__
27 
33 #include <stdbool.h>
34 
35 /* import */
36 struct ff2c_term;
37 
38 /* export */
39 struct ff2c_require;
40 struct ff2c_type;
41 struct ff2c_field;
42 struct ff2c_escape;
43 struct ff2c_list;
44 
45 struct ff2c_list {
46  void *l_head;
47  void *l_tail;
48 };
49 
50 struct ff2c_require {
52  const char *r_path;
53 };
54 
55 struct ff2c_type {
56  struct ff2c_type *t_next;
57  const struct ff2c_term *t_term;
58  const char *t_name;
59  const char *t_xc_name;
60  const char *t_c_name;
61  bool t_compound;
62  bool t_atomic;
63  bool t_opaque;
64  bool t_sequence;
65  bool t_array;
66  bool t_union;
67  bool t_record;
68  bool t_public;
69  int t_nr;
71 };
72 
73 struct ff2c_field {
74  struct ff2c_field *f_next;
76  struct ff2c_type *f_type;
77  const char *f_name;
78  const char *f_c_name;
79  const char *f_decl;
80  const char *f_xc_type;
81  const char *f_tag;
82  const char *f_escape;
83 };
84 
85 struct ff2c_escape {
87  const char *e_escape;
88 };
89 
90 struct ff2c_ff {
94 };
95 
96 void ff2c_sem_init(struct ff2c_ff *ff, struct ff2c_term *top);
97 void ff2c_sem_fini(struct ff2c_ff *ff);
98 
99 char *fmt(const char *format, ...) __attribute__((format(printf, 1, 2)));
100 
103 /* __MOTR_XCODE_FF2C_SEM_H__ */
104 #endif
105 
106 /*
107  * Local variables:
108  * c-indentation-style: "K&R"
109  * c-basic-offset: 8
110  * tab-width: 8
111  * fill-column: 80
112  * scroll-step: 1
113  * End:
114  */
const char * f_escape
Definition: sem.h:82
bool t_sequence
Definition: sem.h:64
bool t_array
Definition: sem.h:65
struct ff2c_type * f_parent
Definition: sem.h:75
struct ff2c_list t_field
Definition: sem.h:70
void ff2c_sem_fini(struct ff2c_ff *ff)
Definition: sem.c:267
Definition: sem.h:73
Definition: sem.h:90
const char * t_xc_name
Definition: sem.h:59
bool t_union
Definition: sem.h:66
enum m0_md_lustre_logrec_type __attribute__
Definition: balloc.c:2745
Definition: xcode.c:59
const char * r_path
Definition: sem.h:52
int t_nr
Definition: sem.h:69
void * l_tail
Definition: sem.h:47
bool t_public
Definition: sem.h:68
static int ff(struct ff2c_context *ctx, struct ff2c_term *term)
Definition: parser.c:212
const struct ff2c_term * t_term
Definition: sem.h:57
struct ff2c_list ff_type
Definition: sem.h:92
Definition: sem.h:45
struct ff2c_list ff_require
Definition: sem.h:91
char * fmt(const char *format,...) __attribute__((format(printf
bool t_record
Definition: sem.h:67
bool t_atomic
Definition: sem.h:62
const char * t_c_name
Definition: sem.h:60
struct ff2c_require * r_next
Definition: sem.h:51
void ff2c_sem_init(struct ff2c_ff *ff, struct ff2c_term *top)
Definition: sem.c:247
bool t_opaque
Definition: sem.h:63
struct ff2c_type * t_next
Definition: sem.h:56
struct ff2c_field * f_next
Definition: sem.h:74
format
Definition: hist.py:128
struct ff2c_type * f_type
Definition: sem.h:76
bool t_compound
Definition: sem.h:61
const char * f_tag
Definition: sem.h:81
const char * f_c_name
Definition: sem.h:78
const char * f_name
Definition: sem.h:77
const char * e_escape
Definition: sem.h:87
const char * f_xc_type
Definition: sem.h:80
const char * t_name
Definition: sem.h:58
Definition: sem.h:55
const char * f_decl
Definition: sem.h:79
struct ff2c_escape * e_next
Definition: sem.h:86
void * l_head
Definition: sem.h:46
struct ff2c_list ff_escape
Definition: sem.h:93