ematch_syntax.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. /* A Bison parser, made by GNU Bison 3.5.1. */
  2. /* Bison interface for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
  4. Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* Undocumented macros, especially those whose name start with YY_,
  27. are private implementation details. Do not rely on them. */
  28. #ifndef YY_EMATCH_ROUTE_CLS_EMATCH_SYNTAX_H_INCLUDED
  29. # define YY_EMATCH_ROUTE_CLS_EMATCH_SYNTAX_H_INCLUDED
  30. /* Debug traces. */
  31. #ifndef YYDEBUG
  32. # define YYDEBUG 0
  33. #endif
  34. #if YYDEBUG
  35. extern int ematch_debug;
  36. #endif
  37. /* Token type. */
  38. #ifndef YYTOKENTYPE
  39. # define YYTOKENTYPE
  40. enum yytokentype
  41. {
  42. ERROR = 258,
  43. LOGIC = 259,
  44. NOT = 260,
  45. OPERAND = 261,
  46. NUMBER = 262,
  47. ALIGN = 263,
  48. LAYER = 264,
  49. KW_OPEN = 265,
  50. KW_CLOSE = 266,
  51. KW_PLUS = 267,
  52. KW_MASK = 268,
  53. KW_SHIFT = 269,
  54. KW_AT = 270,
  55. EMATCH_CMP = 271,
  56. EMATCH_NBYTE = 272,
  57. EMATCH_TEXT = 273,
  58. EMATCH_META = 274,
  59. KW_EQ = 275,
  60. KW_GT = 276,
  61. KW_LT = 277,
  62. KW_FROM = 278,
  63. KW_TO = 279,
  64. META_RANDOM = 280,
  65. META_LOADAVG_0 = 281,
  66. META_LOADAVG_1 = 282,
  67. META_LOADAVG_2 = 283,
  68. META_DEV = 284,
  69. META_PRIO = 285,
  70. META_PROTO = 286,
  71. META_PKTTYPE = 287,
  72. META_PKTLEN = 288,
  73. META_DATALEN = 289,
  74. META_MACLEN = 290,
  75. META_MARK = 291,
  76. META_TCINDEX = 292,
  77. META_RTCLASSID = 293,
  78. META_RTIIF = 294,
  79. META_SK_FAMILY = 295,
  80. META_SK_STATE = 296,
  81. META_SK_REUSE = 297,
  82. META_SK_REFCNT = 298,
  83. META_SK_RCVBUF = 299,
  84. META_SK_SNDBUF = 300,
  85. META_SK_SHUTDOWN = 301,
  86. META_SK_PROTO = 302,
  87. META_SK_TYPE = 303,
  88. META_SK_RMEM_ALLOC = 304,
  89. META_SK_WMEM_ALLOC = 305,
  90. META_SK_WMEM_QUEUED = 306,
  91. META_SK_RCV_QLEN = 307,
  92. META_SK_SND_QLEN = 308,
  93. META_SK_ERR_QLEN = 309,
  94. META_SK_FORWARD_ALLOCS = 310,
  95. META_SK_ALLOCS = 311,
  96. META_SK_ROUTE_CAPS = 312,
  97. META_SK_HASH = 313,
  98. META_SK_LINGERTIME = 314,
  99. META_SK_ACK_BACKLOG = 315,
  100. META_SK_MAX_ACK_BACKLOG = 316,
  101. META_SK_PRIO = 317,
  102. META_SK_RCVLOWAT = 318,
  103. META_SK_RCVTIMEO = 319,
  104. META_SK_SNDTIMEO = 320,
  105. META_SK_SENDMSG_OFF = 321,
  106. META_SK_WRITE_PENDING = 322,
  107. META_VLAN = 323,
  108. META_RXHASH = 324,
  109. META_DEVNAME = 325,
  110. META_SK_BOUND_IF = 326,
  111. STR = 327,
  112. QUOTED = 328
  113. };
  114. #endif
  115. /* Tokens. */
  116. #define ERROR 258
  117. #define LOGIC 259
  118. #define NOT 260
  119. #define OPERAND 261
  120. #define NUMBER 262
  121. #define ALIGN 263
  122. #define LAYER 264
  123. #define KW_OPEN 265
  124. #define KW_CLOSE 266
  125. #define KW_PLUS 267
  126. #define KW_MASK 268
  127. #define KW_SHIFT 269
  128. #define KW_AT 270
  129. #define EMATCH_CMP 271
  130. #define EMATCH_NBYTE 272
  131. #define EMATCH_TEXT 273
  132. #define EMATCH_META 274
  133. #define KW_EQ 275
  134. #define KW_GT 276
  135. #define KW_LT 277
  136. #define KW_FROM 278
  137. #define KW_TO 279
  138. #define META_RANDOM 280
  139. #define META_LOADAVG_0 281
  140. #define META_LOADAVG_1 282
  141. #define META_LOADAVG_2 283
  142. #define META_DEV 284
  143. #define META_PRIO 285
  144. #define META_PROTO 286
  145. #define META_PKTTYPE 287
  146. #define META_PKTLEN 288
  147. #define META_DATALEN 289
  148. #define META_MACLEN 290
  149. #define META_MARK 291
  150. #define META_TCINDEX 292
  151. #define META_RTCLASSID 293
  152. #define META_RTIIF 294
  153. #define META_SK_FAMILY 295
  154. #define META_SK_STATE 296
  155. #define META_SK_REUSE 297
  156. #define META_SK_REFCNT 298
  157. #define META_SK_RCVBUF 299
  158. #define META_SK_SNDBUF 300
  159. #define META_SK_SHUTDOWN 301
  160. #define META_SK_PROTO 302
  161. #define META_SK_TYPE 303
  162. #define META_SK_RMEM_ALLOC 304
  163. #define META_SK_WMEM_ALLOC 305
  164. #define META_SK_WMEM_QUEUED 306
  165. #define META_SK_RCV_QLEN 307
  166. #define META_SK_SND_QLEN 308
  167. #define META_SK_ERR_QLEN 309
  168. #define META_SK_FORWARD_ALLOCS 310
  169. #define META_SK_ALLOCS 311
  170. #define META_SK_ROUTE_CAPS 312
  171. #define META_SK_HASH 313
  172. #define META_SK_LINGERTIME 314
  173. #define META_SK_ACK_BACKLOG 315
  174. #define META_SK_MAX_ACK_BACKLOG 316
  175. #define META_SK_PRIO 317
  176. #define META_SK_RCVLOWAT 318
  177. #define META_SK_RCVTIMEO 319
  178. #define META_SK_SNDTIMEO 320
  179. #define META_SK_SENDMSG_OFF 321
  180. #define META_SK_WRITE_PENDING 322
  181. #define META_VLAN 323
  182. #define META_RXHASH 324
  183. #define META_DEVNAME 325
  184. #define META_SK_BOUND_IF 326
  185. #define STR 327
  186. #define QUOTED 328
  187. /* Value type. */
  188. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  189. union YYSTYPE
  190. {
  191. #line 39 "route/cls/ematch_syntax.y"
  192. struct tcf_em_cmp cmp;
  193. struct ematch_quoted q;
  194. struct rtnl_ematch * e;
  195. struct rtnl_pktloc * loc;
  196. struct rtnl_meta_value *mv;
  197. uint32_t i;
  198. uint64_t i64;
  199. char * s;
  200. #line 214 "route/cls/ematch_syntax.h"
  201. };
  202. typedef union YYSTYPE YYSTYPE;
  203. # define YYSTYPE_IS_TRIVIAL 1
  204. # define YYSTYPE_IS_DECLARED 1
  205. #endif
  206. int ematch_parse (void *scanner, char **errp, struct nl_list_head *root);
  207. #endif /* !YY_EMATCH_ROUTE_CLS_EMATCH_SYNTAX_H_INCLUDED */