did_parser 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +12 -0
  3. data/Rakefile +28 -0
  4. data/did_parser.gemspec +31 -0
  5. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
  6. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
  7. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
  8. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
  9. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +23 -0
  10. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +30 -0
  11. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +180 -0
  12. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +79 -0
  13. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
  14. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
  15. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
  16. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
  17. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
  18. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
  19. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
  20. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +37 -0
  21. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +193 -0
  22. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +158 -0
  23. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
  24. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
  25. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
  26. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
  27. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
  28. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
  29. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +336 -0
  30. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
  31. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
  32. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
  33. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
  34. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +99 -0
  35. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +52 -0
  36. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
  37. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
  38. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
  39. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
  40. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +218 -0
  41. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
  42. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
  43. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +294 -0
  44. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +196 -0
  45. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +60 -0
  46. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +46 -0
  47. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
  48. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
  49. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
  50. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
  51. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
  52. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
  53. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +668 -0
  54. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +461 -0
  55. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +294 -0
  56. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +173 -0
  57. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +138 -0
  58. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
  59. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
  60. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
  61. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +65 -0
  62. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
  63. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +156 -0
  64. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +159 -0
  65. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +144 -0
  66. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +141 -0
  67. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
  68. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
  69. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +54 -0
  70. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
  71. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +9 -0
  72. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +92 -0
  73. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
  74. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
  75. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +85 -0
  76. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
  77. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +137 -0
  78. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +425 -0
  79. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +295 -0
  80. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +208 -0
  81. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +117 -0
  82. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
  83. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
  84. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Version.h +42 -0
  85. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +64 -0
  86. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +177 -0
  87. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
  88. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +23 -0
  89. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +98 -0
  90. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +169 -0
  91. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +158 -0
  92. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +132 -0
  93. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +106 -0
  94. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +157 -0
  95. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +232 -0
  96. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +156 -0
  97. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +54 -0
  98. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +48 -0
  99. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +629 -0
  100. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +32 -0
  101. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +33 -0
  102. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +71 -0
  103. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +56 -0
  104. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +139 -0
  105. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +33 -0
  106. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.h +36 -0
  107. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
  108. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +29 -0
  109. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +35 -0
  110. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
  111. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
  112. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +109 -0
  113. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +51 -0
  114. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +27 -0
  115. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +33 -0
  116. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +24 -0
  117. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +23 -0
  118. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +26 -0
  119. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +30 -0
  120. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
  121. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
  122. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
  123. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
  124. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
  125. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
  126. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +12 -0
  127. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +34 -0
  128. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +31 -0
  129. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +42 -0
  130. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
  131. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
  132. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +189 -0
  133. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +76 -0
  134. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +67 -0
  135. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
  136. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +615 -0
  137. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +199 -0
  138. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +15 -0
  139. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +100 -0
  140. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +111 -0
  141. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +128 -0
  142. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +57 -0
  143. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +43 -0
  144. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +59 -0
  145. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +45 -0
  146. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +75 -0
  147. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +57 -0
  148. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +76 -0
  149. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +43 -0
  150. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +57 -0
  151. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +36 -0
  152. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +53 -0
  153. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +36 -0
  154. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +53 -0
  155. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +43 -0
  156. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +57 -0
  157. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +36 -0
  158. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +51 -0
  159. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +43 -0
  160. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +51 -0
  161. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
  162. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
  163. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +26 -0
  164. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +22 -0
  165. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +27 -0
  166. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
  167. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +25 -0
  168. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
  169. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
  170. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1383 -0
  171. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +911 -0
  172. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
  173. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +29 -0
  174. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +25 -0
  175. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
  176. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +35 -0
  177. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
  178. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
  179. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +24 -0
  180. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +50 -0
  181. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +579 -0
  182. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +225 -0
  183. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +56 -0
  184. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +64 -0
  185. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
  186. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +101 -0
  187. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
  188. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextType.h +21 -0
  189. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +202 -0
  190. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
  191. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
  192. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
  193. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +26 -0
  194. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +31 -0
  195. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +26 -0
  196. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +27 -0
  197. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +33 -0
  198. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +42 -0
  199. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +418 -0
  200. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +233 -0
  201. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContextType.h +23 -0
  202. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SerializedATNView.h +101 -0
  203. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +28 -0
  204. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +38 -0
  205. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +86 -0
  206. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +43 -0
  207. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +24 -0
  208. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +37 -0
  209. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
  210. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +25 -0
  211. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +24 -0
  212. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +36 -0
  213. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +65 -0
  214. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.cpp +27 -0
  215. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.h +33 -0
  216. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +21 -0
  217. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +27 -0
  218. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +115 -0
  219. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +96 -0
  220. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +60 -0
  221. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
  222. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +59 -0
  223. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +153 -0
  224. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +17 -0
  225. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +22 -0
  226. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
  227. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +33 -0
  228. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +61 -0
  229. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
  230. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +508 -0
  231. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +190 -0
  232. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +120 -0
  233. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +102 -0
  234. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
  235. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
  236. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +8 -0
  237. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +16 -0
  238. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
  239. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +149 -0
  240. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
  241. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +207 -0
  242. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +65 -0
  243. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Casts.h +34 -0
  244. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +161 -0
  245. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +38 -0
  246. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +16 -0
  247. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Unicode.h +28 -0
  248. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.cpp +242 -0
  249. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.h +54 -0
  250. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
  251. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +24 -0
  252. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +54 -0
  253. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +43 -0
  254. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
  255. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
  256. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +12 -0
  257. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +111 -0
  258. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
  259. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
  260. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
  261. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeType.h +22 -0
  262. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
  263. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
  264. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +48 -0
  265. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +55 -0
  266. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +40 -0
  267. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +54 -0
  268. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +32 -0
  269. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
  270. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
  271. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
  272. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
  273. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
  274. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
  275. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
  276. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
  277. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
  278. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
  279. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
  280. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
  281. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
  282. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
  283. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
  284. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
  285. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
  286. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
  287. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
  288. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
  289. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
  290. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
  291. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +182 -0
  292. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +47 -0
  293. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
  294. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
  295. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
  296. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
  297. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
  298. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
  299. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
  300. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
  301. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
  302. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
  303. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
  304. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
  305. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
  306. data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
  307. data/ext/did_parser/antlrgen/DIDLexer.cpp +225 -0
  308. data/ext/did_parser/antlrgen/DIDLexer.h +52 -0
  309. data/ext/did_parser/antlrgen/DIDLexer.interp +93 -0
  310. data/ext/did_parser/antlrgen/DIDLexer.tokens +42 -0
  311. data/ext/did_parser/antlrgen/DIDParser.cpp +2042 -0
  312. data/ext/did_parser/antlrgen/DIDParser.h +537 -0
  313. data/ext/did_parser/antlrgen/DIDParser.interp +74 -0
  314. data/ext/did_parser/antlrgen/DIDParser.tokens +42 -0
  315. data/ext/did_parser/antlrgen/DIDParserBaseListener.cpp +7 -0
  316. data/ext/did_parser/antlrgen/DIDParserBaseListener.h +104 -0
  317. data/ext/did_parser/antlrgen/DIDParserBaseVisitor.cpp +7 -0
  318. data/ext/did_parser/antlrgen/DIDParserBaseVisitor.h +124 -0
  319. data/ext/did_parser/antlrgen/DIDParserListener.cpp +7 -0
  320. data/ext/did_parser/antlrgen/DIDParserListener.h +97 -0
  321. data/ext/did_parser/antlrgen/DIDParserVisitor.cpp +7 -0
  322. data/ext/did_parser/antlrgen/DIDParserVisitor.h +76 -0
  323. data/ext/did_parser/did_parser.cpp +2996 -0
  324. data/ext/did_parser/extconf.rb +38 -0
  325. data/lib/did_parser/version.rb +3 -0
  326. data/lib/did_parser.rb +2 -0
  327. metadata +382 -0
@@ -0,0 +1,2996 @@
1
+ #include <iostream>
2
+
3
+ #include <antlr4-runtime.h>
4
+
5
+ #include "antlrgen/DIDParser.h"
6
+ #include "antlrgen/DIDParserBaseVisitor.h"
7
+ #include "antlrgen/DIDLexer.h"
8
+
9
+ #include <rice/rice.hpp>
10
+ #include <rice/stl.hpp>
11
+
12
+ #ifdef _WIN32
13
+ #undef OPTIONAL
14
+ #undef IN
15
+ #undef OUT
16
+ #endif
17
+
18
+ #undef FALSE
19
+ #undef TRUE
20
+
21
+ #undef TYPE
22
+
23
+ using namespace std;
24
+ using namespace Rice;
25
+ using namespace antlr4;
26
+
27
+ Class rb_cProgramContext;
28
+ Class rb_cDefinationContext;
29
+ Class rb_cActorContext;
30
+ Class rb_cDatatypeContext;
31
+ Class rb_cActortypeContext;
32
+ Class rb_cTuptypeContext;
33
+ Class rb_cMethodtypeContext;
34
+ Class rb_cPrimitiveContext;
35
+ Class rb_cComptypeContext;
36
+ Class rb_cComponentContext;
37
+ Class rb_cNameContext;
38
+ Class rb_cConstypeContext;
39
+ Class rb_cReftypeContext;
40
+ Class rb_cVariantContext;
41
+ Class rb_cVariantfieldContext;
42
+ Class rb_cEmptyRecordContext;
43
+ Class rb_cEmptyVariantContext;
44
+ Class rb_cOptionContext;
45
+ Class rb_cRecordContext;
46
+ Class rb_cRecordfieldContext;
47
+ Class rb_cVectorContext;
48
+ Class rb_cRecordDataContext;
49
+ Class rb_cRecordKVContext;
50
+ Class rb_cVariantNameContext;
51
+ Class rb_cVariantKVContext;
52
+ Class rb_cFunctypeContext;
53
+ Class rb_cFuncannContext;
54
+ Class rb_cEmptyTupleContext;
55
+ Class rb_cTupleContext;
56
+ Class rb_cArgtypesContext;
57
+ Class rb_cQueryContext;
58
+ Class rb_cOnewayContext;
59
+ Class rb_cToken;
60
+ Class rb_cParser;
61
+ Class rb_cParseTree;
62
+ Class rb_cTerminalNode;
63
+ Class rb_cContextProxy;
64
+
65
+ namespace Rice::detail {
66
+ template <>
67
+ class To_Ruby<Token*> {
68
+ public:
69
+ VALUE convert(Token* const &x) {
70
+ if (!x) return Nil;
71
+ return Data_Object<Token>(x, false, rb_cToken);
72
+ }
73
+ };
74
+
75
+ template <>
76
+ class To_Ruby<tree::ParseTree*> {
77
+ public:
78
+ VALUE convert(tree::ParseTree* const &x) {
79
+ if (!x) return Nil;
80
+ return Data_Object<tree::ParseTree>(x, false, rb_cParseTree);
81
+ }
82
+ };
83
+
84
+ template <>
85
+ class To_Ruby<tree::TerminalNode*> {
86
+ public:
87
+ VALUE convert(tree::TerminalNode* const &x) {
88
+ if (!x) return Nil;
89
+ return Data_Object<tree::TerminalNode>(x, false, rb_cTerminalNode);
90
+ }
91
+ };
92
+ }
93
+
94
+ class ContextProxy {
95
+ public:
96
+ ContextProxy(tree::ParseTree* orig) {
97
+ this -> orig = orig;
98
+ }
99
+
100
+ tree::ParseTree* getOriginal() {
101
+ return orig;
102
+ }
103
+
104
+ std::string getText() {
105
+ return orig -> getText();
106
+ }
107
+
108
+ Object getStart() {
109
+ auto token = ((ParserRuleContext*) orig) -> getStart();
110
+
111
+ return detail::To_Ruby<Token*>().convert(token);
112
+ }
113
+
114
+ Object getStop() {
115
+ auto token = ((ParserRuleContext*) orig) -> getStop();
116
+
117
+ return detail::To_Ruby<Token*>().convert(token);
118
+ }
119
+
120
+ Array getChildren() {
121
+ Array children;
122
+ if (orig != nullptr) {
123
+ for (auto it = orig -> children.begin(); it != orig -> children.end(); it ++) {
124
+ Object parseTree = ContextProxy::wrapParseTree(*it);
125
+
126
+ if (parseTree != Nil) {
127
+ children.push(parseTree);
128
+ }
129
+ }
130
+ }
131
+ return children;
132
+ }
133
+
134
+ Object getParent() {
135
+ return orig == nullptr ? Nil : ContextProxy::wrapParseTree(orig -> parent);
136
+ }
137
+
138
+ size_t childCount() {
139
+ return orig == nullptr ? 0 : orig -> children.size();
140
+ }
141
+
142
+ bool doubleEquals(Object other) {
143
+ if (other.is_a(rb_cContextProxy)) {
144
+ return detail::From_Ruby<ContextProxy*>().convert(other) -> getOriginal() == getOriginal();
145
+ } else {
146
+ return false;
147
+ }
148
+ }
149
+
150
+ private:
151
+
152
+ static Object wrapParseTree(tree::ParseTree* node);
153
+
154
+ protected:
155
+ tree::ParseTree* orig = nullptr;
156
+ };
157
+
158
+ class TerminalNodeProxy : public ContextProxy {
159
+ public:
160
+ TerminalNodeProxy(tree::ParseTree* tree) : ContextProxy(tree) { }
161
+ };
162
+
163
+
164
+ class ProgramContextProxy : public ContextProxy {
165
+ public:
166
+ ProgramContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
167
+ Object defination();
168
+ Object definationAt(size_t i);
169
+ Object actor();
170
+
171
+ };
172
+
173
+ class DefinationContextProxy : public ContextProxy {
174
+ public:
175
+ DefinationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
176
+ Object datatype();
177
+ Object Type();
178
+ Object Name();
179
+ Object Eq();
180
+ Object Semicolon();
181
+ };
182
+
183
+ class ActorContextProxy : public ContextProxy {
184
+ public:
185
+ ActorContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
186
+ Object actortype();
187
+ Object tuptype();
188
+ Object Service();
189
+ Object Colon();
190
+ Object Name();
191
+ Object NameAt(size_t i);
192
+ Object Arrow();
193
+ };
194
+
195
+ class DatatypeContextProxy : public ContextProxy {
196
+ public:
197
+ DatatypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
198
+
199
+
200
+ };
201
+
202
+ class ActortypeContextProxy : public ContextProxy {
203
+ public:
204
+ ActortypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
205
+ Object methodtype();
206
+ Object methodtypeAt(size_t i);
207
+ Object LeftB();
208
+ Object RightB();
209
+ Object Semicolon();
210
+ Object SemicolonAt(size_t i);
211
+ };
212
+
213
+ class TuptypeContextProxy : public ContextProxy {
214
+ public:
215
+ TuptypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
216
+
217
+
218
+ };
219
+
220
+ class MethodtypeContextProxy : public ContextProxy {
221
+ public:
222
+ MethodtypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
223
+ Object functype();
224
+ Object Name();
225
+ Object Colon();
226
+ };
227
+
228
+ class PrimitiveContextProxy : public ContextProxy {
229
+ public:
230
+ PrimitiveContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
231
+
232
+ Object PrimType();
233
+ };
234
+
235
+ class ComptypeContextProxy : public ContextProxy {
236
+ public:
237
+ ComptypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
238
+ Object constype();
239
+ Object reftype();
240
+
241
+ };
242
+
243
+ class ComponentContextProxy : public ContextProxy {
244
+ public:
245
+ ComponentContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
246
+ Object comptype();
247
+
248
+ };
249
+
250
+ class NameContextProxy : public ContextProxy {
251
+ public:
252
+ NameContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
253
+
254
+ Object Name();
255
+ };
256
+
257
+ class ConstypeContextProxy : public ContextProxy {
258
+ public:
259
+ ConstypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
260
+
261
+
262
+ };
263
+
264
+ class ReftypeContextProxy : public ContextProxy {
265
+ public:
266
+ ReftypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
267
+ Object functype();
268
+ Object actortype();
269
+ Object FUNC();
270
+ Object Service();
271
+ };
272
+
273
+ class VariantContextProxy : public ContextProxy {
274
+ public:
275
+ VariantContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
276
+ Object variantfield();
277
+ Object variantfieldAt(size_t i);
278
+ Object VARIANT();
279
+ Object LeftB();
280
+ Object RightB();
281
+ Object Semicolon();
282
+ Object SemicolonAt(size_t i);
283
+ };
284
+
285
+ class VariantfieldContextProxy : public ContextProxy {
286
+ public:
287
+ VariantfieldContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
288
+
289
+
290
+ };
291
+
292
+ class EmptyRecordContextProxy : public ContextProxy {
293
+ public:
294
+ EmptyRecordContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
295
+
296
+ Object RECORD();
297
+ Object LeftB();
298
+ Object RightB();
299
+ };
300
+
301
+ class EmptyVariantContextProxy : public ContextProxy {
302
+ public:
303
+ EmptyVariantContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
304
+
305
+ Object VARIANT();
306
+ Object LeftB();
307
+ Object RightB();
308
+ };
309
+
310
+ class OptionContextProxy : public ContextProxy {
311
+ public:
312
+ OptionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
313
+ Object datatype();
314
+ Object OPT();
315
+ };
316
+
317
+ class RecordContextProxy : public ContextProxy {
318
+ public:
319
+ RecordContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
320
+ Object recordfield();
321
+ Object recordfieldAt(size_t i);
322
+ Object RECORD();
323
+ Object LeftB();
324
+ Object RightB();
325
+ Object Semicolon();
326
+ Object SemicolonAt(size_t i);
327
+ };
328
+
329
+ class RecordfieldContextProxy : public ContextProxy {
330
+ public:
331
+ RecordfieldContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
332
+
333
+
334
+ };
335
+
336
+ class VectorContextProxy : public ContextProxy {
337
+ public:
338
+ VectorContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
339
+ Object datatype();
340
+ Object VEC();
341
+ };
342
+
343
+ class RecordDataContextProxy : public ContextProxy {
344
+ public:
345
+ RecordDataContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
346
+ Object datatype();
347
+
348
+ };
349
+
350
+ class RecordKVContextProxy : public ContextProxy {
351
+ public:
352
+ RecordKVContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
353
+ Object datatype();
354
+ Object Name();
355
+ Object Colon();
356
+ };
357
+
358
+ class VariantNameContextProxy : public ContextProxy {
359
+ public:
360
+ VariantNameContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
361
+
362
+ Object Name();
363
+ };
364
+
365
+ class VariantKVContextProxy : public ContextProxy {
366
+ public:
367
+ VariantKVContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
368
+ Object datatype();
369
+ Object Name();
370
+ Object Colon();
371
+ };
372
+
373
+ class FunctypeContextProxy : public ContextProxy {
374
+ public:
375
+ FunctypeContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
376
+ Object tuptype();
377
+ Object tuptypeAt(size_t i);
378
+ Object funcann();
379
+ Object Arrow();
380
+ };
381
+
382
+ class FuncannContextProxy : public ContextProxy {
383
+ public:
384
+ FuncannContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
385
+
386
+
387
+ };
388
+
389
+ class EmptyTupleContextProxy : public ContextProxy {
390
+ public:
391
+ EmptyTupleContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
392
+
393
+ Object LeftP();
394
+ Object RightP();
395
+ };
396
+
397
+ class TupleContextProxy : public ContextProxy {
398
+ public:
399
+ TupleContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
400
+ Object argtypes();
401
+ Object LeftP();
402
+ Object RightP();
403
+ };
404
+
405
+ class ArgtypesContextProxy : public ContextProxy {
406
+ public:
407
+ ArgtypesContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
408
+ Object datatype();
409
+ Object datatypeAt(size_t i);
410
+ Object Comma();
411
+ Object CommaAt(size_t i);
412
+ Object Name();
413
+ Object Colon();
414
+ };
415
+
416
+ class QueryContextProxy : public ContextProxy {
417
+ public:
418
+ QueryContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
419
+
420
+ Object Query();
421
+ };
422
+
423
+ class OnewayContextProxy : public ContextProxy {
424
+ public:
425
+ OnewayContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
426
+
427
+ Object Oneway();
428
+ };
429
+
430
+
431
+ namespace Rice::detail {
432
+ template <>
433
+ class To_Ruby<DIDParser::ProgramContext*> {
434
+ public:
435
+ VALUE convert(DIDParser::ProgramContext* const &x) {
436
+ if (!x) return Nil;
437
+ return Data_Object<DIDParser::ProgramContext>(x, false, rb_cProgramContext);
438
+ }
439
+ };
440
+
441
+ template <>
442
+ class To_Ruby<ProgramContextProxy*> {
443
+ public:
444
+ VALUE convert(ProgramContextProxy* const &x) {
445
+ if (!x) return Nil;
446
+ return Data_Object<ProgramContextProxy>(x, false, rb_cProgramContext);
447
+ }
448
+ };
449
+ }
450
+
451
+ namespace Rice::detail {
452
+ template <>
453
+ class To_Ruby<DIDParser::DefinationContext*> {
454
+ public:
455
+ VALUE convert(DIDParser::DefinationContext* const &x) {
456
+ if (!x) return Nil;
457
+ return Data_Object<DIDParser::DefinationContext>(x, false, rb_cDefinationContext);
458
+ }
459
+ };
460
+
461
+ template <>
462
+ class To_Ruby<DefinationContextProxy*> {
463
+ public:
464
+ VALUE convert(DefinationContextProxy* const &x) {
465
+ if (!x) return Nil;
466
+ return Data_Object<DefinationContextProxy>(x, false, rb_cDefinationContext);
467
+ }
468
+ };
469
+ }
470
+
471
+ namespace Rice::detail {
472
+ template <>
473
+ class To_Ruby<DIDParser::ActorContext*> {
474
+ public:
475
+ VALUE convert(DIDParser::ActorContext* const &x) {
476
+ if (!x) return Nil;
477
+ return Data_Object<DIDParser::ActorContext>(x, false, rb_cActorContext);
478
+ }
479
+ };
480
+
481
+ template <>
482
+ class To_Ruby<ActorContextProxy*> {
483
+ public:
484
+ VALUE convert(ActorContextProxy* const &x) {
485
+ if (!x) return Nil;
486
+ return Data_Object<ActorContextProxy>(x, false, rb_cActorContext);
487
+ }
488
+ };
489
+ }
490
+
491
+ namespace Rice::detail {
492
+ template <>
493
+ class To_Ruby<DIDParser::DatatypeContext*> {
494
+ public:
495
+ VALUE convert(DIDParser::DatatypeContext* const &x) {
496
+ if (!x) return Nil;
497
+ return Data_Object<DIDParser::DatatypeContext>(x, false, rb_cDatatypeContext);
498
+ }
499
+ };
500
+
501
+ template <>
502
+ class To_Ruby<DatatypeContextProxy*> {
503
+ public:
504
+ VALUE convert(DatatypeContextProxy* const &x) {
505
+ if (!x) return Nil;
506
+ return Data_Object<DatatypeContextProxy>(x, false, rb_cDatatypeContext);
507
+ }
508
+ };
509
+ }
510
+
511
+ namespace Rice::detail {
512
+ template <>
513
+ class To_Ruby<DIDParser::ActortypeContext*> {
514
+ public:
515
+ VALUE convert(DIDParser::ActortypeContext* const &x) {
516
+ if (!x) return Nil;
517
+ return Data_Object<DIDParser::ActortypeContext>(x, false, rb_cActortypeContext);
518
+ }
519
+ };
520
+
521
+ template <>
522
+ class To_Ruby<ActortypeContextProxy*> {
523
+ public:
524
+ VALUE convert(ActortypeContextProxy* const &x) {
525
+ if (!x) return Nil;
526
+ return Data_Object<ActortypeContextProxy>(x, false, rb_cActortypeContext);
527
+ }
528
+ };
529
+ }
530
+
531
+ namespace Rice::detail {
532
+ template <>
533
+ class To_Ruby<DIDParser::TuptypeContext*> {
534
+ public:
535
+ VALUE convert(DIDParser::TuptypeContext* const &x) {
536
+ if (!x) return Nil;
537
+ return Data_Object<DIDParser::TuptypeContext>(x, false, rb_cTuptypeContext);
538
+ }
539
+ };
540
+
541
+ template <>
542
+ class To_Ruby<TuptypeContextProxy*> {
543
+ public:
544
+ VALUE convert(TuptypeContextProxy* const &x) {
545
+ if (!x) return Nil;
546
+ return Data_Object<TuptypeContextProxy>(x, false, rb_cTuptypeContext);
547
+ }
548
+ };
549
+ }
550
+
551
+ namespace Rice::detail {
552
+ template <>
553
+ class To_Ruby<DIDParser::MethodtypeContext*> {
554
+ public:
555
+ VALUE convert(DIDParser::MethodtypeContext* const &x) {
556
+ if (!x) return Nil;
557
+ return Data_Object<DIDParser::MethodtypeContext>(x, false, rb_cMethodtypeContext);
558
+ }
559
+ };
560
+
561
+ template <>
562
+ class To_Ruby<MethodtypeContextProxy*> {
563
+ public:
564
+ VALUE convert(MethodtypeContextProxy* const &x) {
565
+ if (!x) return Nil;
566
+ return Data_Object<MethodtypeContextProxy>(x, false, rb_cMethodtypeContext);
567
+ }
568
+ };
569
+ }
570
+
571
+ namespace Rice::detail {
572
+ template <>
573
+ class To_Ruby<DIDParser::PrimitiveContext*> {
574
+ public:
575
+ VALUE convert(DIDParser::PrimitiveContext* const &x) {
576
+ if (!x) return Nil;
577
+ return Data_Object<DIDParser::PrimitiveContext>(x, false, rb_cPrimitiveContext);
578
+ }
579
+ };
580
+
581
+ template <>
582
+ class To_Ruby<PrimitiveContextProxy*> {
583
+ public:
584
+ VALUE convert(PrimitiveContextProxy* const &x) {
585
+ if (!x) return Nil;
586
+ return Data_Object<PrimitiveContextProxy>(x, false, rb_cPrimitiveContext);
587
+ }
588
+ };
589
+ }
590
+
591
+ namespace Rice::detail {
592
+ template <>
593
+ class To_Ruby<DIDParser::ComptypeContext*> {
594
+ public:
595
+ VALUE convert(DIDParser::ComptypeContext* const &x) {
596
+ if (!x) return Nil;
597
+ return Data_Object<DIDParser::ComptypeContext>(x, false, rb_cComptypeContext);
598
+ }
599
+ };
600
+
601
+ template <>
602
+ class To_Ruby<ComptypeContextProxy*> {
603
+ public:
604
+ VALUE convert(ComptypeContextProxy* const &x) {
605
+ if (!x) return Nil;
606
+ return Data_Object<ComptypeContextProxy>(x, false, rb_cComptypeContext);
607
+ }
608
+ };
609
+ }
610
+
611
+ namespace Rice::detail {
612
+ template <>
613
+ class To_Ruby<DIDParser::ComponentContext*> {
614
+ public:
615
+ VALUE convert(DIDParser::ComponentContext* const &x) {
616
+ if (!x) return Nil;
617
+ return Data_Object<DIDParser::ComponentContext>(x, false, rb_cComponentContext);
618
+ }
619
+ };
620
+
621
+ template <>
622
+ class To_Ruby<ComponentContextProxy*> {
623
+ public:
624
+ VALUE convert(ComponentContextProxy* const &x) {
625
+ if (!x) return Nil;
626
+ return Data_Object<ComponentContextProxy>(x, false, rb_cComponentContext);
627
+ }
628
+ };
629
+ }
630
+
631
+ namespace Rice::detail {
632
+ template <>
633
+ class To_Ruby<DIDParser::NameContext*> {
634
+ public:
635
+ VALUE convert(DIDParser::NameContext* const &x) {
636
+ if (!x) return Nil;
637
+ return Data_Object<DIDParser::NameContext>(x, false, rb_cNameContext);
638
+ }
639
+ };
640
+
641
+ template <>
642
+ class To_Ruby<NameContextProxy*> {
643
+ public:
644
+ VALUE convert(NameContextProxy* const &x) {
645
+ if (!x) return Nil;
646
+ return Data_Object<NameContextProxy>(x, false, rb_cNameContext);
647
+ }
648
+ };
649
+ }
650
+
651
+ namespace Rice::detail {
652
+ template <>
653
+ class To_Ruby<DIDParser::ConstypeContext*> {
654
+ public:
655
+ VALUE convert(DIDParser::ConstypeContext* const &x) {
656
+ if (!x) return Nil;
657
+ return Data_Object<DIDParser::ConstypeContext>(x, false, rb_cConstypeContext);
658
+ }
659
+ };
660
+
661
+ template <>
662
+ class To_Ruby<ConstypeContextProxy*> {
663
+ public:
664
+ VALUE convert(ConstypeContextProxy* const &x) {
665
+ if (!x) return Nil;
666
+ return Data_Object<ConstypeContextProxy>(x, false, rb_cConstypeContext);
667
+ }
668
+ };
669
+ }
670
+
671
+ namespace Rice::detail {
672
+ template <>
673
+ class To_Ruby<DIDParser::ReftypeContext*> {
674
+ public:
675
+ VALUE convert(DIDParser::ReftypeContext* const &x) {
676
+ if (!x) return Nil;
677
+ return Data_Object<DIDParser::ReftypeContext>(x, false, rb_cReftypeContext);
678
+ }
679
+ };
680
+
681
+ template <>
682
+ class To_Ruby<ReftypeContextProxy*> {
683
+ public:
684
+ VALUE convert(ReftypeContextProxy* const &x) {
685
+ if (!x) return Nil;
686
+ return Data_Object<ReftypeContextProxy>(x, false, rb_cReftypeContext);
687
+ }
688
+ };
689
+ }
690
+
691
+ namespace Rice::detail {
692
+ template <>
693
+ class To_Ruby<DIDParser::VariantContext*> {
694
+ public:
695
+ VALUE convert(DIDParser::VariantContext* const &x) {
696
+ if (!x) return Nil;
697
+ return Data_Object<DIDParser::VariantContext>(x, false, rb_cVariantContext);
698
+ }
699
+ };
700
+
701
+ template <>
702
+ class To_Ruby<VariantContextProxy*> {
703
+ public:
704
+ VALUE convert(VariantContextProxy* const &x) {
705
+ if (!x) return Nil;
706
+ return Data_Object<VariantContextProxy>(x, false, rb_cVariantContext);
707
+ }
708
+ };
709
+ }
710
+
711
+ namespace Rice::detail {
712
+ template <>
713
+ class To_Ruby<DIDParser::VariantfieldContext*> {
714
+ public:
715
+ VALUE convert(DIDParser::VariantfieldContext* const &x) {
716
+ if (!x) return Nil;
717
+ return Data_Object<DIDParser::VariantfieldContext>(x, false, rb_cVariantfieldContext);
718
+ }
719
+ };
720
+
721
+ template <>
722
+ class To_Ruby<VariantfieldContextProxy*> {
723
+ public:
724
+ VALUE convert(VariantfieldContextProxy* const &x) {
725
+ if (!x) return Nil;
726
+ return Data_Object<VariantfieldContextProxy>(x, false, rb_cVariantfieldContext);
727
+ }
728
+ };
729
+ }
730
+
731
+ namespace Rice::detail {
732
+ template <>
733
+ class To_Ruby<DIDParser::EmptyRecordContext*> {
734
+ public:
735
+ VALUE convert(DIDParser::EmptyRecordContext* const &x) {
736
+ if (!x) return Nil;
737
+ return Data_Object<DIDParser::EmptyRecordContext>(x, false, rb_cEmptyRecordContext);
738
+ }
739
+ };
740
+
741
+ template <>
742
+ class To_Ruby<EmptyRecordContextProxy*> {
743
+ public:
744
+ VALUE convert(EmptyRecordContextProxy* const &x) {
745
+ if (!x) return Nil;
746
+ return Data_Object<EmptyRecordContextProxy>(x, false, rb_cEmptyRecordContext);
747
+ }
748
+ };
749
+ }
750
+
751
+ namespace Rice::detail {
752
+ template <>
753
+ class To_Ruby<DIDParser::EmptyVariantContext*> {
754
+ public:
755
+ VALUE convert(DIDParser::EmptyVariantContext* const &x) {
756
+ if (!x) return Nil;
757
+ return Data_Object<DIDParser::EmptyVariantContext>(x, false, rb_cEmptyVariantContext);
758
+ }
759
+ };
760
+
761
+ template <>
762
+ class To_Ruby<EmptyVariantContextProxy*> {
763
+ public:
764
+ VALUE convert(EmptyVariantContextProxy* const &x) {
765
+ if (!x) return Nil;
766
+ return Data_Object<EmptyVariantContextProxy>(x, false, rb_cEmptyVariantContext);
767
+ }
768
+ };
769
+ }
770
+
771
+ namespace Rice::detail {
772
+ template <>
773
+ class To_Ruby<DIDParser::OptionContext*> {
774
+ public:
775
+ VALUE convert(DIDParser::OptionContext* const &x) {
776
+ if (!x) return Nil;
777
+ return Data_Object<DIDParser::OptionContext>(x, false, rb_cOptionContext);
778
+ }
779
+ };
780
+
781
+ template <>
782
+ class To_Ruby<OptionContextProxy*> {
783
+ public:
784
+ VALUE convert(OptionContextProxy* const &x) {
785
+ if (!x) return Nil;
786
+ return Data_Object<OptionContextProxy>(x, false, rb_cOptionContext);
787
+ }
788
+ };
789
+ }
790
+
791
+ namespace Rice::detail {
792
+ template <>
793
+ class To_Ruby<DIDParser::RecordContext*> {
794
+ public:
795
+ VALUE convert(DIDParser::RecordContext* const &x) {
796
+ if (!x) return Nil;
797
+ return Data_Object<DIDParser::RecordContext>(x, false, rb_cRecordContext);
798
+ }
799
+ };
800
+
801
+ template <>
802
+ class To_Ruby<RecordContextProxy*> {
803
+ public:
804
+ VALUE convert(RecordContextProxy* const &x) {
805
+ if (!x) return Nil;
806
+ return Data_Object<RecordContextProxy>(x, false, rb_cRecordContext);
807
+ }
808
+ };
809
+ }
810
+
811
+ namespace Rice::detail {
812
+ template <>
813
+ class To_Ruby<DIDParser::RecordfieldContext*> {
814
+ public:
815
+ VALUE convert(DIDParser::RecordfieldContext* const &x) {
816
+ if (!x) return Nil;
817
+ return Data_Object<DIDParser::RecordfieldContext>(x, false, rb_cRecordfieldContext);
818
+ }
819
+ };
820
+
821
+ template <>
822
+ class To_Ruby<RecordfieldContextProxy*> {
823
+ public:
824
+ VALUE convert(RecordfieldContextProxy* const &x) {
825
+ if (!x) return Nil;
826
+ return Data_Object<RecordfieldContextProxy>(x, false, rb_cRecordfieldContext);
827
+ }
828
+ };
829
+ }
830
+
831
+ namespace Rice::detail {
832
+ template <>
833
+ class To_Ruby<DIDParser::VectorContext*> {
834
+ public:
835
+ VALUE convert(DIDParser::VectorContext* const &x) {
836
+ if (!x) return Nil;
837
+ return Data_Object<DIDParser::VectorContext>(x, false, rb_cVectorContext);
838
+ }
839
+ };
840
+
841
+ template <>
842
+ class To_Ruby<VectorContextProxy*> {
843
+ public:
844
+ VALUE convert(VectorContextProxy* const &x) {
845
+ if (!x) return Nil;
846
+ return Data_Object<VectorContextProxy>(x, false, rb_cVectorContext);
847
+ }
848
+ };
849
+ }
850
+
851
+ namespace Rice::detail {
852
+ template <>
853
+ class To_Ruby<DIDParser::RecordDataContext*> {
854
+ public:
855
+ VALUE convert(DIDParser::RecordDataContext* const &x) {
856
+ if (!x) return Nil;
857
+ return Data_Object<DIDParser::RecordDataContext>(x, false, rb_cRecordDataContext);
858
+ }
859
+ };
860
+
861
+ template <>
862
+ class To_Ruby<RecordDataContextProxy*> {
863
+ public:
864
+ VALUE convert(RecordDataContextProxy* const &x) {
865
+ if (!x) return Nil;
866
+ return Data_Object<RecordDataContextProxy>(x, false, rb_cRecordDataContext);
867
+ }
868
+ };
869
+ }
870
+
871
+ namespace Rice::detail {
872
+ template <>
873
+ class To_Ruby<DIDParser::RecordKVContext*> {
874
+ public:
875
+ VALUE convert(DIDParser::RecordKVContext* const &x) {
876
+ if (!x) return Nil;
877
+ return Data_Object<DIDParser::RecordKVContext>(x, false, rb_cRecordKVContext);
878
+ }
879
+ };
880
+
881
+ template <>
882
+ class To_Ruby<RecordKVContextProxy*> {
883
+ public:
884
+ VALUE convert(RecordKVContextProxy* const &x) {
885
+ if (!x) return Nil;
886
+ return Data_Object<RecordKVContextProxy>(x, false, rb_cRecordKVContext);
887
+ }
888
+ };
889
+ }
890
+
891
+ namespace Rice::detail {
892
+ template <>
893
+ class To_Ruby<DIDParser::VariantNameContext*> {
894
+ public:
895
+ VALUE convert(DIDParser::VariantNameContext* const &x) {
896
+ if (!x) return Nil;
897
+ return Data_Object<DIDParser::VariantNameContext>(x, false, rb_cVariantNameContext);
898
+ }
899
+ };
900
+
901
+ template <>
902
+ class To_Ruby<VariantNameContextProxy*> {
903
+ public:
904
+ VALUE convert(VariantNameContextProxy* const &x) {
905
+ if (!x) return Nil;
906
+ return Data_Object<VariantNameContextProxy>(x, false, rb_cVariantNameContext);
907
+ }
908
+ };
909
+ }
910
+
911
+ namespace Rice::detail {
912
+ template <>
913
+ class To_Ruby<DIDParser::VariantKVContext*> {
914
+ public:
915
+ VALUE convert(DIDParser::VariantKVContext* const &x) {
916
+ if (!x) return Nil;
917
+ return Data_Object<DIDParser::VariantKVContext>(x, false, rb_cVariantKVContext);
918
+ }
919
+ };
920
+
921
+ template <>
922
+ class To_Ruby<VariantKVContextProxy*> {
923
+ public:
924
+ VALUE convert(VariantKVContextProxy* const &x) {
925
+ if (!x) return Nil;
926
+ return Data_Object<VariantKVContextProxy>(x, false, rb_cVariantKVContext);
927
+ }
928
+ };
929
+ }
930
+
931
+ namespace Rice::detail {
932
+ template <>
933
+ class To_Ruby<DIDParser::FunctypeContext*> {
934
+ public:
935
+ VALUE convert(DIDParser::FunctypeContext* const &x) {
936
+ if (!x) return Nil;
937
+ return Data_Object<DIDParser::FunctypeContext>(x, false, rb_cFunctypeContext);
938
+ }
939
+ };
940
+
941
+ template <>
942
+ class To_Ruby<FunctypeContextProxy*> {
943
+ public:
944
+ VALUE convert(FunctypeContextProxy* const &x) {
945
+ if (!x) return Nil;
946
+ return Data_Object<FunctypeContextProxy>(x, false, rb_cFunctypeContext);
947
+ }
948
+ };
949
+ }
950
+
951
+ namespace Rice::detail {
952
+ template <>
953
+ class To_Ruby<DIDParser::FuncannContext*> {
954
+ public:
955
+ VALUE convert(DIDParser::FuncannContext* const &x) {
956
+ if (!x) return Nil;
957
+ return Data_Object<DIDParser::FuncannContext>(x, false, rb_cFuncannContext);
958
+ }
959
+ };
960
+
961
+ template <>
962
+ class To_Ruby<FuncannContextProxy*> {
963
+ public:
964
+ VALUE convert(FuncannContextProxy* const &x) {
965
+ if (!x) return Nil;
966
+ return Data_Object<FuncannContextProxy>(x, false, rb_cFuncannContext);
967
+ }
968
+ };
969
+ }
970
+
971
+ namespace Rice::detail {
972
+ template <>
973
+ class To_Ruby<DIDParser::EmptyTupleContext*> {
974
+ public:
975
+ VALUE convert(DIDParser::EmptyTupleContext* const &x) {
976
+ if (!x) return Nil;
977
+ return Data_Object<DIDParser::EmptyTupleContext>(x, false, rb_cEmptyTupleContext);
978
+ }
979
+ };
980
+
981
+ template <>
982
+ class To_Ruby<EmptyTupleContextProxy*> {
983
+ public:
984
+ VALUE convert(EmptyTupleContextProxy* const &x) {
985
+ if (!x) return Nil;
986
+ return Data_Object<EmptyTupleContextProxy>(x, false, rb_cEmptyTupleContext);
987
+ }
988
+ };
989
+ }
990
+
991
+ namespace Rice::detail {
992
+ template <>
993
+ class To_Ruby<DIDParser::TupleContext*> {
994
+ public:
995
+ VALUE convert(DIDParser::TupleContext* const &x) {
996
+ if (!x) return Nil;
997
+ return Data_Object<DIDParser::TupleContext>(x, false, rb_cTupleContext);
998
+ }
999
+ };
1000
+
1001
+ template <>
1002
+ class To_Ruby<TupleContextProxy*> {
1003
+ public:
1004
+ VALUE convert(TupleContextProxy* const &x) {
1005
+ if (!x) return Nil;
1006
+ return Data_Object<TupleContextProxy>(x, false, rb_cTupleContext);
1007
+ }
1008
+ };
1009
+ }
1010
+
1011
+ namespace Rice::detail {
1012
+ template <>
1013
+ class To_Ruby<DIDParser::ArgtypesContext*> {
1014
+ public:
1015
+ VALUE convert(DIDParser::ArgtypesContext* const &x) {
1016
+ if (!x) return Nil;
1017
+ return Data_Object<DIDParser::ArgtypesContext>(x, false, rb_cArgtypesContext);
1018
+ }
1019
+ };
1020
+
1021
+ template <>
1022
+ class To_Ruby<ArgtypesContextProxy*> {
1023
+ public:
1024
+ VALUE convert(ArgtypesContextProxy* const &x) {
1025
+ if (!x) return Nil;
1026
+ return Data_Object<ArgtypesContextProxy>(x, false, rb_cArgtypesContext);
1027
+ }
1028
+ };
1029
+ }
1030
+
1031
+ namespace Rice::detail {
1032
+ template <>
1033
+ class To_Ruby<DIDParser::QueryContext*> {
1034
+ public:
1035
+ VALUE convert(DIDParser::QueryContext* const &x) {
1036
+ if (!x) return Nil;
1037
+ return Data_Object<DIDParser::QueryContext>(x, false, rb_cQueryContext);
1038
+ }
1039
+ };
1040
+
1041
+ template <>
1042
+ class To_Ruby<QueryContextProxy*> {
1043
+ public:
1044
+ VALUE convert(QueryContextProxy* const &x) {
1045
+ if (!x) return Nil;
1046
+ return Data_Object<QueryContextProxy>(x, false, rb_cQueryContext);
1047
+ }
1048
+ };
1049
+ }
1050
+
1051
+ namespace Rice::detail {
1052
+ template <>
1053
+ class To_Ruby<DIDParser::OnewayContext*> {
1054
+ public:
1055
+ VALUE convert(DIDParser::OnewayContext* const &x) {
1056
+ if (!x) return Nil;
1057
+ return Data_Object<DIDParser::OnewayContext>(x, false, rb_cOnewayContext);
1058
+ }
1059
+ };
1060
+
1061
+ template <>
1062
+ class To_Ruby<OnewayContextProxy*> {
1063
+ public:
1064
+ VALUE convert(OnewayContextProxy* const &x) {
1065
+ if (!x) return Nil;
1066
+ return Data_Object<OnewayContextProxy>(x, false, rb_cOnewayContext);
1067
+ }
1068
+ };
1069
+ }
1070
+
1071
+
1072
+ Object ProgramContextProxy::defination() {
1073
+ Array a;
1074
+
1075
+ if (orig != nullptr) {
1076
+ size_t count = ((DIDParser::ProgramContext*)orig) -> defination().size();
1077
+
1078
+ for (size_t i = 0; i < count; i ++) {
1079
+ a.push(definationAt(i));
1080
+ }
1081
+ }
1082
+
1083
+ return std::move(a);
1084
+ }
1085
+
1086
+ Object ProgramContextProxy::definationAt(size_t i) {
1087
+ if (orig == nullptr) {
1088
+ return Qnil;
1089
+ }
1090
+
1091
+ auto ctx = ((DIDParser::ProgramContext*)orig) -> defination(i);
1092
+
1093
+ if (ctx == nullptr) {
1094
+ return Qnil;
1095
+ }
1096
+
1097
+ for (auto child : getChildren()) {
1098
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1099
+ return child;
1100
+ }
1101
+ }
1102
+
1103
+ return Nil;
1104
+ }
1105
+
1106
+ Object ProgramContextProxy::actor() {
1107
+ if (orig == nullptr) {
1108
+ return Qnil;
1109
+ }
1110
+
1111
+ auto ctx = ((DIDParser::ProgramContext*)orig) -> actor();
1112
+
1113
+ if (ctx == nullptr) {
1114
+ return Qnil;
1115
+ }
1116
+
1117
+ for (auto child : getChildren()) {
1118
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1119
+ return child;
1120
+ }
1121
+ }
1122
+
1123
+ return Nil;
1124
+ }
1125
+
1126
+ Object DefinationContextProxy::datatype() {
1127
+ if (orig == nullptr) {
1128
+ return Qnil;
1129
+ }
1130
+
1131
+ auto ctx = ((DIDParser::DefinationContext*)orig) -> datatype();
1132
+
1133
+ if (ctx == nullptr) {
1134
+ return Qnil;
1135
+ }
1136
+
1137
+ for (auto child : getChildren()) {
1138
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1139
+ return child;
1140
+ }
1141
+ }
1142
+
1143
+ return Nil;
1144
+ }
1145
+
1146
+ Object DefinationContextProxy::Type() {
1147
+ if (orig == nullptr) {
1148
+ return Qnil;
1149
+ }
1150
+
1151
+ auto token = ((DIDParser::DefinationContext*)orig) -> Type();
1152
+
1153
+ if (token == nullptr) {
1154
+ return Qnil;
1155
+ }
1156
+
1157
+ TerminalNodeProxy proxy(token);
1158
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1159
+ }
1160
+
1161
+ Object DefinationContextProxy::Name() {
1162
+ if (orig == nullptr) {
1163
+ return Qnil;
1164
+ }
1165
+
1166
+ auto token = ((DIDParser::DefinationContext*)orig) -> Name();
1167
+
1168
+ if (token == nullptr) {
1169
+ return Qnil;
1170
+ }
1171
+
1172
+ TerminalNodeProxy proxy(token);
1173
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1174
+ }
1175
+
1176
+ Object DefinationContextProxy::Eq() {
1177
+ if (orig == nullptr) {
1178
+ return Qnil;
1179
+ }
1180
+
1181
+ auto token = ((DIDParser::DefinationContext*)orig) -> Eq();
1182
+
1183
+ if (token == nullptr) {
1184
+ return Qnil;
1185
+ }
1186
+
1187
+ TerminalNodeProxy proxy(token);
1188
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1189
+ }
1190
+
1191
+ Object DefinationContextProxy::Semicolon() {
1192
+ if (orig == nullptr) {
1193
+ return Qnil;
1194
+ }
1195
+
1196
+ auto token = ((DIDParser::DefinationContext*)orig) -> Semicolon();
1197
+
1198
+ if (token == nullptr) {
1199
+ return Qnil;
1200
+ }
1201
+
1202
+ TerminalNodeProxy proxy(token);
1203
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1204
+ }
1205
+
1206
+ Object ActorContextProxy::actortype() {
1207
+ if (orig == nullptr) {
1208
+ return Qnil;
1209
+ }
1210
+
1211
+ auto ctx = ((DIDParser::ActorContext*)orig) -> actortype();
1212
+
1213
+ if (ctx == nullptr) {
1214
+ return Qnil;
1215
+ }
1216
+
1217
+ for (auto child : getChildren()) {
1218
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1219
+ return child;
1220
+ }
1221
+ }
1222
+
1223
+ return Nil;
1224
+ }
1225
+
1226
+ Object ActorContextProxy::tuptype() {
1227
+ if (orig == nullptr) {
1228
+ return Qnil;
1229
+ }
1230
+
1231
+ auto ctx = ((DIDParser::ActorContext*)orig) -> tuptype();
1232
+
1233
+ if (ctx == nullptr) {
1234
+ return Qnil;
1235
+ }
1236
+
1237
+ for (auto child : getChildren()) {
1238
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1239
+ return child;
1240
+ }
1241
+ }
1242
+
1243
+ return Nil;
1244
+ }
1245
+
1246
+ Object ActorContextProxy::Service() {
1247
+ if (orig == nullptr) {
1248
+ return Qnil;
1249
+ }
1250
+
1251
+ auto token = ((DIDParser::ActorContext*)orig) -> Service();
1252
+
1253
+ if (token == nullptr) {
1254
+ return Qnil;
1255
+ }
1256
+
1257
+ TerminalNodeProxy proxy(token);
1258
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1259
+ }
1260
+
1261
+ Object ActorContextProxy::Colon() {
1262
+ if (orig == nullptr) {
1263
+ return Qnil;
1264
+ }
1265
+
1266
+ auto token = ((DIDParser::ActorContext*)orig) -> Colon();
1267
+
1268
+ if (token == nullptr) {
1269
+ return Qnil;
1270
+ }
1271
+
1272
+ TerminalNodeProxy proxy(token);
1273
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1274
+ }
1275
+
1276
+ Object ActorContextProxy::Name() {
1277
+ Array a;
1278
+
1279
+ if (orig == nullptr) {
1280
+ return std::move(a);
1281
+ }
1282
+
1283
+ auto vec = ((DIDParser::ActorContext*)orig) -> Name();
1284
+
1285
+ for (auto it = vec.begin(); it != vec.end(); it ++) {
1286
+ TerminalNodeProxy proxy(*it);
1287
+ a.push(detail::To_Ruby<TerminalNodeProxy>().convert(proxy));
1288
+ }
1289
+
1290
+ return std::move(a);
1291
+ }
1292
+
1293
+ Object ActorContextProxy::NameAt(size_t i) {
1294
+ if (orig == nullptr) {
1295
+ return Qnil;
1296
+ }
1297
+
1298
+ auto token = ((DIDParser::ActorContext*)orig) -> Name(i);
1299
+
1300
+ if (token == nullptr) {
1301
+ return Qnil;
1302
+ }
1303
+
1304
+ TerminalNodeProxy proxy(token);
1305
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1306
+ }
1307
+
1308
+ Object ActorContextProxy::Arrow() {
1309
+ if (orig == nullptr) {
1310
+ return Qnil;
1311
+ }
1312
+
1313
+ auto token = ((DIDParser::ActorContext*)orig) -> Arrow();
1314
+
1315
+ if (token == nullptr) {
1316
+ return Qnil;
1317
+ }
1318
+
1319
+ TerminalNodeProxy proxy(token);
1320
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1321
+ }
1322
+
1323
+ Object ActortypeContextProxy::methodtype() {
1324
+ Array a;
1325
+
1326
+ if (orig != nullptr) {
1327
+ size_t count = ((DIDParser::ActortypeContext*)orig) -> methodtype().size();
1328
+
1329
+ for (size_t i = 0; i < count; i ++) {
1330
+ a.push(methodtypeAt(i));
1331
+ }
1332
+ }
1333
+
1334
+ return std::move(a);
1335
+ }
1336
+
1337
+ Object ActortypeContextProxy::methodtypeAt(size_t i) {
1338
+ if (orig == nullptr) {
1339
+ return Qnil;
1340
+ }
1341
+
1342
+ auto ctx = ((DIDParser::ActortypeContext*)orig) -> methodtype(i);
1343
+
1344
+ if (ctx == nullptr) {
1345
+ return Qnil;
1346
+ }
1347
+
1348
+ for (auto child : getChildren()) {
1349
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1350
+ return child;
1351
+ }
1352
+ }
1353
+
1354
+ return Nil;
1355
+ }
1356
+
1357
+ Object ActortypeContextProxy::LeftB() {
1358
+ if (orig == nullptr) {
1359
+ return Qnil;
1360
+ }
1361
+
1362
+ auto token = ((DIDParser::ActortypeContext*)orig) -> LeftB();
1363
+
1364
+ if (token == nullptr) {
1365
+ return Qnil;
1366
+ }
1367
+
1368
+ TerminalNodeProxy proxy(token);
1369
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1370
+ }
1371
+
1372
+ Object ActortypeContextProxy::RightB() {
1373
+ if (orig == nullptr) {
1374
+ return Qnil;
1375
+ }
1376
+
1377
+ auto token = ((DIDParser::ActortypeContext*)orig) -> RightB();
1378
+
1379
+ if (token == nullptr) {
1380
+ return Qnil;
1381
+ }
1382
+
1383
+ TerminalNodeProxy proxy(token);
1384
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1385
+ }
1386
+
1387
+ Object ActortypeContextProxy::Semicolon() {
1388
+ Array a;
1389
+
1390
+ if (orig == nullptr) {
1391
+ return std::move(a);
1392
+ }
1393
+
1394
+ auto vec = ((DIDParser::ActortypeContext*)orig) -> Semicolon();
1395
+
1396
+ for (auto it = vec.begin(); it != vec.end(); it ++) {
1397
+ TerminalNodeProxy proxy(*it);
1398
+ a.push(detail::To_Ruby<TerminalNodeProxy>().convert(proxy));
1399
+ }
1400
+
1401
+ return std::move(a);
1402
+ }
1403
+
1404
+ Object ActortypeContextProxy::SemicolonAt(size_t i) {
1405
+ if (orig == nullptr) {
1406
+ return Qnil;
1407
+ }
1408
+
1409
+ auto token = ((DIDParser::ActortypeContext*)orig) -> Semicolon(i);
1410
+
1411
+ if (token == nullptr) {
1412
+ return Qnil;
1413
+ }
1414
+
1415
+ TerminalNodeProxy proxy(token);
1416
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1417
+ }
1418
+
1419
+ Object MethodtypeContextProxy::functype() {
1420
+ if (orig == nullptr) {
1421
+ return Qnil;
1422
+ }
1423
+
1424
+ auto ctx = ((DIDParser::MethodtypeContext*)orig) -> functype();
1425
+
1426
+ if (ctx == nullptr) {
1427
+ return Qnil;
1428
+ }
1429
+
1430
+ for (auto child : getChildren()) {
1431
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1432
+ return child;
1433
+ }
1434
+ }
1435
+
1436
+ return Nil;
1437
+ }
1438
+
1439
+ Object MethodtypeContextProxy::Name() {
1440
+ if (orig == nullptr) {
1441
+ return Qnil;
1442
+ }
1443
+
1444
+ auto token = ((DIDParser::MethodtypeContext*)orig) -> Name();
1445
+
1446
+ if (token == nullptr) {
1447
+ return Qnil;
1448
+ }
1449
+
1450
+ TerminalNodeProxy proxy(token);
1451
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1452
+ }
1453
+
1454
+ Object MethodtypeContextProxy::Colon() {
1455
+ if (orig == nullptr) {
1456
+ return Qnil;
1457
+ }
1458
+
1459
+ auto token = ((DIDParser::MethodtypeContext*)orig) -> Colon();
1460
+
1461
+ if (token == nullptr) {
1462
+ return Qnil;
1463
+ }
1464
+
1465
+ TerminalNodeProxy proxy(token);
1466
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1467
+ }
1468
+
1469
+ Object PrimitiveContextProxy::PrimType() {
1470
+ if (orig == nullptr) {
1471
+ return Qnil;
1472
+ }
1473
+
1474
+ auto token = ((DIDParser::PrimitiveContext*)orig) -> PrimType();
1475
+
1476
+ if (token == nullptr) {
1477
+ return Qnil;
1478
+ }
1479
+
1480
+ TerminalNodeProxy proxy(token);
1481
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1482
+ }
1483
+
1484
+ Object ComptypeContextProxy::constype() {
1485
+ if (orig == nullptr) {
1486
+ return Qnil;
1487
+ }
1488
+
1489
+ auto ctx = ((DIDParser::ComptypeContext*)orig) -> constype();
1490
+
1491
+ if (ctx == nullptr) {
1492
+ return Qnil;
1493
+ }
1494
+
1495
+ for (auto child : getChildren()) {
1496
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1497
+ return child;
1498
+ }
1499
+ }
1500
+
1501
+ return Nil;
1502
+ }
1503
+
1504
+ Object ComptypeContextProxy::reftype() {
1505
+ if (orig == nullptr) {
1506
+ return Qnil;
1507
+ }
1508
+
1509
+ auto ctx = ((DIDParser::ComptypeContext*)orig) -> reftype();
1510
+
1511
+ if (ctx == nullptr) {
1512
+ return Qnil;
1513
+ }
1514
+
1515
+ for (auto child : getChildren()) {
1516
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1517
+ return child;
1518
+ }
1519
+ }
1520
+
1521
+ return Nil;
1522
+ }
1523
+
1524
+ Object ComponentContextProxy::comptype() {
1525
+ if (orig == nullptr) {
1526
+ return Qnil;
1527
+ }
1528
+
1529
+ auto ctx = ((DIDParser::ComponentContext*)orig) -> comptype();
1530
+
1531
+ if (ctx == nullptr) {
1532
+ return Qnil;
1533
+ }
1534
+
1535
+ for (auto child : getChildren()) {
1536
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1537
+ return child;
1538
+ }
1539
+ }
1540
+
1541
+ return Nil;
1542
+ }
1543
+
1544
+ Object NameContextProxy::Name() {
1545
+ if (orig == nullptr) {
1546
+ return Qnil;
1547
+ }
1548
+
1549
+ auto token = ((DIDParser::NameContext*)orig) -> Name();
1550
+
1551
+ if (token == nullptr) {
1552
+ return Qnil;
1553
+ }
1554
+
1555
+ TerminalNodeProxy proxy(token);
1556
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1557
+ }
1558
+
1559
+ Object ReftypeContextProxy::functype() {
1560
+ if (orig == nullptr) {
1561
+ return Qnil;
1562
+ }
1563
+
1564
+ auto ctx = ((DIDParser::ReftypeContext*)orig) -> functype();
1565
+
1566
+ if (ctx == nullptr) {
1567
+ return Qnil;
1568
+ }
1569
+
1570
+ for (auto child : getChildren()) {
1571
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1572
+ return child;
1573
+ }
1574
+ }
1575
+
1576
+ return Nil;
1577
+ }
1578
+
1579
+ Object ReftypeContextProxy::actortype() {
1580
+ if (orig == nullptr) {
1581
+ return Qnil;
1582
+ }
1583
+
1584
+ auto ctx = ((DIDParser::ReftypeContext*)orig) -> actortype();
1585
+
1586
+ if (ctx == nullptr) {
1587
+ return Qnil;
1588
+ }
1589
+
1590
+ for (auto child : getChildren()) {
1591
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1592
+ return child;
1593
+ }
1594
+ }
1595
+
1596
+ return Nil;
1597
+ }
1598
+
1599
+ Object ReftypeContextProxy::FUNC() {
1600
+ if (orig == nullptr) {
1601
+ return Qnil;
1602
+ }
1603
+
1604
+ auto token = ((DIDParser::ReftypeContext*)orig) -> FUNC();
1605
+
1606
+ if (token == nullptr) {
1607
+ return Qnil;
1608
+ }
1609
+
1610
+ TerminalNodeProxy proxy(token);
1611
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1612
+ }
1613
+
1614
+ Object ReftypeContextProxy::Service() {
1615
+ if (orig == nullptr) {
1616
+ return Qnil;
1617
+ }
1618
+
1619
+ auto token = ((DIDParser::ReftypeContext*)orig) -> Service();
1620
+
1621
+ if (token == nullptr) {
1622
+ return Qnil;
1623
+ }
1624
+
1625
+ TerminalNodeProxy proxy(token);
1626
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1627
+ }
1628
+
1629
+ Object VariantContextProxy::variantfield() {
1630
+ Array a;
1631
+
1632
+ if (orig != nullptr) {
1633
+ size_t count = ((DIDParser::VariantContext*)orig) -> variantfield().size();
1634
+
1635
+ for (size_t i = 0; i < count; i ++) {
1636
+ a.push(variantfieldAt(i));
1637
+ }
1638
+ }
1639
+
1640
+ return std::move(a);
1641
+ }
1642
+
1643
+ Object VariantContextProxy::variantfieldAt(size_t i) {
1644
+ if (orig == nullptr) {
1645
+ return Qnil;
1646
+ }
1647
+
1648
+ auto ctx = ((DIDParser::VariantContext*)orig) -> variantfield(i);
1649
+
1650
+ if (ctx == nullptr) {
1651
+ return Qnil;
1652
+ }
1653
+
1654
+ for (auto child : getChildren()) {
1655
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1656
+ return child;
1657
+ }
1658
+ }
1659
+
1660
+ return Nil;
1661
+ }
1662
+
1663
+ Object VariantContextProxy::VARIANT() {
1664
+ if (orig == nullptr) {
1665
+ return Qnil;
1666
+ }
1667
+
1668
+ auto token = ((DIDParser::VariantContext*)orig) -> VARIANT();
1669
+
1670
+ if (token == nullptr) {
1671
+ return Qnil;
1672
+ }
1673
+
1674
+ TerminalNodeProxy proxy(token);
1675
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1676
+ }
1677
+
1678
+ Object VariantContextProxy::LeftB() {
1679
+ if (orig == nullptr) {
1680
+ return Qnil;
1681
+ }
1682
+
1683
+ auto token = ((DIDParser::VariantContext*)orig) -> LeftB();
1684
+
1685
+ if (token == nullptr) {
1686
+ return Qnil;
1687
+ }
1688
+
1689
+ TerminalNodeProxy proxy(token);
1690
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1691
+ }
1692
+
1693
+ Object VariantContextProxy::RightB() {
1694
+ if (orig == nullptr) {
1695
+ return Qnil;
1696
+ }
1697
+
1698
+ auto token = ((DIDParser::VariantContext*)orig) -> RightB();
1699
+
1700
+ if (token == nullptr) {
1701
+ return Qnil;
1702
+ }
1703
+
1704
+ TerminalNodeProxy proxy(token);
1705
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1706
+ }
1707
+
1708
+ Object VariantContextProxy::Semicolon() {
1709
+ Array a;
1710
+
1711
+ if (orig == nullptr) {
1712
+ return std::move(a);
1713
+ }
1714
+
1715
+ auto vec = ((DIDParser::VariantContext*)orig) -> Semicolon();
1716
+
1717
+ for (auto it = vec.begin(); it != vec.end(); it ++) {
1718
+ TerminalNodeProxy proxy(*it);
1719
+ a.push(detail::To_Ruby<TerminalNodeProxy>().convert(proxy));
1720
+ }
1721
+
1722
+ return std::move(a);
1723
+ }
1724
+
1725
+ Object VariantContextProxy::SemicolonAt(size_t i) {
1726
+ if (orig == nullptr) {
1727
+ return Qnil;
1728
+ }
1729
+
1730
+ auto token = ((DIDParser::VariantContext*)orig) -> Semicolon(i);
1731
+
1732
+ if (token == nullptr) {
1733
+ return Qnil;
1734
+ }
1735
+
1736
+ TerminalNodeProxy proxy(token);
1737
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1738
+ }
1739
+
1740
+ Object EmptyRecordContextProxy::RECORD() {
1741
+ if (orig == nullptr) {
1742
+ return Qnil;
1743
+ }
1744
+
1745
+ auto token = ((DIDParser::EmptyRecordContext*)orig) -> RECORD();
1746
+
1747
+ if (token == nullptr) {
1748
+ return Qnil;
1749
+ }
1750
+
1751
+ TerminalNodeProxy proxy(token);
1752
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1753
+ }
1754
+
1755
+ Object EmptyRecordContextProxy::LeftB() {
1756
+ if (orig == nullptr) {
1757
+ return Qnil;
1758
+ }
1759
+
1760
+ auto token = ((DIDParser::EmptyRecordContext*)orig) -> LeftB();
1761
+
1762
+ if (token == nullptr) {
1763
+ return Qnil;
1764
+ }
1765
+
1766
+ TerminalNodeProxy proxy(token);
1767
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1768
+ }
1769
+
1770
+ Object EmptyRecordContextProxy::RightB() {
1771
+ if (orig == nullptr) {
1772
+ return Qnil;
1773
+ }
1774
+
1775
+ auto token = ((DIDParser::EmptyRecordContext*)orig) -> RightB();
1776
+
1777
+ if (token == nullptr) {
1778
+ return Qnil;
1779
+ }
1780
+
1781
+ TerminalNodeProxy proxy(token);
1782
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1783
+ }
1784
+
1785
+ Object EmptyVariantContextProxy::VARIANT() {
1786
+ if (orig == nullptr) {
1787
+ return Qnil;
1788
+ }
1789
+
1790
+ auto token = ((DIDParser::EmptyVariantContext*)orig) -> VARIANT();
1791
+
1792
+ if (token == nullptr) {
1793
+ return Qnil;
1794
+ }
1795
+
1796
+ TerminalNodeProxy proxy(token);
1797
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1798
+ }
1799
+
1800
+ Object EmptyVariantContextProxy::LeftB() {
1801
+ if (orig == nullptr) {
1802
+ return Qnil;
1803
+ }
1804
+
1805
+ auto token = ((DIDParser::EmptyVariantContext*)orig) -> LeftB();
1806
+
1807
+ if (token == nullptr) {
1808
+ return Qnil;
1809
+ }
1810
+
1811
+ TerminalNodeProxy proxy(token);
1812
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1813
+ }
1814
+
1815
+ Object EmptyVariantContextProxy::RightB() {
1816
+ if (orig == nullptr) {
1817
+ return Qnil;
1818
+ }
1819
+
1820
+ auto token = ((DIDParser::EmptyVariantContext*)orig) -> RightB();
1821
+
1822
+ if (token == nullptr) {
1823
+ return Qnil;
1824
+ }
1825
+
1826
+ TerminalNodeProxy proxy(token);
1827
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1828
+ }
1829
+
1830
+ Object OptionContextProxy::datatype() {
1831
+ if (orig == nullptr) {
1832
+ return Qnil;
1833
+ }
1834
+
1835
+ auto ctx = ((DIDParser::OptionContext*)orig) -> datatype();
1836
+
1837
+ if (ctx == nullptr) {
1838
+ return Qnil;
1839
+ }
1840
+
1841
+ for (auto child : getChildren()) {
1842
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1843
+ return child;
1844
+ }
1845
+ }
1846
+
1847
+ return Nil;
1848
+ }
1849
+
1850
+ Object OptionContextProxy::OPT() {
1851
+ if (orig == nullptr) {
1852
+ return Qnil;
1853
+ }
1854
+
1855
+ auto token = ((DIDParser::OptionContext*)orig) -> OPT();
1856
+
1857
+ if (token == nullptr) {
1858
+ return Qnil;
1859
+ }
1860
+
1861
+ TerminalNodeProxy proxy(token);
1862
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1863
+ }
1864
+
1865
+ Object RecordContextProxy::recordfield() {
1866
+ Array a;
1867
+
1868
+ if (orig != nullptr) {
1869
+ size_t count = ((DIDParser::RecordContext*)orig) -> recordfield().size();
1870
+
1871
+ for (size_t i = 0; i < count; i ++) {
1872
+ a.push(recordfieldAt(i));
1873
+ }
1874
+ }
1875
+
1876
+ return std::move(a);
1877
+ }
1878
+
1879
+ Object RecordContextProxy::recordfieldAt(size_t i) {
1880
+ if (orig == nullptr) {
1881
+ return Qnil;
1882
+ }
1883
+
1884
+ auto ctx = ((DIDParser::RecordContext*)orig) -> recordfield(i);
1885
+
1886
+ if (ctx == nullptr) {
1887
+ return Qnil;
1888
+ }
1889
+
1890
+ for (auto child : getChildren()) {
1891
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1892
+ return child;
1893
+ }
1894
+ }
1895
+
1896
+ return Nil;
1897
+ }
1898
+
1899
+ Object RecordContextProxy::RECORD() {
1900
+ if (orig == nullptr) {
1901
+ return Qnil;
1902
+ }
1903
+
1904
+ auto token = ((DIDParser::RecordContext*)orig) -> RECORD();
1905
+
1906
+ if (token == nullptr) {
1907
+ return Qnil;
1908
+ }
1909
+
1910
+ TerminalNodeProxy proxy(token);
1911
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1912
+ }
1913
+
1914
+ Object RecordContextProxy::LeftB() {
1915
+ if (orig == nullptr) {
1916
+ return Qnil;
1917
+ }
1918
+
1919
+ auto token = ((DIDParser::RecordContext*)orig) -> LeftB();
1920
+
1921
+ if (token == nullptr) {
1922
+ return Qnil;
1923
+ }
1924
+
1925
+ TerminalNodeProxy proxy(token);
1926
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1927
+ }
1928
+
1929
+ Object RecordContextProxy::RightB() {
1930
+ if (orig == nullptr) {
1931
+ return Qnil;
1932
+ }
1933
+
1934
+ auto token = ((DIDParser::RecordContext*)orig) -> RightB();
1935
+
1936
+ if (token == nullptr) {
1937
+ return Qnil;
1938
+ }
1939
+
1940
+ TerminalNodeProxy proxy(token);
1941
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1942
+ }
1943
+
1944
+ Object RecordContextProxy::Semicolon() {
1945
+ Array a;
1946
+
1947
+ if (orig == nullptr) {
1948
+ return std::move(a);
1949
+ }
1950
+
1951
+ auto vec = ((DIDParser::RecordContext*)orig) -> Semicolon();
1952
+
1953
+ for (auto it = vec.begin(); it != vec.end(); it ++) {
1954
+ TerminalNodeProxy proxy(*it);
1955
+ a.push(detail::To_Ruby<TerminalNodeProxy>().convert(proxy));
1956
+ }
1957
+
1958
+ return std::move(a);
1959
+ }
1960
+
1961
+ Object RecordContextProxy::SemicolonAt(size_t i) {
1962
+ if (orig == nullptr) {
1963
+ return Qnil;
1964
+ }
1965
+
1966
+ auto token = ((DIDParser::RecordContext*)orig) -> Semicolon(i);
1967
+
1968
+ if (token == nullptr) {
1969
+ return Qnil;
1970
+ }
1971
+
1972
+ TerminalNodeProxy proxy(token);
1973
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
1974
+ }
1975
+
1976
+ Object VectorContextProxy::datatype() {
1977
+ if (orig == nullptr) {
1978
+ return Qnil;
1979
+ }
1980
+
1981
+ auto ctx = ((DIDParser::VectorContext*)orig) -> datatype();
1982
+
1983
+ if (ctx == nullptr) {
1984
+ return Qnil;
1985
+ }
1986
+
1987
+ for (auto child : getChildren()) {
1988
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
1989
+ return child;
1990
+ }
1991
+ }
1992
+
1993
+ return Nil;
1994
+ }
1995
+
1996
+ Object VectorContextProxy::VEC() {
1997
+ if (orig == nullptr) {
1998
+ return Qnil;
1999
+ }
2000
+
2001
+ auto token = ((DIDParser::VectorContext*)orig) -> VEC();
2002
+
2003
+ if (token == nullptr) {
2004
+ return Qnil;
2005
+ }
2006
+
2007
+ TerminalNodeProxy proxy(token);
2008
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2009
+ }
2010
+
2011
+ Object RecordDataContextProxy::datatype() {
2012
+ if (orig == nullptr) {
2013
+ return Qnil;
2014
+ }
2015
+
2016
+ auto ctx = ((DIDParser::RecordDataContext*)orig) -> datatype();
2017
+
2018
+ if (ctx == nullptr) {
2019
+ return Qnil;
2020
+ }
2021
+
2022
+ for (auto child : getChildren()) {
2023
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2024
+ return child;
2025
+ }
2026
+ }
2027
+
2028
+ return Nil;
2029
+ }
2030
+
2031
+ Object RecordKVContextProxy::datatype() {
2032
+ if (orig == nullptr) {
2033
+ return Qnil;
2034
+ }
2035
+
2036
+ auto ctx = ((DIDParser::RecordKVContext*)orig) -> datatype();
2037
+
2038
+ if (ctx == nullptr) {
2039
+ return Qnil;
2040
+ }
2041
+
2042
+ for (auto child : getChildren()) {
2043
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2044
+ return child;
2045
+ }
2046
+ }
2047
+
2048
+ return Nil;
2049
+ }
2050
+
2051
+ Object RecordKVContextProxy::Name() {
2052
+ if (orig == nullptr) {
2053
+ return Qnil;
2054
+ }
2055
+
2056
+ auto token = ((DIDParser::RecordKVContext*)orig) -> Name();
2057
+
2058
+ if (token == nullptr) {
2059
+ return Qnil;
2060
+ }
2061
+
2062
+ TerminalNodeProxy proxy(token);
2063
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2064
+ }
2065
+
2066
+ Object RecordKVContextProxy::Colon() {
2067
+ if (orig == nullptr) {
2068
+ return Qnil;
2069
+ }
2070
+
2071
+ auto token = ((DIDParser::RecordKVContext*)orig) -> Colon();
2072
+
2073
+ if (token == nullptr) {
2074
+ return Qnil;
2075
+ }
2076
+
2077
+ TerminalNodeProxy proxy(token);
2078
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2079
+ }
2080
+
2081
+ Object VariantNameContextProxy::Name() {
2082
+ if (orig == nullptr) {
2083
+ return Qnil;
2084
+ }
2085
+
2086
+ auto token = ((DIDParser::VariantNameContext*)orig) -> Name();
2087
+
2088
+ if (token == nullptr) {
2089
+ return Qnil;
2090
+ }
2091
+
2092
+ TerminalNodeProxy proxy(token);
2093
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2094
+ }
2095
+
2096
+ Object VariantKVContextProxy::datatype() {
2097
+ if (orig == nullptr) {
2098
+ return Qnil;
2099
+ }
2100
+
2101
+ auto ctx = ((DIDParser::VariantKVContext*)orig) -> datatype();
2102
+
2103
+ if (ctx == nullptr) {
2104
+ return Qnil;
2105
+ }
2106
+
2107
+ for (auto child : getChildren()) {
2108
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2109
+ return child;
2110
+ }
2111
+ }
2112
+
2113
+ return Nil;
2114
+ }
2115
+
2116
+ Object VariantKVContextProxy::Name() {
2117
+ if (orig == nullptr) {
2118
+ return Qnil;
2119
+ }
2120
+
2121
+ auto token = ((DIDParser::VariantKVContext*)orig) -> Name();
2122
+
2123
+ if (token == nullptr) {
2124
+ return Qnil;
2125
+ }
2126
+
2127
+ TerminalNodeProxy proxy(token);
2128
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2129
+ }
2130
+
2131
+ Object VariantKVContextProxy::Colon() {
2132
+ if (orig == nullptr) {
2133
+ return Qnil;
2134
+ }
2135
+
2136
+ auto token = ((DIDParser::VariantKVContext*)orig) -> Colon();
2137
+
2138
+ if (token == nullptr) {
2139
+ return Qnil;
2140
+ }
2141
+
2142
+ TerminalNodeProxy proxy(token);
2143
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2144
+ }
2145
+
2146
+ Object FunctypeContextProxy::tuptype() {
2147
+ Array a;
2148
+
2149
+ if (orig != nullptr) {
2150
+ size_t count = ((DIDParser::FunctypeContext*)orig) -> tuptype().size();
2151
+
2152
+ for (size_t i = 0; i < count; i ++) {
2153
+ a.push(tuptypeAt(i));
2154
+ }
2155
+ }
2156
+
2157
+ return std::move(a);
2158
+ }
2159
+
2160
+ Object FunctypeContextProxy::tuptypeAt(size_t i) {
2161
+ if (orig == nullptr) {
2162
+ return Qnil;
2163
+ }
2164
+
2165
+ auto ctx = ((DIDParser::FunctypeContext*)orig) -> tuptype(i);
2166
+
2167
+ if (ctx == nullptr) {
2168
+ return Qnil;
2169
+ }
2170
+
2171
+ for (auto child : getChildren()) {
2172
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2173
+ return child;
2174
+ }
2175
+ }
2176
+
2177
+ return Nil;
2178
+ }
2179
+
2180
+ Object FunctypeContextProxy::funcann() {
2181
+ if (orig == nullptr) {
2182
+ return Qnil;
2183
+ }
2184
+
2185
+ auto ctx = ((DIDParser::FunctypeContext*)orig) -> funcann();
2186
+
2187
+ if (ctx == nullptr) {
2188
+ return Qnil;
2189
+ }
2190
+
2191
+ for (auto child : getChildren()) {
2192
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2193
+ return child;
2194
+ }
2195
+ }
2196
+
2197
+ return Nil;
2198
+ }
2199
+
2200
+ Object FunctypeContextProxy::Arrow() {
2201
+ if (orig == nullptr) {
2202
+ return Qnil;
2203
+ }
2204
+
2205
+ auto token = ((DIDParser::FunctypeContext*)orig) -> Arrow();
2206
+
2207
+ if (token == nullptr) {
2208
+ return Qnil;
2209
+ }
2210
+
2211
+ TerminalNodeProxy proxy(token);
2212
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2213
+ }
2214
+
2215
+ Object EmptyTupleContextProxy::LeftP() {
2216
+ if (orig == nullptr) {
2217
+ return Qnil;
2218
+ }
2219
+
2220
+ auto token = ((DIDParser::EmptyTupleContext*)orig) -> LeftP();
2221
+
2222
+ if (token == nullptr) {
2223
+ return Qnil;
2224
+ }
2225
+
2226
+ TerminalNodeProxy proxy(token);
2227
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2228
+ }
2229
+
2230
+ Object EmptyTupleContextProxy::RightP() {
2231
+ if (orig == nullptr) {
2232
+ return Qnil;
2233
+ }
2234
+
2235
+ auto token = ((DIDParser::EmptyTupleContext*)orig) -> RightP();
2236
+
2237
+ if (token == nullptr) {
2238
+ return Qnil;
2239
+ }
2240
+
2241
+ TerminalNodeProxy proxy(token);
2242
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2243
+ }
2244
+
2245
+ Object TupleContextProxy::argtypes() {
2246
+ if (orig == nullptr) {
2247
+ return Qnil;
2248
+ }
2249
+
2250
+ auto ctx = ((DIDParser::TupleContext*)orig) -> argtypes();
2251
+
2252
+ if (ctx == nullptr) {
2253
+ return Qnil;
2254
+ }
2255
+
2256
+ for (auto child : getChildren()) {
2257
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2258
+ return child;
2259
+ }
2260
+ }
2261
+
2262
+ return Nil;
2263
+ }
2264
+
2265
+ Object TupleContextProxy::LeftP() {
2266
+ if (orig == nullptr) {
2267
+ return Qnil;
2268
+ }
2269
+
2270
+ auto token = ((DIDParser::TupleContext*)orig) -> LeftP();
2271
+
2272
+ if (token == nullptr) {
2273
+ return Qnil;
2274
+ }
2275
+
2276
+ TerminalNodeProxy proxy(token);
2277
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2278
+ }
2279
+
2280
+ Object TupleContextProxy::RightP() {
2281
+ if (orig == nullptr) {
2282
+ return Qnil;
2283
+ }
2284
+
2285
+ auto token = ((DIDParser::TupleContext*)orig) -> RightP();
2286
+
2287
+ if (token == nullptr) {
2288
+ return Qnil;
2289
+ }
2290
+
2291
+ TerminalNodeProxy proxy(token);
2292
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2293
+ }
2294
+
2295
+ Object ArgtypesContextProxy::datatype() {
2296
+ Array a;
2297
+
2298
+ if (orig != nullptr) {
2299
+ size_t count = ((DIDParser::ArgtypesContext*)orig) -> datatype().size();
2300
+
2301
+ for (size_t i = 0; i < count; i ++) {
2302
+ a.push(datatypeAt(i));
2303
+ }
2304
+ }
2305
+
2306
+ return std::move(a);
2307
+ }
2308
+
2309
+ Object ArgtypesContextProxy::datatypeAt(size_t i) {
2310
+ if (orig == nullptr) {
2311
+ return Qnil;
2312
+ }
2313
+
2314
+ auto ctx = ((DIDParser::ArgtypesContext*)orig) -> datatype(i);
2315
+
2316
+ if (ctx == nullptr) {
2317
+ return Qnil;
2318
+ }
2319
+
2320
+ for (auto child : getChildren()) {
2321
+ if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
2322
+ return child;
2323
+ }
2324
+ }
2325
+
2326
+ return Nil;
2327
+ }
2328
+
2329
+ Object ArgtypesContextProxy::Comma() {
2330
+ Array a;
2331
+
2332
+ if (orig == nullptr) {
2333
+ return std::move(a);
2334
+ }
2335
+
2336
+ auto vec = ((DIDParser::ArgtypesContext*)orig) -> Comma();
2337
+
2338
+ for (auto it = vec.begin(); it != vec.end(); it ++) {
2339
+ TerminalNodeProxy proxy(*it);
2340
+ a.push(detail::To_Ruby<TerminalNodeProxy>().convert(proxy));
2341
+ }
2342
+
2343
+ return std::move(a);
2344
+ }
2345
+
2346
+ Object ArgtypesContextProxy::CommaAt(size_t i) {
2347
+ if (orig == nullptr) {
2348
+ return Qnil;
2349
+ }
2350
+
2351
+ auto token = ((DIDParser::ArgtypesContext*)orig) -> Comma(i);
2352
+
2353
+ if (token == nullptr) {
2354
+ return Qnil;
2355
+ }
2356
+
2357
+ TerminalNodeProxy proxy(token);
2358
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2359
+ }
2360
+
2361
+ Object ArgtypesContextProxy::Name() {
2362
+ if (orig == nullptr) {
2363
+ return Qnil;
2364
+ }
2365
+
2366
+ auto token = ((DIDParser::ArgtypesContext*)orig) -> Name();
2367
+
2368
+ if (token == nullptr) {
2369
+ return Qnil;
2370
+ }
2371
+
2372
+ TerminalNodeProxy proxy(token);
2373
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2374
+ }
2375
+
2376
+ Object ArgtypesContextProxy::Colon() {
2377
+ if (orig == nullptr) {
2378
+ return Qnil;
2379
+ }
2380
+
2381
+ auto token = ((DIDParser::ArgtypesContext*)orig) -> Colon();
2382
+
2383
+ if (token == nullptr) {
2384
+ return Qnil;
2385
+ }
2386
+
2387
+ TerminalNodeProxy proxy(token);
2388
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2389
+ }
2390
+
2391
+ Object QueryContextProxy::Query() {
2392
+ if (orig == nullptr) {
2393
+ return Qnil;
2394
+ }
2395
+
2396
+ auto token = ((DIDParser::QueryContext*)orig) -> Query();
2397
+
2398
+ if (token == nullptr) {
2399
+ return Qnil;
2400
+ }
2401
+
2402
+ TerminalNodeProxy proxy(token);
2403
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2404
+ }
2405
+
2406
+ Object OnewayContextProxy::Oneway() {
2407
+ if (orig == nullptr) {
2408
+ return Qnil;
2409
+ }
2410
+
2411
+ auto token = ((DIDParser::OnewayContext*)orig) -> Oneway();
2412
+
2413
+ if (token == nullptr) {
2414
+ return Qnil;
2415
+ }
2416
+
2417
+ TerminalNodeProxy proxy(token);
2418
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2419
+ }
2420
+
2421
+
2422
+ class VisitorProxy : public DIDParserBaseVisitor, public Director {
2423
+ public:
2424
+ VisitorProxy(Object self) : Director(self) { }
2425
+
2426
+ Object ruby_visit(ContextProxy* proxy) {
2427
+ auto result = visit(proxy -> getOriginal());
2428
+ try {
2429
+ return std::any_cast<Object>(result);
2430
+ } catch(std::bad_cast) {
2431
+ return Qnil;
2432
+ }
2433
+ }
2434
+
2435
+ Object ruby_visitChildren(ContextProxy* proxy) {
2436
+ auto result = visitChildren(proxy -> getOriginal());
2437
+ try {
2438
+ return std::any_cast<Object>(result);
2439
+ } catch(std::bad_cast) {
2440
+ return Qnil;
2441
+ }
2442
+ }
2443
+
2444
+ virtual antlrcpp::Any visitProgram(DIDParser::ProgramContext *ctx) override {
2445
+ ProgramContextProxy proxy(ctx);
2446
+ return getSelf().call("visit_program", &proxy);
2447
+ }
2448
+
2449
+ virtual antlrcpp::Any visitDefination(DIDParser::DefinationContext *ctx) override {
2450
+ DefinationContextProxy proxy(ctx);
2451
+ return getSelf().call("visit_defination", &proxy);
2452
+ }
2453
+
2454
+ virtual antlrcpp::Any visitActor(DIDParser::ActorContext *ctx) override {
2455
+ ActorContextProxy proxy(ctx);
2456
+ return getSelf().call("visit_actor", &proxy);
2457
+ }
2458
+
2459
+ virtual antlrcpp::Any visitActortype(DIDParser::ActortypeContext *ctx) override {
2460
+ ActortypeContextProxy proxy(ctx);
2461
+ return getSelf().call("visit_actortype", &proxy);
2462
+ }
2463
+
2464
+ virtual antlrcpp::Any visitName(DIDParser::NameContext *ctx) override {
2465
+ NameContextProxy proxy(ctx);
2466
+ return getSelf().call("visit_name", &proxy);
2467
+ }
2468
+
2469
+ virtual antlrcpp::Any visitPrimitive(DIDParser::PrimitiveContext *ctx) override {
2470
+ PrimitiveContextProxy proxy(ctx);
2471
+ return getSelf().call("visit_primitive", &proxy);
2472
+ }
2473
+
2474
+ virtual antlrcpp::Any visitComponent(DIDParser::ComponentContext *ctx) override {
2475
+ ComponentContextProxy proxy(ctx);
2476
+ return getSelf().call("visit_component", &proxy);
2477
+ }
2478
+
2479
+ virtual antlrcpp::Any visitComptype(DIDParser::ComptypeContext *ctx) override {
2480
+ ComptypeContextProxy proxy(ctx);
2481
+ return getSelf().call("visit_comptype", &proxy);
2482
+ }
2483
+
2484
+ virtual antlrcpp::Any visitOption(DIDParser::OptionContext *ctx) override {
2485
+ OptionContextProxy proxy(ctx);
2486
+ return getSelf().call("visit_option", &proxy);
2487
+ }
2488
+
2489
+ virtual antlrcpp::Any visitVector(DIDParser::VectorContext *ctx) override {
2490
+ VectorContextProxy proxy(ctx);
2491
+ return getSelf().call("visit_vector", &proxy);
2492
+ }
2493
+
2494
+ virtual antlrcpp::Any visitEmptyRecord(DIDParser::EmptyRecordContext *ctx) override {
2495
+ EmptyRecordContextProxy proxy(ctx);
2496
+ return getSelf().call("visit_empty_record", &proxy);
2497
+ }
2498
+
2499
+ virtual antlrcpp::Any visitRecord(DIDParser::RecordContext *ctx) override {
2500
+ RecordContextProxy proxy(ctx);
2501
+ return getSelf().call("visit_record", &proxy);
2502
+ }
2503
+
2504
+ virtual antlrcpp::Any visitEmptyVariant(DIDParser::EmptyVariantContext *ctx) override {
2505
+ EmptyVariantContextProxy proxy(ctx);
2506
+ return getSelf().call("visit_empty_variant", &proxy);
2507
+ }
2508
+
2509
+ virtual antlrcpp::Any visitVariant(DIDParser::VariantContext *ctx) override {
2510
+ VariantContextProxy proxy(ctx);
2511
+ return getSelf().call("visit_variant", &proxy);
2512
+ }
2513
+
2514
+ virtual antlrcpp::Any visitRecordKV(DIDParser::RecordKVContext *ctx) override {
2515
+ RecordKVContextProxy proxy(ctx);
2516
+ return getSelf().call("visit_record_kv", &proxy);
2517
+ }
2518
+
2519
+ virtual antlrcpp::Any visitRecordData(DIDParser::RecordDataContext *ctx) override {
2520
+ RecordDataContextProxy proxy(ctx);
2521
+ return getSelf().call("visit_record_data", &proxy);
2522
+ }
2523
+
2524
+ virtual antlrcpp::Any visitVariantKV(DIDParser::VariantKVContext *ctx) override {
2525
+ VariantKVContextProxy proxy(ctx);
2526
+ return getSelf().call("visit_variant_kv", &proxy);
2527
+ }
2528
+
2529
+ virtual antlrcpp::Any visitVariantName(DIDParser::VariantNameContext *ctx) override {
2530
+ VariantNameContextProxy proxy(ctx);
2531
+ return getSelf().call("visit_variant_name", &proxy);
2532
+ }
2533
+
2534
+ virtual antlrcpp::Any visitReftype(DIDParser::ReftypeContext *ctx) override {
2535
+ ReftypeContextProxy proxy(ctx);
2536
+ return getSelf().call("visit_reftype", &proxy);
2537
+ }
2538
+
2539
+ virtual antlrcpp::Any visitFunctype(DIDParser::FunctypeContext *ctx) override {
2540
+ FunctypeContextProxy proxy(ctx);
2541
+ return getSelf().call("visit_functype", &proxy);
2542
+ }
2543
+
2544
+ virtual antlrcpp::Any visitEmptyTuple(DIDParser::EmptyTupleContext *ctx) override {
2545
+ EmptyTupleContextProxy proxy(ctx);
2546
+ return getSelf().call("visit_empty_tuple", &proxy);
2547
+ }
2548
+
2549
+ virtual antlrcpp::Any visitTuple(DIDParser::TupleContext *ctx) override {
2550
+ TupleContextProxy proxy(ctx);
2551
+ return getSelf().call("visit_tuple", &proxy);
2552
+ }
2553
+
2554
+ virtual antlrcpp::Any visitArgtypes(DIDParser::ArgtypesContext *ctx) override {
2555
+ ArgtypesContextProxy proxy(ctx);
2556
+ return getSelf().call("visit_argtypes", &proxy);
2557
+ }
2558
+
2559
+ virtual antlrcpp::Any visitQuery(DIDParser::QueryContext *ctx) override {
2560
+ QueryContextProxy proxy(ctx);
2561
+ return getSelf().call("visit_query", &proxy);
2562
+ }
2563
+
2564
+ virtual antlrcpp::Any visitOneway(DIDParser::OnewayContext *ctx) override {
2565
+ OnewayContextProxy proxy(ctx);
2566
+ return getSelf().call("visit_oneway", &proxy);
2567
+ }
2568
+
2569
+ virtual antlrcpp::Any visitMethodtype(DIDParser::MethodtypeContext *ctx) override {
2570
+ MethodtypeContextProxy proxy(ctx);
2571
+ return getSelf().call("visit_methodtype", &proxy);
2572
+ }
2573
+
2574
+ };
2575
+
2576
+
2577
+ class ParserProxy {
2578
+ public:
2579
+ static ParserProxy* parse(string code) {
2580
+ auto input = new ANTLRInputStream(code);
2581
+ return parseStream(input);
2582
+ }
2583
+
2584
+ static ParserProxy* parseFile(string file) {
2585
+ ifstream stream;
2586
+ stream.open(file);
2587
+
2588
+ auto input = new ANTLRInputStream(stream);
2589
+ auto parser = parseStream(input);
2590
+
2591
+ stream.close();
2592
+
2593
+ return parser;
2594
+ }
2595
+
2596
+ Object actor() {
2597
+ auto ctx = this -> parser -> actor();
2598
+
2599
+ ActorContextProxy proxy((DIDParser::ActorContext*) ctx);
2600
+ return detail::To_Ruby<ActorContextProxy>().convert(proxy);
2601
+ }
2602
+
2603
+ Object visit(VisitorProxy* visitor) {
2604
+ auto result = visitor -> visit(this -> parser -> actor());
2605
+
2606
+ // reset for the next visit call
2607
+ this -> lexer -> reset();
2608
+ this -> parser -> reset();
2609
+
2610
+ return std::any_cast<Object>(result);
2611
+ }
2612
+
2613
+ ~ParserProxy() {
2614
+ delete this -> parser;
2615
+ delete this -> tokens;
2616
+ delete this -> lexer;
2617
+ delete this -> input;
2618
+ }
2619
+
2620
+ private:
2621
+ static ParserProxy* parseStream(ANTLRInputStream* input) {
2622
+ ParserProxy* parser = new ParserProxy();
2623
+
2624
+ parser -> input = input;
2625
+ parser -> lexer = new DIDLexer(parser -> input);
2626
+ parser -> tokens = new CommonTokenStream(parser -> lexer);
2627
+ parser -> parser = new DIDParser(parser -> tokens);
2628
+
2629
+ return parser;
2630
+ }
2631
+
2632
+ ParserProxy() {};
2633
+
2634
+ ANTLRInputStream* input;
2635
+ DIDLexer* lexer;
2636
+ CommonTokenStream* tokens;
2637
+ DIDParser* parser;
2638
+ };
2639
+
2640
+ namespace Rice::detail {
2641
+ template <>
2642
+ class To_Ruby<ParserProxy*> {
2643
+ public:
2644
+ VALUE convert(ParserProxy* const &x) {
2645
+ if (!x) return Nil;
2646
+ return Data_Object<ParserProxy>(x, false, rb_cParser);
2647
+ }
2648
+ };
2649
+ }
2650
+
2651
+
2652
+ Object ContextProxy::wrapParseTree(tree::ParseTree* node) {
2653
+ if (antlrcpp::is<DIDParser::ProgramContext*>(node)) {
2654
+ ProgramContextProxy proxy((DIDParser::ProgramContext*)node);
2655
+ return detail::To_Ruby<ProgramContextProxy>().convert(proxy);
2656
+ }
2657
+ else if (antlrcpp::is<DIDParser::DefinationContext*>(node)) {
2658
+ DefinationContextProxy proxy((DIDParser::DefinationContext*)node);
2659
+ return detail::To_Ruby<DefinationContextProxy>().convert(proxy);
2660
+ }
2661
+ else if (antlrcpp::is<DIDParser::ActorContext*>(node)) {
2662
+ ActorContextProxy proxy((DIDParser::ActorContext*)node);
2663
+ return detail::To_Ruby<ActorContextProxy>().convert(proxy);
2664
+ }
2665
+ else if (antlrcpp::is<DIDParser::DatatypeContext*>(node)) {
2666
+ DatatypeContextProxy proxy((DIDParser::DatatypeContext*)node);
2667
+ return detail::To_Ruby<DatatypeContextProxy>().convert(proxy);
2668
+ }
2669
+ else if (antlrcpp::is<DIDParser::ActortypeContext*>(node)) {
2670
+ ActortypeContextProxy proxy((DIDParser::ActortypeContext*)node);
2671
+ return detail::To_Ruby<ActortypeContextProxy>().convert(proxy);
2672
+ }
2673
+ else if (antlrcpp::is<DIDParser::TuptypeContext*>(node)) {
2674
+ TuptypeContextProxy proxy((DIDParser::TuptypeContext*)node);
2675
+ return detail::To_Ruby<TuptypeContextProxy>().convert(proxy);
2676
+ }
2677
+ else if (antlrcpp::is<DIDParser::MethodtypeContext*>(node)) {
2678
+ MethodtypeContextProxy proxy((DIDParser::MethodtypeContext*)node);
2679
+ return detail::To_Ruby<MethodtypeContextProxy>().convert(proxy);
2680
+ }
2681
+ else if (antlrcpp::is<DIDParser::PrimitiveContext*>(node)) {
2682
+ PrimitiveContextProxy proxy((DIDParser::PrimitiveContext*)node);
2683
+ return detail::To_Ruby<PrimitiveContextProxy>().convert(proxy);
2684
+ }
2685
+ else if (antlrcpp::is<DIDParser::ComptypeContext*>(node)) {
2686
+ ComptypeContextProxy proxy((DIDParser::ComptypeContext*)node);
2687
+ return detail::To_Ruby<ComptypeContextProxy>().convert(proxy);
2688
+ }
2689
+ else if (antlrcpp::is<DIDParser::ComponentContext*>(node)) {
2690
+ ComponentContextProxy proxy((DIDParser::ComponentContext*)node);
2691
+ return detail::To_Ruby<ComponentContextProxy>().convert(proxy);
2692
+ }
2693
+ else if (antlrcpp::is<DIDParser::NameContext*>(node)) {
2694
+ NameContextProxy proxy((DIDParser::NameContext*)node);
2695
+ return detail::To_Ruby<NameContextProxy>().convert(proxy);
2696
+ }
2697
+ else if (antlrcpp::is<DIDParser::ConstypeContext*>(node)) {
2698
+ ConstypeContextProxy proxy((DIDParser::ConstypeContext*)node);
2699
+ return detail::To_Ruby<ConstypeContextProxy>().convert(proxy);
2700
+ }
2701
+ else if (antlrcpp::is<DIDParser::ReftypeContext*>(node)) {
2702
+ ReftypeContextProxy proxy((DIDParser::ReftypeContext*)node);
2703
+ return detail::To_Ruby<ReftypeContextProxy>().convert(proxy);
2704
+ }
2705
+ else if (antlrcpp::is<DIDParser::VariantContext*>(node)) {
2706
+ VariantContextProxy proxy((DIDParser::VariantContext*)node);
2707
+ return detail::To_Ruby<VariantContextProxy>().convert(proxy);
2708
+ }
2709
+ else if (antlrcpp::is<DIDParser::VariantfieldContext*>(node)) {
2710
+ VariantfieldContextProxy proxy((DIDParser::VariantfieldContext*)node);
2711
+ return detail::To_Ruby<VariantfieldContextProxy>().convert(proxy);
2712
+ }
2713
+ else if (antlrcpp::is<DIDParser::EmptyRecordContext*>(node)) {
2714
+ EmptyRecordContextProxy proxy((DIDParser::EmptyRecordContext*)node);
2715
+ return detail::To_Ruby<EmptyRecordContextProxy>().convert(proxy);
2716
+ }
2717
+ else if (antlrcpp::is<DIDParser::EmptyVariantContext*>(node)) {
2718
+ EmptyVariantContextProxy proxy((DIDParser::EmptyVariantContext*)node);
2719
+ return detail::To_Ruby<EmptyVariantContextProxy>().convert(proxy);
2720
+ }
2721
+ else if (antlrcpp::is<DIDParser::OptionContext*>(node)) {
2722
+ OptionContextProxy proxy((DIDParser::OptionContext*)node);
2723
+ return detail::To_Ruby<OptionContextProxy>().convert(proxy);
2724
+ }
2725
+ else if (antlrcpp::is<DIDParser::RecordContext*>(node)) {
2726
+ RecordContextProxy proxy((DIDParser::RecordContext*)node);
2727
+ return detail::To_Ruby<RecordContextProxy>().convert(proxy);
2728
+ }
2729
+ else if (antlrcpp::is<DIDParser::RecordfieldContext*>(node)) {
2730
+ RecordfieldContextProxy proxy((DIDParser::RecordfieldContext*)node);
2731
+ return detail::To_Ruby<RecordfieldContextProxy>().convert(proxy);
2732
+ }
2733
+ else if (antlrcpp::is<DIDParser::VectorContext*>(node)) {
2734
+ VectorContextProxy proxy((DIDParser::VectorContext*)node);
2735
+ return detail::To_Ruby<VectorContextProxy>().convert(proxy);
2736
+ }
2737
+ else if (antlrcpp::is<DIDParser::RecordDataContext*>(node)) {
2738
+ RecordDataContextProxy proxy((DIDParser::RecordDataContext*)node);
2739
+ return detail::To_Ruby<RecordDataContextProxy>().convert(proxy);
2740
+ }
2741
+ else if (antlrcpp::is<DIDParser::RecordKVContext*>(node)) {
2742
+ RecordKVContextProxy proxy((DIDParser::RecordKVContext*)node);
2743
+ return detail::To_Ruby<RecordKVContextProxy>().convert(proxy);
2744
+ }
2745
+ else if (antlrcpp::is<DIDParser::VariantNameContext*>(node)) {
2746
+ VariantNameContextProxy proxy((DIDParser::VariantNameContext*)node);
2747
+ return detail::To_Ruby<VariantNameContextProxy>().convert(proxy);
2748
+ }
2749
+ else if (antlrcpp::is<DIDParser::VariantKVContext*>(node)) {
2750
+ VariantKVContextProxy proxy((DIDParser::VariantKVContext*)node);
2751
+ return detail::To_Ruby<VariantKVContextProxy>().convert(proxy);
2752
+ }
2753
+ else if (antlrcpp::is<DIDParser::FunctypeContext*>(node)) {
2754
+ FunctypeContextProxy proxy((DIDParser::FunctypeContext*)node);
2755
+ return detail::To_Ruby<FunctypeContextProxy>().convert(proxy);
2756
+ }
2757
+ else if (antlrcpp::is<DIDParser::FuncannContext*>(node)) {
2758
+ FuncannContextProxy proxy((DIDParser::FuncannContext*)node);
2759
+ return detail::To_Ruby<FuncannContextProxy>().convert(proxy);
2760
+ }
2761
+ else if (antlrcpp::is<DIDParser::EmptyTupleContext*>(node)) {
2762
+ EmptyTupleContextProxy proxy((DIDParser::EmptyTupleContext*)node);
2763
+ return detail::To_Ruby<EmptyTupleContextProxy>().convert(proxy);
2764
+ }
2765
+ else if (antlrcpp::is<DIDParser::TupleContext*>(node)) {
2766
+ TupleContextProxy proxy((DIDParser::TupleContext*)node);
2767
+ return detail::To_Ruby<TupleContextProxy>().convert(proxy);
2768
+ }
2769
+ else if (antlrcpp::is<DIDParser::ArgtypesContext*>(node)) {
2770
+ ArgtypesContextProxy proxy((DIDParser::ArgtypesContext*)node);
2771
+ return detail::To_Ruby<ArgtypesContextProxy>().convert(proxy);
2772
+ }
2773
+ else if (antlrcpp::is<DIDParser::QueryContext*>(node)) {
2774
+ QueryContextProxy proxy((DIDParser::QueryContext*)node);
2775
+ return detail::To_Ruby<QueryContextProxy>().convert(proxy);
2776
+ }
2777
+ else if (antlrcpp::is<DIDParser::OnewayContext*>(node)) {
2778
+ OnewayContextProxy proxy((DIDParser::OnewayContext*)node);
2779
+ return detail::To_Ruby<OnewayContextProxy>().convert(proxy);
2780
+ }
2781
+ else if (antlrcpp::is<tree::TerminalNodeImpl*>(node)) {
2782
+ TerminalNodeProxy proxy(node);
2783
+ return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
2784
+ } else {
2785
+ return Nil;
2786
+ }
2787
+ }
2788
+
2789
+
2790
+ extern "C"
2791
+ void Init_did_parser() {
2792
+ Module rb_mDIDParser = define_module("DIDParser");
2793
+
2794
+ rb_cToken = define_class_under<Token>(rb_mDIDParser, "Token")
2795
+ .define_method("text", &Token::getText)
2796
+ .define_method("channel", &Token::getChannel)
2797
+ .define_method("token_index", &Token::getTokenIndex);
2798
+
2799
+ rb_cParseTree = define_class_under<tree::ParseTree>(rb_mDIDParser, "ParseTree");
2800
+
2801
+ rb_cContextProxy = define_class_under<ContextProxy>(rb_mDIDParser, "Context")
2802
+ .define_method("children", &ContextProxy::getChildren)
2803
+ .define_method("child_count", &ContextProxy::childCount)
2804
+ .define_method("text", &ContextProxy::getText)
2805
+ .define_method("start", &ContextProxy::getStart)
2806
+ .define_method("stop", &ContextProxy::getStop)
2807
+ .define_method("parent", &ContextProxy::getParent)
2808
+ .define_method("==", &ContextProxy::doubleEquals);
2809
+
2810
+ rb_cTerminalNode = define_class_under<TerminalNodeProxy, ContextProxy>(rb_mDIDParser, "TerminalNodeImpl");
2811
+
2812
+ define_class_under<DIDParserBaseVisitor>(rb_mDIDParser, "Visitor")
2813
+ .define_director<VisitorProxy>()
2814
+ .define_constructor(Constructor<VisitorProxy, Object>())
2815
+ .define_method("visit", &VisitorProxy::ruby_visit)
2816
+ .define_method("visit_children", &VisitorProxy::ruby_visitChildren)
2817
+ .define_method("visit_program", &VisitorProxy::ruby_visitChildren)
2818
+ .define_method("visit_defination", &VisitorProxy::ruby_visitChildren)
2819
+ .define_method("visit_actor", &VisitorProxy::ruby_visitChildren)
2820
+ .define_method("visit_actortype", &VisitorProxy::ruby_visitChildren)
2821
+ .define_method("visit_name", &VisitorProxy::ruby_visitChildren)
2822
+ .define_method("visit_primitive", &VisitorProxy::ruby_visitChildren)
2823
+ .define_method("visit_component", &VisitorProxy::ruby_visitChildren)
2824
+ .define_method("visit_comptype", &VisitorProxy::ruby_visitChildren)
2825
+ .define_method("visit_option", &VisitorProxy::ruby_visitChildren)
2826
+ .define_method("visit_vector", &VisitorProxy::ruby_visitChildren)
2827
+ .define_method("visit_empty_record", &VisitorProxy::ruby_visitChildren)
2828
+ .define_method("visit_record", &VisitorProxy::ruby_visitChildren)
2829
+ .define_method("visit_empty_variant", &VisitorProxy::ruby_visitChildren)
2830
+ .define_method("visit_variant", &VisitorProxy::ruby_visitChildren)
2831
+ .define_method("visit_record_kv", &VisitorProxy::ruby_visitChildren)
2832
+ .define_method("visit_record_data", &VisitorProxy::ruby_visitChildren)
2833
+ .define_method("visit_variant_kv", &VisitorProxy::ruby_visitChildren)
2834
+ .define_method("visit_variant_name", &VisitorProxy::ruby_visitChildren)
2835
+ .define_method("visit_reftype", &VisitorProxy::ruby_visitChildren)
2836
+ .define_method("visit_functype", &VisitorProxy::ruby_visitChildren)
2837
+ .define_method("visit_empty_tuple", &VisitorProxy::ruby_visitChildren)
2838
+ .define_method("visit_tuple", &VisitorProxy::ruby_visitChildren)
2839
+ .define_method("visit_argtypes", &VisitorProxy::ruby_visitChildren)
2840
+ .define_method("visit_query", &VisitorProxy::ruby_visitChildren)
2841
+ .define_method("visit_oneway", &VisitorProxy::ruby_visitChildren)
2842
+ .define_method("visit_methodtype", &VisitorProxy::ruby_visitChildren);
2843
+
2844
+ rb_cParser = define_class_under<ParserProxy>(rb_mDIDParser, "Parser")
2845
+ .define_singleton_function("parse", &ParserProxy::parse)
2846
+ .define_singleton_function("parse_file", &ParserProxy::parseFile)
2847
+ .define_method("actor", &ParserProxy::actor, Return().keepAlive())
2848
+ .define_method("visit", &ParserProxy::visit, Return().keepAlive());
2849
+
2850
+ rb_cProgramContext = define_class_under<ProgramContextProxy, ContextProxy>(rb_mDIDParser, "ProgramContext")
2851
+ .define_method("defination", &ProgramContextProxy::defination)
2852
+ .define_method("defination_at", &ProgramContextProxy::definationAt)
2853
+ .define_method("actor", &ProgramContextProxy::actor);
2854
+
2855
+ rb_cDefinationContext = define_class_under<DefinationContextProxy, ContextProxy>(rb_mDIDParser, "DefinationContext")
2856
+ .define_method("datatype", &DefinationContextProxy::datatype)
2857
+ .define_method("Type", &DefinationContextProxy::Type)
2858
+ .define_method("Name", &DefinationContextProxy::Name)
2859
+ .define_method("Eq", &DefinationContextProxy::Eq)
2860
+ .define_method("Semicolon", &DefinationContextProxy::Semicolon);
2861
+
2862
+ rb_cActorContext = define_class_under<ActorContextProxy, ContextProxy>(rb_mDIDParser, "ActorContext")
2863
+ .define_method("actortype", &ActorContextProxy::actortype)
2864
+ .define_method("tuptype", &ActorContextProxy::tuptype)
2865
+ .define_method("Service", &ActorContextProxy::Service)
2866
+ .define_method("Colon", &ActorContextProxy::Colon)
2867
+ .define_method("Name", &ActorContextProxy::Name)
2868
+ .define_method("NameAt", &ActorContextProxy::Name)
2869
+ .define_method("Arrow", &ActorContextProxy::Arrow);
2870
+
2871
+ rb_cDatatypeContext = define_class_under<DatatypeContextProxy, ContextProxy>(rb_mDIDParser, "DatatypeContext");
2872
+
2873
+ rb_cActortypeContext = define_class_under<ActortypeContextProxy, ContextProxy>(rb_mDIDParser, "ActortypeContext")
2874
+ .define_method("methodtype", &ActortypeContextProxy::methodtype)
2875
+ .define_method("methodtype_at", &ActortypeContextProxy::methodtypeAt)
2876
+ .define_method("LeftB", &ActortypeContextProxy::LeftB)
2877
+ .define_method("RightB", &ActortypeContextProxy::RightB)
2878
+ .define_method("Semicolon", &ActortypeContextProxy::Semicolon)
2879
+ .define_method("SemicolonAt", &ActortypeContextProxy::Semicolon);
2880
+
2881
+ rb_cTuptypeContext = define_class_under<TuptypeContextProxy, ContextProxy>(rb_mDIDParser, "TuptypeContext");
2882
+
2883
+ rb_cMethodtypeContext = define_class_under<MethodtypeContextProxy, ContextProxy>(rb_mDIDParser, "MethodtypeContext")
2884
+ .define_method("functype", &MethodtypeContextProxy::functype)
2885
+ .define_method("Name", &MethodtypeContextProxy::Name)
2886
+ .define_method("Colon", &MethodtypeContextProxy::Colon);
2887
+
2888
+ rb_cPrimitiveContext = define_class_under<PrimitiveContextProxy, ContextProxy>(rb_mDIDParser, "PrimitiveContext")
2889
+ .define_method("PrimType", &PrimitiveContextProxy::PrimType);
2890
+
2891
+ rb_cComptypeContext = define_class_under<ComptypeContextProxy, ContextProxy>(rb_mDIDParser, "ComptypeContext")
2892
+ .define_method("constype", &ComptypeContextProxy::constype)
2893
+ .define_method("reftype", &ComptypeContextProxy::reftype);
2894
+
2895
+ rb_cComponentContext = define_class_under<ComponentContextProxy, ContextProxy>(rb_mDIDParser, "ComponentContext")
2896
+ .define_method("comptype", &ComponentContextProxy::comptype);
2897
+
2898
+ rb_cNameContext = define_class_under<NameContextProxy, ContextProxy>(rb_mDIDParser, "NameContext")
2899
+ .define_method("Name", &NameContextProxy::Name);
2900
+
2901
+ rb_cConstypeContext = define_class_under<ConstypeContextProxy, ContextProxy>(rb_mDIDParser, "ConstypeContext");
2902
+
2903
+ rb_cReftypeContext = define_class_under<ReftypeContextProxy, ContextProxy>(rb_mDIDParser, "ReftypeContext")
2904
+ .define_method("functype", &ReftypeContextProxy::functype)
2905
+ .define_method("actortype", &ReftypeContextProxy::actortype)
2906
+ .define_method("FUNC", &ReftypeContextProxy::FUNC)
2907
+ .define_method("Service", &ReftypeContextProxy::Service);
2908
+
2909
+ rb_cVariantContext = define_class_under<VariantContextProxy, ContextProxy>(rb_mDIDParser, "VariantContext")
2910
+ .define_method("variantfield", &VariantContextProxy::variantfield)
2911
+ .define_method("variantfield_at", &VariantContextProxy::variantfieldAt)
2912
+ .define_method("VARIANT", &VariantContextProxy::VARIANT)
2913
+ .define_method("LeftB", &VariantContextProxy::LeftB)
2914
+ .define_method("RightB", &VariantContextProxy::RightB)
2915
+ .define_method("Semicolon", &VariantContextProxy::Semicolon)
2916
+ .define_method("SemicolonAt", &VariantContextProxy::Semicolon);
2917
+
2918
+ rb_cVariantfieldContext = define_class_under<VariantfieldContextProxy, ContextProxy>(rb_mDIDParser, "VariantfieldContext");
2919
+
2920
+ rb_cEmptyRecordContext = define_class_under<EmptyRecordContextProxy, ContextProxy>(rb_mDIDParser, "EmptyRecordContext")
2921
+ .define_method("RECORD", &EmptyRecordContextProxy::RECORD)
2922
+ .define_method("LeftB", &EmptyRecordContextProxy::LeftB)
2923
+ .define_method("RightB", &EmptyRecordContextProxy::RightB);
2924
+
2925
+ rb_cEmptyVariantContext = define_class_under<EmptyVariantContextProxy, ContextProxy>(rb_mDIDParser, "EmptyVariantContext")
2926
+ .define_method("VARIANT", &EmptyVariantContextProxy::VARIANT)
2927
+ .define_method("LeftB", &EmptyVariantContextProxy::LeftB)
2928
+ .define_method("RightB", &EmptyVariantContextProxy::RightB);
2929
+
2930
+ rb_cOptionContext = define_class_under<OptionContextProxy, ContextProxy>(rb_mDIDParser, "OptionContext")
2931
+ .define_method("datatype", &OptionContextProxy::datatype)
2932
+ .define_method("OPT", &OptionContextProxy::OPT);
2933
+
2934
+ rb_cRecordContext = define_class_under<RecordContextProxy, ContextProxy>(rb_mDIDParser, "RecordContext")
2935
+ .define_method("recordfield", &RecordContextProxy::recordfield)
2936
+ .define_method("recordfield_at", &RecordContextProxy::recordfieldAt)
2937
+ .define_method("RECORD", &RecordContextProxy::RECORD)
2938
+ .define_method("LeftB", &RecordContextProxy::LeftB)
2939
+ .define_method("RightB", &RecordContextProxy::RightB)
2940
+ .define_method("Semicolon", &RecordContextProxy::Semicolon)
2941
+ .define_method("SemicolonAt", &RecordContextProxy::Semicolon);
2942
+
2943
+ rb_cRecordfieldContext = define_class_under<RecordfieldContextProxy, ContextProxy>(rb_mDIDParser, "RecordfieldContext");
2944
+
2945
+ rb_cVectorContext = define_class_under<VectorContextProxy, ContextProxy>(rb_mDIDParser, "VectorContext")
2946
+ .define_method("datatype", &VectorContextProxy::datatype)
2947
+ .define_method("VEC", &VectorContextProxy::VEC);
2948
+
2949
+ rb_cRecordDataContext = define_class_under<RecordDataContextProxy, ContextProxy>(rb_mDIDParser, "RecordDataContext")
2950
+ .define_method("datatype", &RecordDataContextProxy::datatype);
2951
+
2952
+ rb_cRecordKVContext = define_class_under<RecordKVContextProxy, ContextProxy>(rb_mDIDParser, "RecordKVContext")
2953
+ .define_method("datatype", &RecordKVContextProxy::datatype)
2954
+ .define_method("Name", &RecordKVContextProxy::Name)
2955
+ .define_method("Colon", &RecordKVContextProxy::Colon);
2956
+
2957
+ rb_cVariantNameContext = define_class_under<VariantNameContextProxy, ContextProxy>(rb_mDIDParser, "VariantNameContext")
2958
+ .define_method("Name", &VariantNameContextProxy::Name);
2959
+
2960
+ rb_cVariantKVContext = define_class_under<VariantKVContextProxy, ContextProxy>(rb_mDIDParser, "VariantKVContext")
2961
+ .define_method("datatype", &VariantKVContextProxy::datatype)
2962
+ .define_method("Name", &VariantKVContextProxy::Name)
2963
+ .define_method("Colon", &VariantKVContextProxy::Colon);
2964
+
2965
+ rb_cFunctypeContext = define_class_under<FunctypeContextProxy, ContextProxy>(rb_mDIDParser, "FunctypeContext")
2966
+ .define_method("tuptype", &FunctypeContextProxy::tuptype)
2967
+ .define_method("tuptype_at", &FunctypeContextProxy::tuptypeAt)
2968
+ .define_method("funcann", &FunctypeContextProxy::funcann)
2969
+ .define_method("Arrow", &FunctypeContextProxy::Arrow);
2970
+
2971
+ rb_cFuncannContext = define_class_under<FuncannContextProxy, ContextProxy>(rb_mDIDParser, "FuncannContext");
2972
+
2973
+ rb_cEmptyTupleContext = define_class_under<EmptyTupleContextProxy, ContextProxy>(rb_mDIDParser, "EmptyTupleContext")
2974
+ .define_method("LeftP", &EmptyTupleContextProxy::LeftP)
2975
+ .define_method("RightP", &EmptyTupleContextProxy::RightP);
2976
+
2977
+ rb_cTupleContext = define_class_under<TupleContextProxy, ContextProxy>(rb_mDIDParser, "TupleContext")
2978
+ .define_method("argtypes", &TupleContextProxy::argtypes)
2979
+ .define_method("LeftP", &TupleContextProxy::LeftP)
2980
+ .define_method("RightP", &TupleContextProxy::RightP);
2981
+
2982
+ rb_cArgtypesContext = define_class_under<ArgtypesContextProxy, ContextProxy>(rb_mDIDParser, "ArgtypesContext")
2983
+ .define_method("datatype", &ArgtypesContextProxy::datatype)
2984
+ .define_method("datatype_at", &ArgtypesContextProxy::datatypeAt)
2985
+ .define_method("Comma", &ArgtypesContextProxy::Comma)
2986
+ .define_method("CommaAt", &ArgtypesContextProxy::Comma)
2987
+ .define_method("Name", &ArgtypesContextProxy::Name)
2988
+ .define_method("Colon", &ArgtypesContextProxy::Colon);
2989
+
2990
+ rb_cQueryContext = define_class_under<QueryContextProxy, ContextProxy>(rb_mDIDParser, "QueryContext")
2991
+ .define_method("Query", &QueryContextProxy::Query);
2992
+
2993
+ rb_cOnewayContext = define_class_under<OnewayContextProxy, ContextProxy>(rb_mDIDParser, "OnewayContext")
2994
+ .define_method("Oneway", &OnewayContextProxy::Oneway);
2995
+ }
2996
+