rails-graphql 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +19 -0
  4. data/Rakefile +31 -0
  5. data/ext/depend +3 -0
  6. data/ext/extconf.rb +57 -0
  7. data/ext/graphqlparser/Ast.cpp +346 -0
  8. data/ext/graphqlparser/Ast.h +1214 -0
  9. data/ext/graphqlparser/AstNode.h +36 -0
  10. data/ext/graphqlparser/AstVisitor.h +137 -0
  11. data/ext/graphqlparser/GraphQLParser.cpp +76 -0
  12. data/ext/graphqlparser/GraphQLParser.h +55 -0
  13. data/ext/graphqlparser/JsonVisitor.cpp +161 -0
  14. data/ext/graphqlparser/JsonVisitor.cpp.inc +456 -0
  15. data/ext/graphqlparser/JsonVisitor.h +121 -0
  16. data/ext/graphqlparser/JsonVisitor.h.inc +110 -0
  17. data/ext/graphqlparser/VERSION +1 -0
  18. data/ext/graphqlparser/c/GraphQLAst.cpp +324 -0
  19. data/ext/graphqlparser/c/GraphQLAst.h +180 -0
  20. data/ext/graphqlparser/c/GraphQLAstForEachConcreteType.h +44 -0
  21. data/ext/graphqlparser/c/GraphQLAstNode.cpp +25 -0
  22. data/ext/graphqlparser/c/GraphQLAstNode.h +33 -0
  23. data/ext/graphqlparser/c/GraphQLAstToJSON.cpp +21 -0
  24. data/ext/graphqlparser/c/GraphQLAstToJSON.h +24 -0
  25. data/ext/graphqlparser/c/GraphQLAstVisitor.cpp +55 -0
  26. data/ext/graphqlparser/c/GraphQLAstVisitor.h +53 -0
  27. data/ext/graphqlparser/c/GraphQLParser.cpp +35 -0
  28. data/ext/graphqlparser/c/GraphQLParser.h +54 -0
  29. data/ext/graphqlparser/dump_json_ast.cpp +48 -0
  30. data/ext/graphqlparser/lexer.lpp +324 -0
  31. data/ext/graphqlparser/parser.ypp +693 -0
  32. data/ext/graphqlparser/parsergen/lexer.cpp +2633 -0
  33. data/ext/graphqlparser/parsergen/lexer.h +528 -0
  34. data/ext/graphqlparser/parsergen/location.hh +189 -0
  35. data/ext/graphqlparser/parsergen/parser.tab.cpp +3300 -0
  36. data/ext/graphqlparser/parsergen/parser.tab.hpp +646 -0
  37. data/ext/graphqlparser/parsergen/position.hh +179 -0
  38. data/ext/graphqlparser/parsergen/stack.hh +156 -0
  39. data/ext/graphqlparser/syntaxdefs.h +19 -0
  40. data/ext/libgraphqlparser/AstNode.h +36 -0
  41. data/ext/libgraphqlparser/CMakeLists.txt +148 -0
  42. data/ext/libgraphqlparser/CONTRIBUTING.md +23 -0
  43. data/ext/libgraphqlparser/GraphQLParser.cpp +76 -0
  44. data/ext/libgraphqlparser/GraphQLParser.h +55 -0
  45. data/ext/libgraphqlparser/JsonVisitor.cpp +161 -0
  46. data/ext/libgraphqlparser/JsonVisitor.h +121 -0
  47. data/ext/libgraphqlparser/LICENSE +22 -0
  48. data/ext/libgraphqlparser/README.clang-tidy +7 -0
  49. data/ext/libgraphqlparser/README.md +84 -0
  50. data/ext/libgraphqlparser/ast/ast.ast +203 -0
  51. data/ext/libgraphqlparser/ast/ast.py +61 -0
  52. data/ext/libgraphqlparser/ast/c.py +100 -0
  53. data/ext/libgraphqlparser/ast/c.pyc +0 -0
  54. data/ext/libgraphqlparser/ast/c_impl.py +61 -0
  55. data/ext/libgraphqlparser/ast/c_impl.pyc +0 -0
  56. data/ext/libgraphqlparser/ast/c_visitor_impl.py +39 -0
  57. data/ext/libgraphqlparser/ast/c_visitor_impl.pyc +0 -0
  58. data/ext/libgraphqlparser/ast/casing.py +26 -0
  59. data/ext/libgraphqlparser/ast/casing.pyc +0 -0
  60. data/ext/libgraphqlparser/ast/cxx.py +197 -0
  61. data/ext/libgraphqlparser/ast/cxx.pyc +0 -0
  62. data/ext/libgraphqlparser/ast/cxx_impl.py +61 -0
  63. data/ext/libgraphqlparser/ast/cxx_impl.pyc +0 -0
  64. data/ext/libgraphqlparser/ast/cxx_json_visitor_header.py +42 -0
  65. data/ext/libgraphqlparser/ast/cxx_json_visitor_header.pyc +0 -0
  66. data/ext/libgraphqlparser/ast/cxx_json_visitor_impl.py +80 -0
  67. data/ext/libgraphqlparser/ast/cxx_json_visitor_impl.pyc +0 -0
  68. data/ext/libgraphqlparser/ast/cxx_visitor.py +64 -0
  69. data/ext/libgraphqlparser/ast/cxx_visitor.pyc +0 -0
  70. data/ext/libgraphqlparser/ast/js.py +65 -0
  71. data/ext/libgraphqlparser/ast/license.py +10 -0
  72. data/ext/libgraphqlparser/ast/license.pyc +0 -0
  73. data/ext/libgraphqlparser/c/GraphQLAstNode.cpp +25 -0
  74. data/ext/libgraphqlparser/c/GraphQLAstNode.h +33 -0
  75. data/ext/libgraphqlparser/c/GraphQLAstToJSON.cpp +21 -0
  76. data/ext/libgraphqlparser/c/GraphQLAstToJSON.h +24 -0
  77. data/ext/libgraphqlparser/c/GraphQLAstVisitor.cpp +55 -0
  78. data/ext/libgraphqlparser/c/GraphQLAstVisitor.h +53 -0
  79. data/ext/libgraphqlparser/c/GraphQLParser.cpp +35 -0
  80. data/ext/libgraphqlparser/c/GraphQLParser.h +54 -0
  81. data/ext/libgraphqlparser/clang-tidy-all.sh +3 -0
  82. data/ext/libgraphqlparser/cmake/version.cmake +16 -0
  83. data/ext/libgraphqlparser/dump_json_ast.cpp +48 -0
  84. data/ext/libgraphqlparser/go/README.md +20 -0
  85. data/ext/libgraphqlparser/go/callbacks.go +18 -0
  86. data/ext/libgraphqlparser/go/gotest.go +64 -0
  87. data/ext/libgraphqlparser/lexer.lpp +324 -0
  88. data/ext/libgraphqlparser/libgraphqlparser.pc.in +11 -0
  89. data/ext/libgraphqlparser/parser.ypp +693 -0
  90. data/ext/libgraphqlparser/parsergen/lexer.cpp +2633 -0
  91. data/ext/libgraphqlparser/parsergen/lexer.h +528 -0
  92. data/ext/libgraphqlparser/parsergen/location.hh +189 -0
  93. data/ext/libgraphqlparser/parsergen/parser.tab.cpp +3300 -0
  94. data/ext/libgraphqlparser/parsergen/parser.tab.hpp +646 -0
  95. data/ext/libgraphqlparser/parsergen/position.hh +179 -0
  96. data/ext/libgraphqlparser/parsergen/stack.hh +156 -0
  97. data/ext/libgraphqlparser/python/CMakeLists.txt +14 -0
  98. data/ext/libgraphqlparser/python/README.md +5 -0
  99. data/ext/libgraphqlparser/python/example.py +31 -0
  100. data/ext/libgraphqlparser/syntaxdefs.h +19 -0
  101. data/ext/libgraphqlparser/test/BuildCAPI.c +5 -0
  102. data/ext/libgraphqlparser/test/CMakeLists.txt +25 -0
  103. data/ext/libgraphqlparser/test/JsonVisitorTests.cpp +28 -0
  104. data/ext/libgraphqlparser/test/ParserTests.cpp +352 -0
  105. data/ext/libgraphqlparser/test/kitchen-sink.graphql +59 -0
  106. data/ext/libgraphqlparser/test/kitchen-sink.json +1 -0
  107. data/ext/libgraphqlparser/test/schema-kitchen-sink.graphql +78 -0
  108. data/ext/libgraphqlparser/test/schema-kitchen-sink.json +1 -0
  109. data/ext/libgraphqlparser/test/valgrind.supp +33 -0
  110. data/ext/version.cpp +21 -0
  111. data/lib/generators/graphql/controller_generator.rb +22 -0
  112. data/lib/generators/graphql/schema_generator.rb +22 -0
  113. data/lib/generators/graphql/templates/controller.erb +5 -0
  114. data/lib/generators/graphql/templates/schema.erb +6 -0
  115. data/lib/graphqlparser.so +0 -0
  116. data/lib/rails-graphql.rb +2 -0
  117. data/lib/rails/graphql.rake +1 -0
  118. data/lib/rails/graphql.rb +185 -0
  119. data/lib/rails/graphql/adapters/mysql_adapter.rb +0 -0
  120. data/lib/rails/graphql/adapters/pg_adapter.rb +50 -0
  121. data/lib/rails/graphql/adapters/sqlite_adapter.rb +39 -0
  122. data/lib/rails/graphql/argument.rb +220 -0
  123. data/lib/rails/graphql/callback.rb +124 -0
  124. data/lib/rails/graphql/collectors.rb +14 -0
  125. data/lib/rails/graphql/collectors/hash_collector.rb +83 -0
  126. data/lib/rails/graphql/collectors/idented_collector.rb +73 -0
  127. data/lib/rails/graphql/collectors/json_collector.rb +114 -0
  128. data/lib/rails/graphql/config.rb +61 -0
  129. data/lib/rails/graphql/directive.rb +203 -0
  130. data/lib/rails/graphql/directive/deprecated_directive.rb +59 -0
  131. data/lib/rails/graphql/directive/include_directive.rb +24 -0
  132. data/lib/rails/graphql/directive/skip_directive.rb +24 -0
  133. data/lib/rails/graphql/errors.rb +42 -0
  134. data/lib/rails/graphql/event.rb +141 -0
  135. data/lib/rails/graphql/field.rb +318 -0
  136. data/lib/rails/graphql/field/input_field.rb +92 -0
  137. data/lib/rails/graphql/field/mutation_field.rb +52 -0
  138. data/lib/rails/graphql/field/output_field.rb +96 -0
  139. data/lib/rails/graphql/field/proxied_field.rb +131 -0
  140. data/lib/rails/graphql/field/resolved_field.rb +96 -0
  141. data/lib/rails/graphql/field/scoped_config.rb +22 -0
  142. data/lib/rails/graphql/field/typed_field.rb +104 -0
  143. data/lib/rails/graphql/helpers.rb +40 -0
  144. data/lib/rails/graphql/helpers/attribute_delegator.rb +39 -0
  145. data/lib/rails/graphql/helpers/inherited_collection.rb +152 -0
  146. data/lib/rails/graphql/helpers/leaf_from_ar.rb +141 -0
  147. data/lib/rails/graphql/helpers/registerable.rb +103 -0
  148. data/lib/rails/graphql/helpers/with_arguments.rb +125 -0
  149. data/lib/rails/graphql/helpers/with_assignment.rb +113 -0
  150. data/lib/rails/graphql/helpers/with_callbacks.rb +55 -0
  151. data/lib/rails/graphql/helpers/with_directives.rb +126 -0
  152. data/lib/rails/graphql/helpers/with_events.rb +81 -0
  153. data/lib/rails/graphql/helpers/with_fields.rb +141 -0
  154. data/lib/rails/graphql/helpers/with_namespace.rb +40 -0
  155. data/lib/rails/graphql/helpers/with_owner.rb +35 -0
  156. data/lib/rails/graphql/helpers/with_schema_fields.rb +230 -0
  157. data/lib/rails/graphql/helpers/with_validator.rb +52 -0
  158. data/lib/rails/graphql/introspection.rb +53 -0
  159. data/lib/rails/graphql/native.rb +56 -0
  160. data/lib/rails/graphql/native/functions.rb +38 -0
  161. data/lib/rails/graphql/native/location.rb +41 -0
  162. data/lib/rails/graphql/native/pointers.rb +23 -0
  163. data/lib/rails/graphql/native/visitor.rb +349 -0
  164. data/lib/rails/graphql/railtie.rb +85 -0
  165. data/lib/rails/graphql/railties/base_generator.rb +35 -0
  166. data/lib/rails/graphql/railties/controller.rb +101 -0
  167. data/lib/rails/graphql/railties/controller_runtime.rb +40 -0
  168. data/lib/rails/graphql/railties/log_subscriber.rb +62 -0
  169. data/lib/rails/graphql/request.rb +343 -0
  170. data/lib/rails/graphql/request/arguments.rb +93 -0
  171. data/lib/rails/graphql/request/component.rb +100 -0
  172. data/lib/rails/graphql/request/component/field.rb +225 -0
  173. data/lib/rails/graphql/request/component/fragment.rb +118 -0
  174. data/lib/rails/graphql/request/component/operation.rb +178 -0
  175. data/lib/rails/graphql/request/component/operation/subscription.rb +16 -0
  176. data/lib/rails/graphql/request/component/spread.rb +119 -0
  177. data/lib/rails/graphql/request/component/typename.rb +82 -0
  178. data/lib/rails/graphql/request/context.rb +51 -0
  179. data/lib/rails/graphql/request/errors.rb +54 -0
  180. data/lib/rails/graphql/request/event.rb +112 -0
  181. data/lib/rails/graphql/request/helpers/directives.rb +64 -0
  182. data/lib/rails/graphql/request/helpers/selection_set.rb +87 -0
  183. data/lib/rails/graphql/request/helpers/value_writers.rb +115 -0
  184. data/lib/rails/graphql/request/steps/organizable.rb +146 -0
  185. data/lib/rails/graphql/request/steps/prepareable.rb +33 -0
  186. data/lib/rails/graphql/request/steps/resolveable.rb +32 -0
  187. data/lib/rails/graphql/request/strategy.rb +249 -0
  188. data/lib/rails/graphql/request/strategy/dynamic_instance.rb +41 -0
  189. data/lib/rails/graphql/request/strategy/multi_query_strategy.rb +36 -0
  190. data/lib/rails/graphql/request/strategy/sequenced_strategy.rb +28 -0
  191. data/lib/rails/graphql/schema.rb +272 -0
  192. data/lib/rails/graphql/shortcuts.rb +77 -0
  193. data/lib/rails/graphql/source.rb +371 -0
  194. data/lib/rails/graphql/source/active_record/builders.rb +154 -0
  195. data/lib/rails/graphql/source/active_record_source.rb +231 -0
  196. data/lib/rails/graphql/source/scoped_arguments.rb +87 -0
  197. data/lib/rails/graphql/to_gql.rb +368 -0
  198. data/lib/rails/graphql/type.rb +138 -0
  199. data/lib/rails/graphql/type/enum.rb +206 -0
  200. data/lib/rails/graphql/type/enum/directive_location_enum.rb +30 -0
  201. data/lib/rails/graphql/type/enum/type_kind_enum.rb +57 -0
  202. data/lib/rails/graphql/type/input.rb +134 -0
  203. data/lib/rails/graphql/type/interface.rb +82 -0
  204. data/lib/rails/graphql/type/object.rb +111 -0
  205. data/lib/rails/graphql/type/object/directive_object.rb +34 -0
  206. data/lib/rails/graphql/type/object/enum_value_object.rb +25 -0
  207. data/lib/rails/graphql/type/object/field_object.rb +54 -0
  208. data/lib/rails/graphql/type/object/input_value_object.rb +49 -0
  209. data/lib/rails/graphql/type/object/schema_object.rb +40 -0
  210. data/lib/rails/graphql/type/object/type_object.rb +136 -0
  211. data/lib/rails/graphql/type/scalar.rb +71 -0
  212. data/lib/rails/graphql/type/scalar/bigint_scalar.rb +34 -0
  213. data/lib/rails/graphql/type/scalar/binary_scalar.rb +30 -0
  214. data/lib/rails/graphql/type/scalar/boolean_scalar.rb +37 -0
  215. data/lib/rails/graphql/type/scalar/date_scalar.rb +34 -0
  216. data/lib/rails/graphql/type/scalar/date_time_scalar.rb +32 -0
  217. data/lib/rails/graphql/type/scalar/decimal_scalar.rb +35 -0
  218. data/lib/rails/graphql/type/scalar/float_scalar.rb +32 -0
  219. data/lib/rails/graphql/type/scalar/id_scalar.rb +39 -0
  220. data/lib/rails/graphql/type/scalar/int_scalar.rb +36 -0
  221. data/lib/rails/graphql/type/scalar/string_scalar.rb +28 -0
  222. data/lib/rails/graphql/type/scalar/time_scalar.rb +40 -0
  223. data/lib/rails/graphql/type/union.rb +87 -0
  224. data/lib/rails/graphql/type_map.rb +347 -0
  225. data/lib/rails/graphql/version.rb +7 -0
  226. data/test/assets/introspection-db.json +0 -0
  227. data/test/assets/introspection-mem.txt +1 -0
  228. data/test/assets/introspection.gql +91 -0
  229. data/test/assets/luke.jpg +0 -0
  230. data/test/assets/mem.gql +428 -0
  231. data/test/assets/sqlite.gql +423 -0
  232. data/test/config.rb +80 -0
  233. data/test/graphql/request/context_test.rb +70 -0
  234. data/test/graphql/schema_test.rb +190 -0
  235. data/test/graphql/source_test.rb +237 -0
  236. data/test/graphql/type/enum_test.rb +203 -0
  237. data/test/graphql/type/input_test.rb +138 -0
  238. data/test/graphql/type/interface_test.rb +72 -0
  239. data/test/graphql/type/object_test.rb +104 -0
  240. data/test/graphql/type/scalar/bigint_scalar_test.rb +42 -0
  241. data/test/graphql/type/scalar/binary_scalar_test.rb +17 -0
  242. data/test/graphql/type/scalar/boolean_scalar_test.rb +40 -0
  243. data/test/graphql/type/scalar/date_scalar_test.rb +29 -0
  244. data/test/graphql/type/scalar/date_time_scalar_test.rb +29 -0
  245. data/test/graphql/type/scalar/decimal_scalar_test.rb +28 -0
  246. data/test/graphql/type/scalar/float_scalar_test.rb +22 -0
  247. data/test/graphql/type/scalar/id_scalar_test.rb +26 -0
  248. data/test/graphql/type/scalar/int_scalar_test.rb +26 -0
  249. data/test/graphql/type/scalar/string_scalar_test.rb +17 -0
  250. data/test/graphql/type/scalar/time_scalar_test.rb +36 -0
  251. data/test/graphql/type/scalar_test.rb +45 -0
  252. data/test/graphql/type/union_test.rb +82 -0
  253. data/test/graphql/type_map_test.rb +362 -0
  254. data/test/graphql/type_test.rb +68 -0
  255. data/test/graphql_test.rb +55 -0
  256. data/test/integration/config.rb +56 -0
  257. data/test/integration/memory/star_wars_introspection_test.rb +144 -0
  258. data/test/integration/memory/star_wars_query_test.rb +184 -0
  259. data/test/integration/memory/star_wars_validation_test.rb +99 -0
  260. data/test/integration/schemas/memory.rb +232 -0
  261. data/test/integration/schemas/sqlite.rb +82 -0
  262. data/test/integration/sqlite/star_wars_introspection_test.rb +15 -0
  263. data/test/integration/sqlite/star_wars_mutation_test.rb +82 -0
  264. data/test/integration/sqlite/star_wars_query_test.rb +71 -0
  265. data/test/test_ext.rb +48 -0
  266. metadata +509 -0
@@ -0,0 +1,528 @@
1
+ #ifndef yyHEADER_H
2
+ #define yyHEADER_H 1
3
+ #define yyIN_HEADER 1
4
+
5
+ #line 5 "lexer.h"
6
+
7
+ #line 7 "lexer.h"
8
+
9
+ #define YY_INT_ALIGNED short int
10
+
11
+ /* A lexical scanner generated by flex */
12
+
13
+ #define FLEX_SCANNER
14
+ #define YY_FLEX_MAJOR_VERSION 2
15
+ #define YY_FLEX_MINOR_VERSION 6
16
+ #define YY_FLEX_SUBMINOR_VERSION 4
17
+ #if YY_FLEX_SUBMINOR_VERSION > 0
18
+ #define FLEX_BETA
19
+ #endif
20
+
21
+ #ifdef yyget_lval
22
+ #define yyget_lval_ALREADY_DEFINED
23
+ #else
24
+ #define yyget_lval yyget_lval
25
+ #endif
26
+
27
+ #ifdef yyset_lval
28
+ #define yyset_lval_ALREADY_DEFINED
29
+ #else
30
+ #define yyset_lval yyset_lval
31
+ #endif
32
+
33
+ #ifdef yyget_lloc
34
+ #define yyget_lloc_ALREADY_DEFINED
35
+ #else
36
+ #define yyget_lloc yyget_lloc
37
+ #endif
38
+
39
+ #ifdef yyset_lloc
40
+ #define yyset_lloc_ALREADY_DEFINED
41
+ #else
42
+ #define yyset_lloc yyset_lloc
43
+ #endif
44
+
45
+ /* First, we deal with platform-specific or compiler-specific issues. */
46
+
47
+ /* begin standard C headers. */
48
+ #include <stdio.h>
49
+ #include <string.h>
50
+ #include <errno.h>
51
+ #include <stdlib.h>
52
+
53
+ /* end standard C headers. */
54
+
55
+ /* flex integer type definitions */
56
+
57
+ #ifndef FLEXINT_H
58
+ #define FLEXINT_H
59
+
60
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
61
+
62
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
63
+
64
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
65
+ * if you want the limit (max/min) macros for int types.
66
+ */
67
+ #ifndef __STDC_LIMIT_MACROS
68
+ #define __STDC_LIMIT_MACROS 1
69
+ #endif
70
+
71
+ #include <inttypes.h>
72
+ typedef int8_t flex_int8_t;
73
+ typedef uint8_t flex_uint8_t;
74
+ typedef int16_t flex_int16_t;
75
+ typedef uint16_t flex_uint16_t;
76
+ typedef int32_t flex_int32_t;
77
+ typedef uint32_t flex_uint32_t;
78
+ #else
79
+ typedef signed char flex_int8_t;
80
+ typedef short int flex_int16_t;
81
+ typedef int flex_int32_t;
82
+ typedef unsigned char flex_uint8_t;
83
+ typedef unsigned short int flex_uint16_t;
84
+ typedef unsigned int flex_uint32_t;
85
+
86
+ /* Limits of integral types. */
87
+ #ifndef INT8_MIN
88
+ #define INT8_MIN (-128)
89
+ #endif
90
+ #ifndef INT16_MIN
91
+ #define INT16_MIN (-32767-1)
92
+ #endif
93
+ #ifndef INT32_MIN
94
+ #define INT32_MIN (-2147483647-1)
95
+ #endif
96
+ #ifndef INT8_MAX
97
+ #define INT8_MAX (127)
98
+ #endif
99
+ #ifndef INT16_MAX
100
+ #define INT16_MAX (32767)
101
+ #endif
102
+ #ifndef INT32_MAX
103
+ #define INT32_MAX (2147483647)
104
+ #endif
105
+ #ifndef UINT8_MAX
106
+ #define UINT8_MAX (255U)
107
+ #endif
108
+ #ifndef UINT16_MAX
109
+ #define UINT16_MAX (65535U)
110
+ #endif
111
+ #ifndef UINT32_MAX
112
+ #define UINT32_MAX (4294967295U)
113
+ #endif
114
+
115
+ #ifndef SIZE_MAX
116
+ #define SIZE_MAX (~(size_t)0)
117
+ #endif
118
+
119
+ #endif /* ! C99 */
120
+
121
+ #endif /* ! FLEXINT_H */
122
+
123
+ /* begin standard C++ headers. */
124
+
125
+ /* TODO: this is always defined, so inline it */
126
+ #define yyconst const
127
+
128
+ #if defined(__GNUC__) && __GNUC__ >= 3
129
+ #define yynoreturn __attribute__((__noreturn__))
130
+ #else
131
+ #define yynoreturn
132
+ #endif
133
+
134
+ /* An opaque pointer. */
135
+ #ifndef YY_TYPEDEF_YY_SCANNER_T
136
+ #define YY_TYPEDEF_YY_SCANNER_T
137
+ typedef void* yyscan_t;
138
+ #endif
139
+
140
+ /* For convenience, these vars (plus the bison vars far below)
141
+ are macros in the reentrant scanner. */
142
+ #define yyin yyg->yyin_r
143
+ #define yyout yyg->yyout_r
144
+ #define yyextra yyg->yyextra_r
145
+ #define yyleng yyg->yyleng_r
146
+ #define yytext yyg->yytext_r
147
+ #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
148
+ #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
149
+ #define yy_flex_debug yyg->yy_flex_debug_r
150
+
151
+ /* Size of default input buffer. */
152
+ #ifndef YY_BUF_SIZE
153
+ #ifdef __ia64__
154
+ /* On IA-64, the buffer size is 16k, not 8k.
155
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
156
+ * Ditto for the __ia64__ case accordingly.
157
+ */
158
+ #define YY_BUF_SIZE 32768
159
+ #else
160
+ #define YY_BUF_SIZE 16384
161
+ #endif /* __ia64__ */
162
+ #endif
163
+
164
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
165
+ #define YY_TYPEDEF_YY_BUFFER_STATE
166
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
167
+ #endif
168
+
169
+ #ifndef YY_TYPEDEF_YY_SIZE_T
170
+ #define YY_TYPEDEF_YY_SIZE_T
171
+ typedef size_t yy_size_t;
172
+ #endif
173
+
174
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
175
+ #define YY_STRUCT_YY_BUFFER_STATE
176
+ struct yy_buffer_state
177
+ {
178
+ FILE *yy_input_file;
179
+
180
+ char *yy_ch_buf; /* input buffer */
181
+ char *yy_buf_pos; /* current position in input buffer */
182
+
183
+ /* Size of input buffer in bytes, not including room for EOB
184
+ * characters.
185
+ */
186
+ int yy_buf_size;
187
+
188
+ /* Number of characters read into yy_ch_buf, not including EOB
189
+ * characters.
190
+ */
191
+ int yy_n_chars;
192
+
193
+ /* Whether we "own" the buffer - i.e., we know we created it,
194
+ * and can realloc() it to grow it, and should free() it to
195
+ * delete it.
196
+ */
197
+ int yy_is_our_buffer;
198
+
199
+ /* Whether this is an "interactive" input source; if so, and
200
+ * if we're using stdio for input, then we want to use getc()
201
+ * instead of fread(), to make sure we stop fetching input after
202
+ * each newline.
203
+ */
204
+ int yy_is_interactive;
205
+
206
+ /* Whether we're considered to be at the beginning of a line.
207
+ * If so, '^' rules will be active on the next match, otherwise
208
+ * not.
209
+ */
210
+ int yy_at_bol;
211
+
212
+ int yy_bs_lineno; /**< The line count. */
213
+ int yy_bs_column; /**< The column count. */
214
+
215
+ /* Whether to try to fill the input buffer when we reach the
216
+ * end of it.
217
+ */
218
+ int yy_fill_buffer;
219
+
220
+ int yy_buffer_status;
221
+
222
+ };
223
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
224
+
225
+ void yyrestart ( FILE *input_file , yyscan_t yyscanner );
226
+ void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
227
+ YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
228
+ void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
229
+ void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
230
+ void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
231
+ void yypop_buffer_state ( yyscan_t yyscanner );
232
+
233
+ YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
234
+ YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
235
+ YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
236
+
237
+ void *yyalloc ( yy_size_t , yyscan_t yyscanner );
238
+ void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
239
+ void yyfree ( void * , yyscan_t yyscanner );
240
+
241
+ /* Begin user sect3 */
242
+
243
+ #define yywrap(yyscanner) (/*CONSTCOND*/1)
244
+ #define YY_SKIP_YYWRAP
245
+
246
+ #define yytext_ptr yytext_r
247
+
248
+ #ifdef YY_HEADER_EXPORT_START_CONDITIONS
249
+ #define INITIAL 0
250
+ #define STRING_STATE 1
251
+ #define BLOCK_STRING_STATE 2
252
+ #define C_COMMENT_STATE 3
253
+ #define LINE_COMMENT_STATE 4
254
+
255
+ #endif
256
+
257
+ #ifndef YY_NO_UNISTD_H
258
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
259
+ * down here because we want the user's section 1 to have been scanned first.
260
+ * The user has a chance to override it with an option.
261
+ */
262
+ #include <unistd.h>
263
+ #endif
264
+
265
+ #define YY_EXTRA_TYPE struct LexerExtra *
266
+
267
+ int yylex_init (yyscan_t* scanner);
268
+
269
+ int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
270
+
271
+ /* Accessor methods to globals.
272
+ These are made visible to non-reentrant scanners for convenience. */
273
+
274
+ int yylex_destroy ( yyscan_t yyscanner );
275
+
276
+ int yyget_debug ( yyscan_t yyscanner );
277
+
278
+ void yyset_debug ( int debug_flag , yyscan_t yyscanner );
279
+
280
+ YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
281
+
282
+ void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
283
+
284
+ FILE *yyget_in ( yyscan_t yyscanner );
285
+
286
+ void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
287
+
288
+ FILE *yyget_out ( yyscan_t yyscanner );
289
+
290
+ void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
291
+
292
+ int yyget_leng ( yyscan_t yyscanner );
293
+
294
+ char *yyget_text ( yyscan_t yyscanner );
295
+
296
+ int yyget_lineno ( yyscan_t yyscanner );
297
+
298
+ void yyset_lineno ( int _line_number , yyscan_t yyscanner );
299
+
300
+ int yyget_column ( yyscan_t yyscanner );
301
+
302
+ void yyset_column ( int _column_no , yyscan_t yyscanner );
303
+
304
+ YYSTYPE * yyget_lval ( yyscan_t yyscanner );
305
+
306
+ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
307
+
308
+ YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
309
+
310
+ void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
311
+
312
+ /* Macros after this point can all be overridden by user definitions in
313
+ * section 1.
314
+ */
315
+
316
+ #ifndef YY_SKIP_YYWRAP
317
+ #ifdef __cplusplus
318
+ extern "C" int yywrap ( yyscan_t yyscanner );
319
+ #else
320
+ extern int yywrap ( yyscan_t yyscanner );
321
+ #endif
322
+ #endif
323
+
324
+ #ifndef yytext_ptr
325
+ static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
326
+ #endif
327
+
328
+ #ifdef YY_NEED_STRLEN
329
+ static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
330
+ #endif
331
+
332
+ #ifndef YY_NO_INPUT
333
+
334
+ #endif
335
+
336
+ /* Amount of stuff to slurp up with each read. */
337
+ #ifndef YY_READ_BUF_SIZE
338
+ #ifdef __ia64__
339
+ /* On IA-64, the buffer size is 16k, not 8k */
340
+ #define YY_READ_BUF_SIZE 16384
341
+ #else
342
+ #define YY_READ_BUF_SIZE 8192
343
+ #endif /* __ia64__ */
344
+ #endif
345
+
346
+ /* Number of entries by which start-condition stack grows. */
347
+ #ifndef YY_START_STACK_INCR
348
+ #define YY_START_STACK_INCR 25
349
+ #endif
350
+
351
+ /* Default declaration of generated scanner - a define so the user can
352
+ * easily add parameters.
353
+ */
354
+ #ifndef YY_DECL
355
+ #define YY_DECL_IS_OURS 1
356
+
357
+ extern int yylex \
358
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
359
+
360
+ #define YY_DECL int yylex \
361
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
362
+ #endif /* !YY_DECL */
363
+
364
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
365
+
366
+ #undef YY_NEW_FILE
367
+ #undef YY_FLUSH_BUFFER
368
+ #undef yy_set_bol
369
+ #undef yy_new_buffer
370
+ #undef yy_set_interactive
371
+ #undef YY_DO_BEFORE_ACTION
372
+
373
+ #ifdef YY_DECL_IS_OURS
374
+ #undef YY_DECL_IS_OURS
375
+ #undef YY_DECL
376
+ #endif
377
+
378
+ #ifndef yy_create_buffer_ALREADY_DEFINED
379
+ #undef yy_create_buffer
380
+ #endif
381
+ #ifndef yy_delete_buffer_ALREADY_DEFINED
382
+ #undef yy_delete_buffer
383
+ #endif
384
+ #ifndef yy_scan_buffer_ALREADY_DEFINED
385
+ #undef yy_scan_buffer
386
+ #endif
387
+ #ifndef yy_scan_string_ALREADY_DEFINED
388
+ #undef yy_scan_string
389
+ #endif
390
+ #ifndef yy_scan_bytes_ALREADY_DEFINED
391
+ #undef yy_scan_bytes
392
+ #endif
393
+ #ifndef yy_init_buffer_ALREADY_DEFINED
394
+ #undef yy_init_buffer
395
+ #endif
396
+ #ifndef yy_flush_buffer_ALREADY_DEFINED
397
+ #undef yy_flush_buffer
398
+ #endif
399
+ #ifndef yy_load_buffer_state_ALREADY_DEFINED
400
+ #undef yy_load_buffer_state
401
+ #endif
402
+ #ifndef yy_switch_to_buffer_ALREADY_DEFINED
403
+ #undef yy_switch_to_buffer
404
+ #endif
405
+ #ifndef yypush_buffer_state_ALREADY_DEFINED
406
+ #undef yypush_buffer_state
407
+ #endif
408
+ #ifndef yypop_buffer_state_ALREADY_DEFINED
409
+ #undef yypop_buffer_state
410
+ #endif
411
+ #ifndef yyensure_buffer_stack_ALREADY_DEFINED
412
+ #undef yyensure_buffer_stack
413
+ #endif
414
+ #ifndef yylex_ALREADY_DEFINED
415
+ #undef yylex
416
+ #endif
417
+ #ifndef yyrestart_ALREADY_DEFINED
418
+ #undef yyrestart
419
+ #endif
420
+ #ifndef yylex_init_ALREADY_DEFINED
421
+ #undef yylex_init
422
+ #endif
423
+ #ifndef yylex_init_extra_ALREADY_DEFINED
424
+ #undef yylex_init_extra
425
+ #endif
426
+ #ifndef yylex_destroy_ALREADY_DEFINED
427
+ #undef yylex_destroy
428
+ #endif
429
+ #ifndef yyget_debug_ALREADY_DEFINED
430
+ #undef yyget_debug
431
+ #endif
432
+ #ifndef yyset_debug_ALREADY_DEFINED
433
+ #undef yyset_debug
434
+ #endif
435
+ #ifndef yyget_extra_ALREADY_DEFINED
436
+ #undef yyget_extra
437
+ #endif
438
+ #ifndef yyset_extra_ALREADY_DEFINED
439
+ #undef yyset_extra
440
+ #endif
441
+ #ifndef yyget_in_ALREADY_DEFINED
442
+ #undef yyget_in
443
+ #endif
444
+ #ifndef yyset_in_ALREADY_DEFINED
445
+ #undef yyset_in
446
+ #endif
447
+ #ifndef yyget_out_ALREADY_DEFINED
448
+ #undef yyget_out
449
+ #endif
450
+ #ifndef yyset_out_ALREADY_DEFINED
451
+ #undef yyset_out
452
+ #endif
453
+ #ifndef yyget_leng_ALREADY_DEFINED
454
+ #undef yyget_leng
455
+ #endif
456
+ #ifndef yyget_text_ALREADY_DEFINED
457
+ #undef yyget_text
458
+ #endif
459
+ #ifndef yyget_lineno_ALREADY_DEFINED
460
+ #undef yyget_lineno
461
+ #endif
462
+ #ifndef yyset_lineno_ALREADY_DEFINED
463
+ #undef yyset_lineno
464
+ #endif
465
+ #ifndef yyget_column_ALREADY_DEFINED
466
+ #undef yyget_column
467
+ #endif
468
+ #ifndef yyset_column_ALREADY_DEFINED
469
+ #undef yyset_column
470
+ #endif
471
+ #ifndef yywrap_ALREADY_DEFINED
472
+ #undef yywrap
473
+ #endif
474
+ #ifndef yyget_lval_ALREADY_DEFINED
475
+ #undef yyget_lval
476
+ #endif
477
+ #ifndef yyset_lval_ALREADY_DEFINED
478
+ #undef yyset_lval
479
+ #endif
480
+ #ifndef yyget_lloc_ALREADY_DEFINED
481
+ #undef yyget_lloc
482
+ #endif
483
+ #ifndef yyset_lloc_ALREADY_DEFINED
484
+ #undef yyset_lloc
485
+ #endif
486
+ #ifndef yyalloc_ALREADY_DEFINED
487
+ #undef yyalloc
488
+ #endif
489
+ #ifndef yyrealloc_ALREADY_DEFINED
490
+ #undef yyrealloc
491
+ #endif
492
+ #ifndef yyfree_ALREADY_DEFINED
493
+ #undef yyfree
494
+ #endif
495
+ #ifndef yytext_ALREADY_DEFINED
496
+ #undef yytext
497
+ #endif
498
+ #ifndef yyleng_ALREADY_DEFINED
499
+ #undef yyleng
500
+ #endif
501
+ #ifndef yyin_ALREADY_DEFINED
502
+ #undef yyin
503
+ #endif
504
+ #ifndef yyout_ALREADY_DEFINED
505
+ #undef yyout
506
+ #endif
507
+ #ifndef yy_flex_debug_ALREADY_DEFINED
508
+ #undef yy_flex_debug
509
+ #endif
510
+ #ifndef yylineno_ALREADY_DEFINED
511
+ #undef yylineno
512
+ #endif
513
+ #ifndef yytables_fload_ALREADY_DEFINED
514
+ #undef yytables_fload
515
+ #endif
516
+ #ifndef yytables_destroy_ALREADY_DEFINED
517
+ #undef yytables_destroy
518
+ #endif
519
+ #ifndef yyTABLES_NAME_ALREADY_DEFINED
520
+ #undef yyTABLES_NAME
521
+ #endif
522
+
523
+ #line 205 "lexer.lpp"
524
+
525
+
526
+ #line 526 "lexer.h"
527
+ #undef yyIN_HEADER
528
+ #endif /* yyHEADER_H */