Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/tecsgen
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- Location:
- EcnlProtoTool/trunk/asp3_dcre/tecsgen
- Files:
-
- 61 added
- 88 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_for_asp3
r270 r429 25 25 tecslib/core/tecs_lang.rb 26 26 tecslib/core/tecsgen.rb 27 tecslib/core/tecsinfo.rb 28 tecslib/core/tool_info.rb 27 29 tecslib/core/types.rb 30 tecslib/core/unjoin_plugin.rb 28 31 tecslib/core/value.rb 29 32 … … 36 39 tecslib/plugin/CellPlugin.rb 37 40 tecslib/plugin/CelltypePlugin.rb 41 tecslib/plugin/CompositePlugin.rb 38 42 tecslib/plugin/DomainPlugin.rb 39 43 tecslib/plugin/Mruby2CBridgePlugin.rb 40 44 tecslib/plugin/MrubyBridgePlugin.rb 45 tecslib/plugin/MultiPlugin.rb 41 46 tecslib/plugin/NotifierPlugin.rb 42 47 tecslib/plugin/RPCPlugin.rb … … 97 102 tecs/rpc/tTDR_inline.h 98 103 tecs/rpc/tecs_rpc.h 104 tecs/rpc/tMessageBufferCEP.cdl 105 tecs/rpc/tMessageBufferCEP_inline.h 106 tecs/rpc/tMessageBufferChannel.cdl -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_tecsgen_body
r270 r429 2 2 3 3 Makefile 4 4 tecscde 5 tecscde.rb 5 6 tecsgen 6 7 tecsgen.rb 8 tecsgen_rcov.rb 7 9 tecsmerge 8 10 tecsmerge.rb 9 tecslib/version.rb 10 11 cdelib/Makefile 12 cdelib/cell_plugin_dialog.rb 13 cdelib/cell_plugin_dialog_ui_definition.rb 14 cdelib/palette.rb 15 cdelib/saveload.rb 16 cdelib/tcontrol.rb 17 cdelib/tmodel.rb 18 cdelib/tview.rb 19 cdelib/version.rb 20 tecs/TECSInfo/TECSInfo.cdl 21 tecs/TECSInfo/TECSInfoAccessor.cdl 22 tecs/TECSInfo/nTECSInfo_tArrayTypeInfo.c 23 tecs/TECSInfo/nTECSInfo_tBoolTypeInfo.c 24 tecs/TECSInfo/nTECSInfo_tCallInfo.c 25 tecs/TECSInfo/nTECSInfo_tCellInfo.c 26 tecs/TECSInfo/nTECSInfo_tCelltypeInfo.c 27 tecs/TECSInfo/nTECSInfo_tDefinedTypeInfo.c 28 tecs/TECSInfo/nTECSInfo_tDescriptorTypeInfo.c 29 tecs/TECSInfo/nTECSInfo_tEntryInfo.c 30 tecs/TECSInfo/nTECSInfo_tFloatTypeInfo.c 31 tecs/TECSInfo/nTECSInfo_tFunctionInfo.c 32 tecs/TECSInfo/nTECSInfo_tIntTypeInfo.c 33 tecs/TECSInfo/nTECSInfo_tNamespaceInfo.c 34 tecs/TECSInfo/nTECSInfo_tParamInfo.c 35 tecs/TECSInfo/nTECSInfo_tPtrTypeInfo.c 36 tecs/TECSInfo/nTECSInfo_tRawEntryDescriptorInfo.c 37 tecs/TECSInfo/nTECSInfo_tRegionInfo.c 38 tecs/TECSInfo/nTECSInfo_tSignatureInfo.c 39 tecs/TECSInfo/nTECSInfo_tStructTypeInfo.c 40 tecs/TECSInfo/nTECSInfo_tTECSInfoAccessor.c 41 tecs/TECSInfo/nTECSInfo_tTECSInfoSub.c 42 tecs/TECSInfo/nTECSInfo_tTECSInfo_inline.h 43 tecs/TECSInfo/nTECSInfo_tTypeInfo.c 44 tecs/TECSInfo/nTECSInfo_tVarDeclInfo.c 45 tecs/TECSInfo/nTECSInfo_tVoidTypeInfo.c 46 tecs/TECSInfo/tTECSInfoAccessor.c 47 tecs/TLSFMalloc/README-TLSF.txt 48 tecs/TLSFMalloc/tTLSFMalloc.cdl 49 tecs/TLSFMalloc/tTLSFMalloc_inline.h 50 tecs/mruby/README-mruby.txt 51 tecs/mruby/TECSPointer.h 52 tecs/mruby/TECSStruct.h 53 tecs/mruby/mruby.cdl 54 tecs/mruby/mrubyBridge.txt 55 tecs/mruby/mrubyInitializer.cdl 56 tecs/mruby/mrubyPointers.cdl 57 tecs/mruby/mrubyTECSPointer.txt 58 tecs/mruby/mrubyTECSStruct.txt 59 tecs/mruby/mrubyVMs.cdl 60 tecs/mruby/nMruby_tBoolPointer.c 61 tecs/mruby/nMruby_tCharPointer.c 62 tecs/mruby/nMruby_tDouble64Pointer.c 63 tecs/mruby/nMruby_tFloat32Pointer.c 64 tecs/mruby/nMruby_tInt16Pointer.c 65 tecs/mruby/nMruby_tInt32Pointer.c 66 tecs/mruby/nMruby_tInt64Pointer.c 67 tecs/mruby/nMruby_tInt8Pointer.c 68 tecs/mruby/nMruby_tIntPointer.c 69 tecs/mruby/nMruby_tLongPointer.c 70 tecs/mruby/nMruby_tMruby.c 71 tecs/mruby/nMruby_tMrubyCyclicTaskBody.c 72 tecs/mruby/nMruby_tMrubyProc.c 73 tecs/mruby/nMruby_tMrubyTaskBody.c 74 tecs/mruby/nMruby_tMrubyVM.c 75 tecs/mruby/nMruby_tSCharPointer.c 76 tecs/mruby/nMruby_tShortPointer.c 77 tecs/mruby/nMruby_tTECSInitializer.c 78 tecs/mruby/nMruby_tUCharPointer.c 79 tecs/mruby/nMruby_tUInt16Pointer.c 80 tecs/mruby/nMruby_tUInt32Pointer.c 81 tecs/mruby/nMruby_tUInt64Pointer.c 82 tecs/mruby/nMruby_tUInt8Pointer.c 83 tecs/mruby/nMruby_tUIntPointer.c 84 tecs/mruby/nMruby_tULongPointer.c 85 tecs/mruby/nMruby_tUShortPointer.c 86 tecs/mruby/sMruby.cdl 87 tecs/mruby/tMruby.cdl 88 tecs/mruby/tecs_mruby.h 89 tecs/posix/posix.cdl 90 tecs/rpc/PPAllocator.cdl 91 tecs/rpc/RPCTask.cdl 92 tecs/rpc/TDR.cdl 93 tecs/rpc/rpc.cdl 94 tecs/rpc/rpc_string.h 95 tecs/rpc/sChannel.cdl 96 tecs/rpc/sRPCErrorHandler.cdl 97 tecs/rpc/tDataqueueAdaptor_inline.h 98 tecs/rpc/tDataqueueOWChannel.cdl 99 tecs/rpc/tMessageBufferCEP.cdl 100 tecs/rpc/tMessageBufferCEP_inline.h 101 tecs/rpc/tMessageBufferChannel.cdl 102 tecs/rpc/tNBOTDR_inline.h 103 tecs/rpc/tPPAllocator.c 104 tecs/rpc/tRPCDedicatedTaskMain.c 105 tecs/rpc/tRPCDedicatedTaskMainWithOpener.c 106 tecs/rpc/tRPCSharedChannelMan.c 107 tecs/rpc/tRPCSharedTaskMain.c 108 tecs/rpc/tRPCSharedTaskMainWithOpener.c 109 tecs/rpc/tSocketChannel.cdl 110 tecs/rpc/tSocketClient.c 111 tecs/rpc/tSocketServer.c 112 tecs/rpc/tTDR_inline.h 113 tecs/rpc/tTINETChannel.cdl 114 tecs/rpc/tTINETClient.c 115 tecs/rpc/tTINETServer.c 116 tecs/rpc/tecs_rpc.h 117 tecs/sMalloc.cdl 118 tecs/tecs.h 119 tecs/tecs.xsd 11 120 tecslib/core/C_parser.tab.rb 12 121 tecslib/core/C_parser.y.rb … … 26 135 tecslib/core/tecs_lang.rb 27 136 tecslib/core/tecsgen.rb 137 tecslib/core/tecsinfo.rb 138 tecslib/core/tool_info.rb 28 139 tecslib/core/types.rb 140 tecslib/core/unjoin_plugin.rb 29 141 tecslib/core/value.rb 30 31 142 tecslib/messages/messages_console_en_US.rb 32 143 tecslib/messages/messages_console_ja_JP.rb 33 144 tecslib/messages/messages_file_en_US.rb 34 145 tecslib/messages/messages_file_ja_JP.rb 35 36 146 tecslib/plugin/ATK1AlarmPlugin.rb 37 147 tecslib/plugin/ATK1DelayTaskPlugin.rb … … 44 154 tecslib/plugin/CellPlugin.rb 45 155 tecslib/plugin/CelltypePlugin.rb 156 tecslib/plugin/CompositePlugin.rb 46 157 tecslib/plugin/DomainPlugin.rb 47 158 tecslib/plugin/HRP2AlarmHandlerPlugin.rb … … 61 172 tecslib/plugin/HRP2SemaphorePlugin.rb 62 173 tecslib/plugin/HRP2TaskPlugin.rb 174 tecslib/plugin/HRPHandlerPlugin.rb 175 tecslib/plugin/HRPKernelObjectManager.rb 176 tecslib/plugin/HRPKernelObjectPlugin.rb 177 tecslib/plugin/HRPObjectPlugin.rb 178 tecslib/plugin/HRPPlugin.rb 179 tecslib/plugin/HRPRPCPlugin.rb 180 tecslib/plugin/HRPSVCPlugin.rb 181 tecslib/plugin/HRPTaskPlugin.rb 63 182 tecslib/plugin/Mruby2CBridgePlugin.rb 183 tecslib/plugin/MrubyBridgeCellPlugin.rb 184 tecslib/plugin/MrubyBridgeCelltypePlugin.rb 185 tecslib/plugin/MrubyBridgeCompositePlugin.rb 64 186 tecslib/plugin/MrubyBridgePlugin.rb 187 tecslib/plugin/MrubyBridgeSignaturePlugin.rb 188 tecslib/plugin/MultiPlugin.rb 65 189 tecslib/plugin/NotifierPlugin.rb 66 190 tecslib/plugin/OpaqueMarshalerPlugin.rb 67 191 tecslib/plugin/OpaqueRPCPlugin.rb 68 192 tecslib/plugin/RPCPlugin.rb 193 tecslib/plugin/RepeatCellPlugin.rb 194 tecslib/plugin/RepeatJoinPlugin.rb 69 195 tecslib/plugin/SharedOpaqueRPCPlugin.rb 70 196 tecslib/plugin/SharedRPCPlugin.rb 71 197 tecslib/plugin/SignaturePlugin.rb 72 198 tecslib/plugin/TECS2CBridgePlugin.rb 199 tecslib/plugin/TECSInfoPlugin.rb 73 200 tecslib/plugin/ThroughPlugin.rb 74 201 tecslib/plugin/TracePlugin.rb … … 77 204 tecslib/plugin/lib/GenParamCopy.rb 78 205 tecslib/plugin/lib/GenTransparentMarshaler.rb 79 80 tecs/mruby/TECSPointer.h 81 tecs/mruby/TECSStruct.h 82 tecs/mruby/mruby.cdl 83 tecs/mruby/mrubyInitializer.cdl 84 tecs/mruby/mrubyPointers.cdl 85 tecs/mruby/mrubyVMs.cdl 86 tecs/mruby/nMruby_tBoolPointer.c 87 tecs/mruby/nMruby_tCharPointer.c 88 tecs/mruby/nMruby_tDouble64Pointer.c 89 tecs/mruby/nMruby_tFloat32Pointer.c 90 tecs/mruby/nMruby_tInt16Pointer.c 91 tecs/mruby/nMruby_tInt32Pointer.c 92 tecs/mruby/nMruby_tInt64Pointer.c 93 tecs/mruby/nMruby_tInt8Pointer.c 94 tecs/mruby/nMruby_tIntPointer.c 95 tecs/mruby/nMruby_tLongPointer.c 96 tecs/mruby/nMruby_tMruby.c 97 tecs/mruby/nMruby_tMrubyProc.c 98 tecs/mruby/nMruby_tMrubyProc_1_0.c 99 tecs/mruby/nMruby_tSCharPointer.c 100 tecs/mruby/nMruby_tShortPointer.c 101 tecs/mruby/nMruby_tTECSInitializer.c 102 tecs/mruby/nMruby_tUCharPointer.c 103 tecs/mruby/nMruby_tUInt16Pointer.c 104 tecs/mruby/nMruby_tUInt32Pointer.c 105 tecs/mruby/nMruby_tUInt64Pointer.c 106 tecs/mruby/nMruby_tUInt8Pointer.c 107 tecs/mruby/nMruby_tUIntPointer.c 108 tecs/mruby/nMruby_tULongPointer.c 109 tecs/mruby/nMruby_tUShortPointer.c 110 tecs/mruby/tMruby.cdl 111 tecs/mruby/tecs_mruby.h 112 tecs/posix/posix.cdl 113 tecs/rpc/PPAllocator.cdl 114 tecs/rpc/RPCTask.cdl 115 tecs/rpc/TDR.cdl 116 tecs/rpc/rpc.cdl 117 tecs/rpc/rpc_string.h 118 tecs/rpc/sChannel.cdl 119 tecs/rpc/sRPCErrorHandler.cdl 120 tecs/rpc/tDataqueueAdaptor_inline.h 121 tecs/rpc/tDataqueueOWChannel.cdl 122 tecs/rpc/tNBOTDR_inline.h 123 tecs/rpc/tPPAllocator.c 124 tecs/rpc/tRPCDedicatedTaskMain.c 125 tecs/rpc/tRPCDedicatedTaskMainWithOpener.c 126 tecs/rpc/tRPCSharedChannelMan.c 127 tecs/rpc/tRPCSharedTaskMain.c 128 tecs/rpc/tRPCSharedTaskMainWithOpener.c 129 tecs/rpc/tSocketChannel.cdl 130 tecs/rpc/tSocketClient.c 131 tecs/rpc/tSocketServer.c 132 tecs/rpc/tTDR_inline.h 133 tecs/rpc/tTINETChannel.cdl 134 tecs/rpc/tTINETClient.c 135 tecs/rpc/tTINETServer.c 136 tecs/rpc/tecs_rpc.h 137 tecs/tecs.h 138 tecs/tecs.xsd 206 tecslib/plugin/lib/MrubyBridgeCelltypePluginModule.rb 207 tecslib/version.rb -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/Makefile
r321 r429 34 34 # の責任を負わない. 35 35 # 36 # $Id $36 # $Id: Makefile 2640 2017-06-03 11:27:12Z okuma-top $ 37 37 #++ 38 38 … … 76 76 C_TAB = $(LIB_PATH)/C_parser.tab.rb 77 77 EXERB_EXE = tecsgen.exe 78 EXERB_EXY = tecsgen.exy79 78 80 79 all: generator … … 105 104 racc -v -g -o $(GEN_TAB_DEB) $(BNF) # yydebug を有効にする 106 105 107 # exerb : $(EXERB_EXE)108 exerb :109 @echo "!!! please build using ActiveScriptRuby !!!"110 exit 1111 112 # $(EXERB_EXE) : $(EXERB_EXY) $(GEN_SRC) $(PLUGIN_SRC)113 # exerb $(EXERB_EXY)114 # tecsgen.exy.ini から tecsgen.exy を生成するのは util/release.sh により行われる115 # MANIFEST に記載のバージョン番号が、tecsgen.exy.ini の文字列置換により、埋め込まれる116 117 exerb_check : $(EXERB_EXE)118 119 $(EXERB_EXE) : $(EXERB_EXY) $(GEN_SRC) $(PLUGIN_SRC)120 @echo "### Need make_tecsgen_exerb on ActiveScriptRuby to update tecsgen.exerb ###"121 122 106 print_error : # エラーメッセージを拾い出す 123 107 grep -e "Generator\.error" -e cdl_error $(LIB_PATH)/*.rb \ 124 108 | grep -v bnf.tab.rb \ 125 | sed -e "s/\s*Generator\.error(/ /" -e "s/\s*cdl_error(//" -e "s/).*$$//"109 | sed -e "s/\s*Generator\.error(//" -e "s/\s*cdl_error[0-9]*(//" -e "s/).*$$//" 126 110 127 111 print_error2 : # エラーメッセージを拾い出す -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/in_exerb.rb
r321 r429 35 35 # の責任を負わない. 36 36 # 37 # $Id $37 # $Id: in_exerb.rb 1011 2016-07-11 02:20:01Z coas-nagasima $ 38 38 #++ 39 39 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h
r321 r429 102 102 { \ 103 103 if( sizeof( type ) > sizeof( mrb_int ) ){ \ 104 if( val > = (((type)1) << (sizeof(mrb_int)*8-1))\105 || val < -(((type)1) << (sizeof(mrb_int)*8-1))) \104 if( val > TYPE ## _MAX \ 105 || val < TYPE ## _MIN ) \ 106 106 /* '=' unecessary for negative value */ \ 107 107 /* ignore warning on int32_t */ \ … … 126 126 { \ 127 127 if( sizeof( type ) > sizeof( mrb_int ) ){ \ 128 if( val >= (((type)1) << (sizeof(mrb_int)*8)))\128 if( val > TYPE ## _MAX ) \ 129 129 /* '=' unecessary for negative value */ \ 130 130 /* ignore warning on int32_t */ \ … … 148 148 VALCHECK_MRB_INT( Int16, INT16, int16_t ) 149 149 VALCHECK_UINT( UInt8, UINT8, uint8_t ) 150 #define VALCHECK_MRB_UInt8 150 #define VALCHECK_MRB_UInt8(mrb,val) 151 151 VALCHECK_UINT( UInt16, UINT16, uint16_t ) 152 #define VALCHECK_MRB_UInt16 152 #define VALCHECK_MRB_UInt16(mrb,val) 153 153 VALCHECK_INT( Int32, INT32, int32_t ) 154 #define VALCHECK_MRB_Int32 154 #define VALCHECK_MRB_Int32(mrb,val) 155 155 VALCHECK_UINT( UInt32, UINT32, uint32_t ) 156 #define VALCHECK_MRB_UInt32 156 #define VALCHECK_MRB_UInt32(mrb,val) 157 157 158 158 VALCHECK_INT( Int64, INT64, int64_t ) … … 163 163 VALCHECK_MRB_UINT( UInt64, UINT64, uint64_t ) 164 164 #else 165 #define VALCHECK_MRB_Int64 // 範囲チェックが無意味であるため、警告が出るのを回避する166 #define VALCHECK_MRB_UInt64 // 範囲チェックが無意味であるため、警告が出るのを回避する165 #define VALCHECK_MRB_Int64(mrb,val) // 範囲チェックが無意味であるため、警告が出るのを回避する 166 #define VALCHECK_MRB_UInt64(mrb,val) // 範囲チェックが無意味であるため、警告が出るのを回避する 167 167 #endif 168 168 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSStruct.h
r321 r429 105 105 Struct_ ## TAG ## _initialize( mrb_state *mrb, mrb_value self) \ 106 106 { \ 107 mrb_int length; \108 struct TAG *structBody; \109 107 \ 110 108 DATA_TYPE( self ) = &Struct ## TAG ## Body_mrb_data_type; \ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mruby.cdl
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 import_C( "tecs_mruby.h" ); 2 37 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyInitializer.cdl
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 1 35 2 36 namespace nMruby{ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyPointers.cdl
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 // Pointer celltypes 2 37 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyVMs.cdl
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 import( <posix.cdl> ); 2 37 3 38 /* 4 * tools/mruby/mruby.c から cInit_initializeBridge( mrb ) を呼び出すように変更したもの 39 * POSIX 環境用の VM 40 * mrbgems の mrbgems/mruby-bin-mruby/tools/mruby/mruby.c を参考に作成したもの 5 41 */ 6 42 namespace nMruby{ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tBoolPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tCharPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tDouble64Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tFloat32Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 36 1 37 /* #[<PREAMBLE>]# 2 38 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt16Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt32Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt64Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2012 by Ubiquitous Computing and Networking Laboratory 3 * Ritsumeikan Univ., JAPAN 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt8Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tIntPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tLongPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMruby.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc.c
r321 r429 1 1 /* 2 * This file comes from mruby. (renamed from tools/mruby/mruby.c) 3 * This file is distributed under ruby's license. (not under TOPPERS license) 4 * see https://github.com/mruby/mruby 5 * A little modification is done to to call initializer registering TECS components. 2 * Copyright (C) 2008-2017 by TOPPERS Project 6 3 * 7 * このファイルは、mruby のものです。 8 * mruby のライセンスのもとで、配布されます。(TOPPERS ライセンスではありません) 9 * 参照: https://github.com/mruby/mruby 10 * TECS コンポーネントを登録する初期化子を呼ぶため、少しの修正がなされています。 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 11 34 */ 12 35 13 #include "nMruby_tMrubyProc_tecsgen.h" 36 /* 37 * 以前の nMruby_tMrubyProc.c は、mruby の本体に含まれていた 38 * mrbgems/mruby-bin-mruby/tools/mruby/mruby.c 39 * をベースに TECS のコードを足していたが、TOPPERS ライセンスと異なるため 40 * 新たに書き下ろした。(小さなコードのため、概ね似たようなものになるが。 41 */ 14 42 15 43 #include <stdio.h> … … 17 45 #include <string.h> 18 46 #include "mruby.h" 47 #include "mruby/string.h" 19 48 #include "mruby/array.h" 20 49 #include "mruby/compile.h" … … 22 51 #include "mruby/variable.h" 23 52 24 #ifndef ENABLE_STDIO 25 static void 26 p(mrb_state *mrb, mrb_value obj) 27 { 28 obj = mrb_funcall(mrb, obj, "inspect", 0); 29 fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout); 30 putc('\n', stdout); 31 } 32 #else 33 #define p(mrb,obj) mrb_p(mrb,obj) 53 /* #[<PREAMBLE>]# 54 * Don't edit the comments between #[<...>]# and #[</...>]# 55 * These comment are used by tecsmerege when merging. 56 * 57 * attr access macro #_CAAM_# 58 * mrb mrb_state* VAR_mrb 59 * 60 * call port function #_TCPF_# 61 * call port: cInit signature: nMruby_sInitializeBridge context:task optional:true 62 * bool_t is_cInit_joined() check if joined 63 * void cInit_initializeBridge( const mrb_state* mrb ); 64 * 65 * #[</PREAMBLE>]# */ 66 67 /* プロトタイプ宣言や変数の定義をここに書きます #_PAC_# */ 68 #include "nMruby_tMrubyProc_tecsgen.h" 69 70 #ifndef E_OK 71 #define E_OK 0 /* success */ 72 #define E_ID (-18) /* illegal ID */ 34 73 #endif 35 74 36 void mrb_show_version(mrb_state *); 37 void mrb_show_copyright(mrb_state *); 75 /* 受け口関数 #_TEPF_# */ 76 /* #[<ENTRY_PORT>]# eMain 77 * entry port: eMain 78 * signature: nPosix_sMain 79 * context: task 80 * #[</ENTRY_PORT>]# */ 38 81 39 struct _args { 40 FILE *rfp; 41 char* cmdline; 42 mrb_bool fname : 1; 43 mrb_bool mrbfile : 1; 44 mrb_bool check_syntax : 1; 45 mrb_bool verbose : 1; 46 int argc; 47 char** argv; 48 }; 82 /* #[<ENTRY_FUNC>]# eMain_main 83 * name: eMain_main 84 * global_name: nMruby_tMrubyProc_eMain_main 85 * oneway: false 86 * #[</ENTRY_FUNC>]# */ 87 int 88 eMain_main(CELLIDX idx, int argc, const char** argv) 89 { 90 CELLCB *p_cellcb; 91 mrb_state *mrb; 92 mrbc_context* context; 93 if (VALID_IDX(idx)) { 94 p_cellcb = GET_CELLCB(idx); 95 } 96 else { 97 /* エラー処理コードをここに記述します */ 98 return -1; 99 } /* end if VALID_IDX(idx) */ 49 100 50 static void 51 usage(const char *name) 52 { 53 static const char *const usage_msg[] = {54 "switches:",55 "-b load and execute RiteBinary (mrb) file",56 "-c check syntax only",57 "-e 'command' one line of script",58 "-v print version number, then run in verbose mode",59 "--verbose run in verbose mode",60 "--version print the version",61 "--copyright print the copyright",62 NULL63 };64 const char *const *p = usage_msg;101 /* ここに処理本体を記述します #_TEFB_# */ 102 if (argc != 2) { 103 printf("usage: %s script.rb\n", argv[0]); 104 goto error_return; 105 } 106 mrb = mrb_open(); 107 if( mrb == 0 ){ 108 printf("%s: mrb_open() failed\n", argv[0]); 109 goto error_return; 110 } 111 context = mrbc_context_new(mrb); 112 if (context == 0) { 113 printf("%s: mrbc_context_new() failed\n", argv[0]); 114 goto error_close; 115 } 65 116 66 printf("Usage: %s [switches] programfile\n", name); 67 while (*p) 68 printf(" %s\n", *p++); 117 /*-------- ARGV ----------*/ 118 { 119 mrb_value ARGV = mrb_ary_new_capa(mrb, argc); 120 int i; 121 for (i = 0; i < argc; i++) { 122 mrb_ary_push(mrb, ARGV, mrb_str_new_cstr(mrb, argv[i])); 123 } 124 mrb_define_global_const(mrb, "ARGV", ARGV); 125 } 126 /*-------- $0 ----------*/ 127 { 128 mrb_sym zero_sym = mrb_intern_lit(mrb, "$0"); 129 mrbc_filename(mrb, context, argv[0]); 130 mrb_gv_set(mrb, zero_sym, mrb_str_new_cstr(mrb, argv[0])); 131 } 132 133 /* ------- register TECS bridge classes -------*/ 134 if (is_cInit_joined()) { 135 cInit_initializeBridge(mrb); 136 } 137 138 /*-------- load .rb file -------*/ 139 { 140 FILE *file = fopen(argv[1], "r"); 141 if (file == NULL) { 142 printf("file not found: %s\n", argv[1]); 143 goto error_free; 144 } 145 146 mrb_value val = mrb_load_file_cxt(mrb, file, context); 147 if (mrb->exc) { 148 if(! mrb_undef_p(val)){ 149 mrb_print_error(mrb); 150 } 151 } 152 } 153 154 /*---------- success case --------*/ 155 mrbc_context_free(mrb, context); 156 mrb_close( mrb ); 157 return 0; 158 159 /*---------- error case ----------*/ 160 error_free: 161 mrbc_context_free(mrb, context); 162 error_close: 163 mrb_close( mrb ); 164 error_return: 165 166 return -1; 69 167 } 70 168 71 static int 72 parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args) 73 { 74 char **origargv = argv; 75 static const struct _args args_zero = { 0 }; 76 77 *args = args_zero; 78 79 for (argc--,argv++; argc > 0; argc--,argv++) { 80 char *item; 81 if (argv[0][0] != '-') break; 82 83 if (strlen(*argv) <= 1) { 84 argc--; argv++; 85 args->rfp = stdin; 86 break; 87 } 88 89 item = argv[0] + 1; 90 switch (*item++) { 91 case 'b': 92 args->mrbfile = TRUE; 93 break; 94 case 'c': 95 args->check_syntax = TRUE; 96 break; 97 case 'e': 98 if (item[0]) { 99 goto append_cmdline; 100 } 101 else if (argc > 1) { 102 argc--; argv++; 103 item = argv[0]; 104 append_cmdline: 105 if (!args->cmdline) { 106 size_t buflen; 107 char *buf; 108 109 buflen = strlen(item) + 1; 110 buf = (char *)mrb_malloc(mrb, buflen); 111 memcpy(buf, item, buflen); 112 args->cmdline = buf; 113 } 114 else { 115 size_t cmdlinelen; 116 size_t itemlen; 117 118 cmdlinelen = strlen(args->cmdline); 119 itemlen = strlen(item); 120 args->cmdline = 121 (char *)mrb_realloc(mrb, args->cmdline, cmdlinelen + itemlen + 2); 122 args->cmdline[cmdlinelen] = '\n'; 123 memcpy(args->cmdline + cmdlinelen + 1, item, itemlen + 1); 124 } 125 } 126 else { 127 printf("%s: No code specified for -e\n", *origargv); 128 return EXIT_SUCCESS; 129 } 130 break; 131 case 'v': 132 if (!args->verbose) mrb_show_version(mrb); 133 args->verbose = TRUE; 134 break; 135 case '-': 136 if (strcmp((*argv) + 2, "version") == 0) { 137 mrb_show_version(mrb); 138 exit(EXIT_SUCCESS); 139 } 140 else if (strcmp((*argv) + 2, "verbose") == 0) { 141 args->verbose = TRUE; 142 break; 143 } 144 else if (strcmp((*argv) + 2, "copyright") == 0) { 145 mrb_show_copyright(mrb); 146 exit(EXIT_SUCCESS); 147 } 148 default: 149 return EXIT_FAILURE; 150 } 151 } 152 153 if (args->rfp == NULL && args->cmdline == NULL) { 154 if (*argv == NULL) args->rfp = stdin; 155 else { 156 args->rfp = fopen(argv[0], args->mrbfile ? "rb" : "r"); 157 if (args->rfp == NULL) { 158 printf("%s: Cannot open program file. (%s)\n", *origargv, *argv); 159 return EXIT_FAILURE; 160 } 161 args->fname = TRUE; 162 args->cmdline = argv[0]; 163 argc--; argv++; 164 } 165 } 166 args->argv = (char **)mrb_realloc(mrb, args->argv, sizeof(char*) * (argc + 1)); 167 memcpy(args->argv, argv, (argc+1) * sizeof(char*)); 168 args->argc = argc; 169 170 return EXIT_SUCCESS; 171 } 172 173 static void 174 cleanup(mrb_state *mrb, struct _args *args) 175 { 176 if (args->rfp && args->rfp != stdin) 177 fclose(args->rfp); 178 if (args->cmdline && !args->fname) 179 mrb_free(mrb, args->cmdline); 180 if (args->argv) 181 mrb_free(mrb, args->argv); 182 mrb_close(mrb); 183 } 184 185 int 186 // main(int argc, char **argv) 187 eMain_main( CELLIDX idx, int argc, const char **argv) 188 189 { 190 CELLCB *p_cellcb = GET_CELLCB( idx ); 191 mrb_state *mrb = mrb_open(); 192 int n = -1; 193 int i; 194 struct _args args; 195 mrb_value ARGV; 196 mrbc_context *c; 197 mrb_value v; 198 mrb_sym zero_sym; 199 200 cInit_initializeBridge( mrb ); // TECS 201 202 203 if (mrb == NULL) { 204 fputs("Invalid mrb_state, exiting mruby\n", stderr); 205 return EXIT_FAILURE; 206 } 207 208 n = parse_args(mrb, argc, (char **)argv, &args); 209 if (n == EXIT_FAILURE || (args.cmdline == NULL && args.rfp == NULL)) { 210 cleanup(mrb, &args); 211 usage(argv[0]); 212 return n; 213 } 214 215 ARGV = mrb_ary_new_capa(mrb, args.argc); 216 for (i = 0; i < args.argc; i++) { 217 mrb_ary_push(mrb, ARGV, mrb_str_new_cstr(mrb, args.argv[i])); 218 } 219 mrb_define_global_const(mrb, "ARGV", ARGV); 220 221 c = mrbc_context_new(mrb); 222 if (args.verbose) 223 c->dump_result = TRUE; 224 if (args.check_syntax) 225 c->no_exec = TRUE; 226 227 /* Set $0 */ 228 zero_sym = mrb_intern_lit(mrb, "$0"); 229 if (args.rfp) { 230 char *cmdline; 231 cmdline = args.cmdline ? args.cmdline : "-"; 232 mrbc_filename(mrb, c, cmdline); 233 mrb_gv_set(mrb, zero_sym, mrb_str_new_cstr(mrb, cmdline)); 234 } 235 else { 236 mrbc_filename(mrb, c, "-e"); 237 mrb_gv_set(mrb, zero_sym, mrb_str_new_lit(mrb, "-e")); 238 } 239 240 /* Load program */ 241 if (args.mrbfile) { 242 v = mrb_load_irep_file_cxt(mrb, args.rfp, c); 243 } 244 else if (args.rfp) { 245 v = mrb_load_file_cxt(mrb, args.rfp, c); 246 } 247 else { 248 v = mrb_load_string_cxt(mrb, args.cmdline, c); 249 } 250 251 mrbc_context_free(mrb, c); 252 if (mrb->exc) { 253 if (!mrb_undef_p(v)) { 254 mrb_print_error(mrb); 255 } 256 n = -1; 257 } 258 else if (args.check_syntax) { 259 printf("Syntax OK\n"); 260 } 261 cleanup(mrb, &args); 262 263 return n == 0 ? EXIT_SUCCESS : EXIT_FAILURE; 264 } 169 /* #[<POSTAMBLE>]# 170 * Put non-entry functions below. 171 * #[</POSTAMBLE>]#*/ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tSCharPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tShortPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tTECSInitializer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUCharPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt16Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt32Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt64Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt8Pointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUIntPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tULongPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUShortPointer.c
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 /* #[<PREAMBLE>]# 2 37 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tMruby.cdl
r321 r429 1 2 1 /* 3 2 * Copyright (C) 2012 by Ubiquitous Computing and Networking Laboratory … … 38 37 39 38 import(<mruby.cdl>); 39 import(<sMruby.cdl>); 40 import(<tTLSFMalloc.cdl>); 40 41 41 42 namespace nMruby{ 42 celltype tMruby{ 43 entry sTaskBody eMrubyBody; 43 44 /*** mruby VM ***/ 45 celltype tMrubyVM{ 46 entry sMrubyVM eMrubyVM; 44 47 attr{ 45 48 [omit]char_t *mrubyFile; 46 c har_t *irep=C_EXP("&$cell_global$_irep");49 const uint8_t *irep=C_EXP("$cell_global$_irep"); 47 50 }; 48 49 /* write関数の接続先 */ 50 // [optional] call sSerialPort cSerialPort; 51 var{ 52 mrb_irep *var_irep; 53 mrb_state *mrb; 54 struct RProc *rproc; 55 }; 56 57 /* MrubyBridgePlugin の生成する VM_TECSInitializeer.eInitialize へ結合する */ 51 58 [optional] call sInitializeBridge cInit; 52 59 /* 60 * アロケータ 61 * 他と共有しないのであれば、このアロケータは排他制御される必要はない 62 */ 63 call sMalloc cMalloc; 64 53 65 FACTORY{ 54 66 write("Makefile.tecsgen", "clean_mrb_c :"); … … 61 73 write("Makefile.tecsgen", "TECS_COBJS := $(TECS_COBJS) $cell_global$_mrb.o"); 62 74 write("Makefile.tecsgen", "MRB_C := $(MRB_C) $cell_global$_mrb.c"); 63 write("$ct_global$_factory.h","extern const char_t *$cell_global$_irep;");75 write("$ct_global$_factory.h","extern const uint8_t $cell_global$_irep[];"); 64 76 }; 65 77 }; 78 79 /*** Standard Task Versoin ***/ 80 /* 81 * tMruby の eMrubyBody.main が、繰り返し起床されることは想定されていません。 82 */ 83 celltype tMrubyTaskBody{ 84 entry sTaskBody eMrubyBody; 85 call sMrubyVM cMrubyVM; 86 }; 87 composite tMruby{ 88 entry sTaskBody eMrubyBody; 89 [optional] call sInitializeBridge cInit; 90 attr{ 91 [omit]char_t *mrubyFile; 92 size_t memoryPoolSize = 1024 * 1024; /** 1MB default **/ 93 /* note: this requires enough memory */ 94 /* please pay attention to memory layout */ 95 }; 96 97 /** **/ 98 cell tMrubyVM MrubyVM{ 99 mrubyFile = composite.mrubyFile; 100 cInit => composite.cInit; 101 cMalloc = TLSFMalloc.eMalloc; 102 }; 103 cell tMrubyTaskBody MrubyTaskBody { 104 cMrubyVM = MrubyVM.eMrubyVM; 105 }; 106 cell tTLSFMalloc TLSFMalloc { 107 memoryPoolSize = composite.memoryPoolSize; 108 }; 109 composite.eMrubyBody => MrubyTaskBody.eMrubyBody; 110 }; 111 112 /*** Cyclic Task Versoin ***/ 113 /* 114 * tMrubyCyclic の eMrubyBody.main が繰り返し呼び出されることが想定されています。 115 * この実装では mrb_close は呼び出されません (終了は、突然電源が切れることを想定) 116 */ 117 celltype tMrubyCyclicTaskBody{ 118 entry sTaskBody eMrubyBody; 119 call sMrubyVM cMrubyVM; 120 var { 121 bool_t b_init; 122 }; 123 }; 124 composite tMrubyCyclic{ 125 entry sTaskBody eMrubyBody; 126 [optional] call sInitializeBridge cInit; 127 attr{ 128 [omit]char_t *mrubyFile; 129 size_t memoryPoolSize = 1024 * 1024; /** 1MB default **/ 130 /* note: this requires enough memory */ 131 /* please pay attention to memory layout */ 132 }; 133 134 /** **/ 135 cell tMrubyVM MrubyVM{ 136 mrubyFile = composite.mrubyFile; 137 cInit => composite.cInit; 138 cMalloc = TLSFMalloc.eMalloc; 139 }; 140 cell tMrubyCyclicTaskBody MrubyTaskBody { 141 cMrubyVM = MrubyVM.eMrubyVM; 142 }; 143 cell tTLSFMalloc TLSFMalloc { 144 memoryPoolSize = composite.memoryPoolSize; 145 }; 146 composite.eMrubyBody => MrubyTaskBody.eMrubyBody; 147 }; 66 148 }; -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tecs_mruby.h
r321 r429 1 /* 2 * Copyright (C) 2008-2019 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 #ifndef tecs_mruby_h__ 2 37 #define tecs_mruby_h__ … … 9 44 #include "mruby/data.h" 10 45 #include "mruby/string.h" 46 #include "mruby/irep.h" 47 #include "mruby/dump.h" 48 #include "mruby/proc.h" 11 49 12 50 #include "TECSPointer.h" 13 51 #include "TECSStruct.h" 14 52 15 #if ! defined( MRUBY_RELEASE_MAJOR ) || MRUBY_RELEASE_MAJOR == 1 && MRUBY_RELEASE_MINOR < 216 #ifndef MRB_ARGS_REQ17 #define MRB_ARGS_REQ(n) ARGS_REQ(n)18 #define MRB_ARGS_OPT(n) ARGS_OPT(n)19 #define MRB_ARGS_ARG(n1,n2) ARGS_ARG(n1,n2)20 #define MRB_ARGS_REST() ARGS_REST()21 #define MRB_ARGS_POST(n) ARGS_POST(n)22 #define MRB_ARGS_KEY(n1,n2) ARGS_KEY(n1,n2)23 #define MRB_ARGS_BLOCK() ARGS_BLOCK()24 #define MRB_ARGS_ANY() ARGS_ANY()25 #define MRB_ARGS_NONE() ARGS_NONE()26 #endif /* MRB_ARGS_REQ */27 #endif28 53 29 #if ! defined( MRUBY_RELEASE_MAJOR ) 30 #define mrb_float_value( mrb, val ) mrb_float_value( val ) 31 #endif 32 33 #else 54 #else /* TECSGEN */ 34 55 35 56 /* 36 * fake tecsgen because tecsgen cannot accept actual mruby.h in case of below.57 * fake definition because tecsgen cannot accept actual mruby.h in case of below. 37 58 * types: long long, long long int 38 59 * special keyword __attribute__(x), __extension__ 39 60 */ 40 61 typedef int mrb_state; 41 struct RClass {int dummy;}; 62 typedef int mrb_irep; 63 typedef int mrb_context; 64 struct RClass {uint32_t gcnext;}; // actual definition: struct RBasic *gcnext 65 struct RProc {uint32_t gcnext;}; // actual definition: struct RBasic *gcnext 42 66 43 67 typedef int CELLCB; 68 69 #define GET_SET_BOOL( Type, type ) 70 #define GET_SET_CHAR( Type, type ) 71 #define GET_SET_INT( Type, type ) 72 #define GET_SET_FLOAT( Type, type ) 73 #define POINTER_CLASS( Type, type ) 74 #define CHECK_AND_GET_POINTER( Type, type ) 44 75 45 76 #endif /* TECSGEN */ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/posix/posix.cdl
r321 r429 1 /* 2 * Copyright (C) 2008-2017 by TOPPERS Project 3 * 4 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 5 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 6 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 7 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 8 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 9 * スコード中に含まれていること. 10 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 11 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 12 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 13 * の無保証規定を掲載すること. 14 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 15 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 16 * と. 17 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 18 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 19 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 20 * 報告すること. 21 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 22 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 23 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 24 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 25 * 免責すること. 26 * 27 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 28 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 29 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 30 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 31 * の責任を負わない. 32 * 33 * @(#) $Id$ 34 */ 35 1 36 2 37 namespace nPosix { -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/TDR.cdl
r321 r429 68 68 ER sendSOP( [in]bool_t b_client ); /* StartOfPacket magic を送信 */ 69 69 ER receiveSOP( [in]bool_t b_client ); /* StartOfPacket magic を受信 */ 70 /* b_client: クライアント側なら true, サーバー側なら false */71 72 /* マジックコードの送受信 */73 // ER sendSHSOP( [in]bool_t b_client ); /* StartOfPacket magic を送信 */74 // ER receiveSHSOP( [in]bool_t b_client ); /* StartOfPacket magic を受信 */75 70 /* b_client: クライアント側なら true, サーバー側なら false */ 76 71 … … 150 145 }; 151 146 152 // Straight Order TECS Data Representation (Straight means no endian-conversion is done)147 // Straight Byte Order TECS Data Representation (Data are always sent in native endian) 153 148 celltype tTDR { 154 149 call sChannel cChannel; -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sChannel.cdl
r321 r429 58 58 }; 59 59 60 /* 61 * size に uint16_t ではなく int16_t を用いるのは、下位層が ER_INT を返す場合を想定したもの. 62 * 63 * sChannel は TECS RPC の TDR の下位層である通信チャンネルとのインタフェースである. 64 * 通信チャンネルは、高水準 I/O のように、バッファリングされることを想定する. 65 * TDR からは、int8_t, int16_t, int32_t, int64_t, (int128_t), float32_t, double64_t bool_t, char_t のような基本型(無符号を含む)が渡される。 66 * 配列や構造体の場合であっても要素ごとに渡される。 67 */ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTDR_inline.h
r321 r429 75 75 return(E_ID); 76 76 } 77 (void)p_cellcb; // to avoid unused warning 77 78 78 79 syslog( LOG_INFO, "TDR: resetting channel" ); … … 102 103 return(E_ID); 103 104 } 105 (void)p_cellcb; // to avoid unused warning 104 106 105 107 /* ここに処理本体を記述します #_TEFB_# */ … … 151 153 return(E_ID); 152 154 } 155 (void)p_cellcb; // to avoid unused warning 153 156 154 157 /* ここに処理本体を記述します #_TEFB_# */ … … 157 160 #endif 158 161 159 162 if( b_client ) 160 163 p_sopMagic = &SOP_MAGIC2; 161 164 else … … 198 201 return(E_ID); 199 202 } 203 (void)p_cellcb; // to avoid unused warning 200 204 201 205 /* ここに処理本体を記述します #_TEFB_# */ … … 234 238 return(E_ID); 235 239 } 240 (void)p_cellcb; // to avoid unused warning 236 241 237 242 /* ここに処理本体を記述します #_TEFB_# */ … … 267 272 return(E_ID); 268 273 } 274 (void)p_cellcb; // to avoid unused warning 269 275 270 276 /* ここに処理本体を記述します #_TEFB_# */ … … 287 293 return(E_ID); 288 294 } 295 (void)p_cellcb; // to avoid unused warning 289 296 290 297 /* ここに処理本体を記述します #_TEFB_# */ … … 307 314 return(E_ID); 308 315 } 316 (void)p_cellcb; // to avoid unused warning 309 317 310 318 /* ここに処理本体を記述します #_TEFB_# */ … … 327 335 return(E_ID); 328 336 } 337 (void)p_cellcb; // to avoid unused warning 329 338 330 339 /* ここに処理本体を記述します #_TEFB_# */ … … 347 356 return(E_ID); 348 357 } 358 (void)p_cellcb; // to avoid unused warning 349 359 350 360 /* ここに処理本体を記述します #_TEFB_# */ … … 368 378 return(E_ID); 369 379 } 380 (void)p_cellcb; // to avoid unused warning 370 381 371 382 /* ここに処理本体を記述します #_TEFB_# */ … … 390 401 return(E_ID); 391 402 } 403 (void)p_cellcb; // to avoid unused warning 392 404 393 405 /* ここに処理本体を記述します #_TEFB_# */ … … 412 424 return(E_ID); 413 425 } 426 (void)p_cellcb; // to avoid unused warning 414 427 415 428 /* ここに処理本体を記述します #_TEFB_# */ … … 434 447 return(E_ID); 435 448 } 449 (void)p_cellcb; // to avoid unused warning 436 450 437 451 /* ここに処理本体を記述します #_TEFB_# */ … … 456 470 return(E_ID); 457 471 } 472 (void)p_cellcb; // to avoid unused warning 458 473 459 474 /* ここに処理本体を記述します #_TEFB_# */ … … 477 492 return(E_ID); 478 493 } /* end if VALID_IDX(idx) */ 494 (void)p_cellcb; // to avoid unused warning 479 495 480 496 /* ここに処理本体を記述します #_TEFB_# */ … … 497 513 return(E_ID); 498 514 } /* end if VALID_IDX(idx) */ 515 (void)p_cellcb; // to avoid unused warning 499 516 500 517 /* ここに処理本体を記述します #_TEFB_# */ … … 517 534 return(E_ID); 518 535 } /* end if VALID_IDX(idx) */ 536 (void)p_cellcb; // to avoid unused warning 519 537 520 538 /* ここに処理本体を記述します #_TEFB_# */ … … 537 555 return(E_ID); 538 556 } /* end if VALID_IDX(idx) */ 557 (void)p_cellcb; // to avoid unused warning 539 558 540 559 /* ここに処理本体を記述します #_TEFB_# */ … … 557 576 return(E_ID); 558 577 } /* end if VALID_IDX(idx) */ 578 (void)p_cellcb; // to avoid unused warning 559 579 560 580 /* ここに処理本体を記述します #_TEFB_# */ … … 578 598 return(E_ID); 579 599 } /* end if VALID_IDX(idx) */ 600 (void)p_cellcb; // to avoid unused warning 580 601 581 602 /* ここに処理本体を記述します #_TEFB_# */ … … 600 621 return(E_ID); 601 622 } /* end if VALID_IDX(idx) */ 623 (void)p_cellcb; // to avoid unused warning 602 624 603 625 /* ここに処理本体を記述します #_TEFB_# */ … … 622 644 return(E_ID); 623 645 } /* end if VALID_IDX(idx) */ 646 (void)p_cellcb; // to avoid unused warning 624 647 625 648 /* ここに処理本体を記述します #_TEFB_# */ … … 644 667 return(E_ID); 645 668 } /* end if VALID_IDX(idx) */ 669 (void)p_cellcb; // to avoid unused warning 646 670 647 671 /* ここに処理本体を記述します #_TEFB_# */ … … 666 690 return(E_ID); 667 691 } /* end if VALID_IDX(idx) */ 692 (void)p_cellcb; // to avoid unused warning 668 693 669 694 /* ここに処理本体を記述します #_TEFB_# */ … … 688 713 return(E_ID); 689 714 } /* end if VALID_IDX(idx) */ 715 (void)p_cellcb; // to avoid unused warning 690 716 691 717 /* ここに処理本体を記述します #_TEFB_# */ … … 705 731 ER ercd = E_OK; 706 732 CELLCB *p_cellcb; 707 uint8_t val; 708 if (VALID_IDX(idx)) { 709 p_cellcb = GET_CELLCB(idx); 710 } 711 else { 712 return(E_ID); 713 } /* end if VALID_IDX(idx) */ 733 uint8_t val = 0; 734 if (VALID_IDX(idx)) { 735 p_cellcb = GET_CELLCB(idx); 736 } 737 else { 738 return(E_ID); 739 } /* end if VALID_IDX(idx) */ 740 (void)p_cellcb; // to avoid unused warning 714 741 715 742 /* ここに処理本体を記述します #_TEFB_# */ … … 737 764 return(E_ID); 738 765 } 766 (void)p_cellcb; // to avoid unused warning 739 767 740 768 /* ここに処理本体を記述します #_TEFB_# */ … … 757 785 return(E_ID); 758 786 } 787 (void)p_cellcb; // to avoid unused warning 759 788 760 789 /* ここに処理本体を記述します #_TEFB_# */ … … 778 807 return(E_ID); 779 808 } 809 (void)p_cellcb; // to avoid unused warning 780 810 781 811 /* ここに処理本体を記述します #_TEFB_# */ … … 800 830 return(E_ID); 801 831 } 832 (void)p_cellcb; // to avoid unused warning 802 833 803 834 /* ここに処理本体を記述します #_TEFB_# */ … … 821 852 return(E_ID); 822 853 } 854 (void)p_cellcb; // to avoid unused warning 823 855 824 856 /* ここに処理本体を記述します #_TEFB_# */ … … 863 895 return(E_ID); 864 896 } /* end if VALID_IDX(idx) */ 897 (void)p_cellcb; // to avoid unused warning 865 898 866 899 /* ここに処理本体を記述します #_TEFB_# */ … … 883 916 return(E_ID); 884 917 } 918 (void)p_cellcb; // to avoid unused warning 885 919 886 920 /* ここに処理本体を記述します #_TEFB_# */ … … 903 937 return(E_ID); 904 938 } 939 (void)p_cellcb; // to avoid unused warning 905 940 906 941 /* ここに処理本体を記述します #_TEFB_# */ … … 923 958 return(E_ID); 924 959 } 960 (void)p_cellcb; // to avoid unused warning 925 961 926 962 /* ここに処理本体を記述します #_TEFB_# */ … … 944 980 return(E_ID); 945 981 } /* end if VALID_IDX(idx) */ 982 (void)p_cellcb; // to avoid unused warning 946 983 947 984 /* ここに処理本体を記述します #_TEFB_# */ … … 966 1003 return(E_ID); 967 1004 } 1005 (void)p_cellcb; // to avoid unused warning 968 1006 969 1007 /* ここに処理本体を記述します #_TEFB_# */ … … 988 1026 return(E_ID); 989 1027 } 1028 (void)p_cellcb; // to avoid unused warning 990 1029 991 1030 /* ここに処理本体を記述します #_TEFB_# */ … … 1010 1049 return(E_ID); 1011 1050 } 1051 (void)p_cellcb; // to avoid unused warning 1012 1052 1013 1053 /* ここに処理本体を記述します #_TEFB_# */ … … 1031 1071 return(E_ID); 1032 1072 } /* end if VALID_IDX(idx) */ 1073 (void)p_cellcb; // to avoid unused warning 1033 1074 1034 1075 /* ここに処理本体を記述します #_TEFB_# */ … … 1051 1092 return(E_ID); 1052 1093 } /* end if VALID_IDX(idx) */ 1094 (void)p_cellcb; // to avoid unused warning 1053 1095 1054 1096 /* ここに処理本体を記述します #_TEFB_# */ … … 1071 1113 return(E_ID); 1072 1114 } /* end if VALID_IDX(idx) */ 1115 (void)p_cellcb; // to avoid unused warning 1073 1116 1074 1117 /* ここに処理本体を記述します #_TEFB_# */ … … 1091 1134 return(E_ID); 1092 1135 } /* end if VALID_IDX(idx) */ 1136 (void)p_cellcb; // to avoid unused warning 1093 1137 1094 1138 /* ここに処理本体を記述します #_TEFB_# */ … … 1112 1156 return(E_ID); 1113 1157 } /* end if VALID_IDX(idx) */ 1158 (void)p_cellcb; // to avoid unused warning 1114 1159 1115 1160 /* ここに処理本体を記述します #_TEFB_# */ … … 1134 1179 return(E_ID); 1135 1180 } /* end if VALID_IDX(idx) */ 1181 (void)p_cellcb; // to avoid unused warning 1136 1182 1137 1183 /* ここに処理本体を記述します #_TEFB_# */ … … 1156 1202 return(E_ID); 1157 1203 } /* end if VALID_IDX(idx) */ 1204 (void)p_cellcb; // to avoid unused warning 1158 1205 1159 1206 /* ここに処理本体を記述します #_TEFB_# */ … … 1178 1225 return(E_ID); 1179 1226 } /* end if VALID_IDX(idx) */ 1227 (void)p_cellcb; // to avoid unused warning 1180 1228 1181 1229 /* ここに処理本体を記述します #_TEFB_# */ … … 1199 1247 return(E_ID); 1200 1248 } 1249 (void)p_cellcb; // to avoid unused warning 1201 1250 1202 1251 /* ここに処理本体を記述します #_TEFB_# */ … … 1220 1269 return(E_ID); 1221 1270 } 1271 (void)p_cellcb; // to avoid unused warning 1222 1272 1223 1273 /* ここに処理本体を記述します #_TEFB_# */ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen
r321 r429 7 7 # 8 8 # ä¸è¨èä½æ¨©è 9 ã¯ï¼ä»¥ä¸ã®(1) ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§9 ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ 10 10 # ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹ 11 11 # å¤ã»åé -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen.rb
r321 r429 5 5 # Generator for TOPPERS Embedded Component System 6 6 # 7 # Copyright (C) 2008-201 6by TOPPERS Project7 # Copyright (C) 2008-2019 by TOPPERS Project 8 8 #-- 9 9 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 54 54 # Authors list is in i-ro-ha order. 55 55 #Version:: see version.rb 56 $Copyright = "Copyright(c) 2008-201 6, TOPPERS project. All rights reserved."56 $Copyright = "Copyright(c) 2008-2019, TOPPERS project. All rights reserved." 57 57 $License = "TOPPERS License" 58 58 … … 223 223 analyze_option addtional_option_parser 224 224 load_modules 225 setup 225 if ! $TECSFLOW then 226 setup 227 end 226 228 227 229 dbgPrint "tecspath: #{$tecsgen_base_path}, __FILE__=#{__FILE__}\n" … … 284 286 ARGV.each { |a| $arguments += " " + a } 285 287 286 $unopt = false # bool: disable optimizing 288 $unopt = false # bool: disable optimizing both call and entry port 289 $unopt_entry= false # bool: disable optimizing entry port 287 290 $gen_base = "gen" # string: folder path to place generated files 288 291 $gen = $gen_base # string: folder path to place generated files … … 385 388 $unopt = true 386 389 } 390 parser.on('--unoptimize-entry', 'unoptimize entry port') { 391 $unopt_entry = true 392 } 387 393 parser.on('-c', '--cpp=cpp_cmd', 'C pre-processor command used import_C (default: gcc -E -DTECSGEN), you can also specify by environment variable TECS_CPP' ){ 388 394 |arg| … … 465 471 } 466 472 467 if ARGV.empty? && ! $print_version && ! $unit_test 473 if ARGV.empty? && ! $print_version && ! $unit_test && ! $TECSFLOW 468 474 ARGV.options{|parser| 469 475 puts parser.help … … 482 488 # このファイルを誤って読み込むと、異なるバージョン名を表示してしまう 483 489 require_tecsgen_lib 'tecslib/version.rb' 484 if ! $no_banner || $print_version 490 if $title then 491 STDERR << "#{$title} version #{$tool_version} (tecsgen version #{$version}) #{$Copyright}\n" 492 elsif ! $no_banner || $print_version 485 493 STDERR << "tecsgen version #{$version} #{$Copyright}\n" 486 494 end … … 488 496 STDERR << "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]\n" 489 497 end 490 if $print_version && ARGV.empty? 498 if $print_version && ARGV.empty? && ! $TECSFLOW 491 499 exit 492 500 end … … 514 522 require_tecsgen_lib 'tecslib/core/generate.rb' 515 523 require_tecsgen_lib 'tecslib/core/gen_xml.rb' 516 # require_tecsgen_lib 'tecslib/core/tool_info.rb' 524 require_tecsgen_lib 'tecslib/core/tool_info.rb' 525 require_tecsgen_lib 'tecslib/core/tecsinfo.rb' 526 require_tecsgen_lib 'tecslib/core/unjoin_plugin.rb' 517 527 require_tecsgen_lib 'tecslib/plugin/CelltypePlugin.rb' 528 require_tecsgen_lib 'tecslib/plugin/CompositePlugin.rb' 518 529 require_tecsgen_lib 'tecslib/plugin/CellPlugin.rb' 519 530 require_tecsgen_lib 'tecslib/plugin/SignaturePlugin.rb' 520 531 require_tecsgen_lib 'tecslib/plugin/ThroughPlugin.rb' 521 532 require_tecsgen_lib 'tecslib/plugin/DomainPlugin.rb' 533 require_tecsgen_lib 'tecslib/plugin/MultiPlugin.rb' 522 534 523 535 # C 言語パーサ … … 596 608 # クラス変数のリセットを確実に行う必要がある 597 609 598 if $TECSCDE != true then610 if $TECSCDE != true && $TECSFLOW != true then 599 611 begin 600 612 TECSGEN.init … … 602 614 tecsgen.run1 603 615 tecsgen.run2 616 tecsgen.dump_tecsgen_rbdmp 604 617 rescue => evar 605 618 print_exception( evar ) -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov.rb
r321 r429 44 44 # Usage: tecsgen_rcov.rb [options] CDL-file.cdl 45 45 # 46 47 $:.unshift(File.dirname(__FILE__)) 48 46 49 require 'simplecov' 47 SimpleCov.command_name "tecsgen#{ $$}"50 SimpleCov.command_name "tecsgen#{Time.now.to_f}" 48 51 SimpleCov.root File.dirname( File.expand_path __FILE__ ) 49 52 SimpleCov.at_exit do -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.tab.rb
r321 r429 1 1 # 2 2 # DO NOT MODIFY!!!! 3 # This file is automatically generated by Racc 1.4. 123 # This file is automatically generated by Racc 1.4.9 4 4 # from Racc grammer file "". 5 5 # … … 8 8 class C_parser < Racc::Parser 9 9 10 module_eval(<<'...end C_parser.y.rb/module_eval...', 'C_parser.y.rb', 715) 11 12 RESERVED = { 13 # keyword 14 'typedef' => :TYPEDEF, 15 'struct' => :STRUCT, 16 'union' => :UNION, 17 'sizeof' => :SIZEOF, 18 'throw' => :THROW, 19 20 # specifier 21 # types 22 'void' => :VOID, 23 'char' => :CHAR, 24 'short' => :SHORT, 25 26 'volatile'=> :VOLATILE, 27 'const' => :CONST, 28 'extern' => :EXTERN, 29 30 'long' => :LONG, 31 'float' => :FLOAT, 32 'double' => :DOUBLE, 33 'signed' => :SIGNED, 34 'unsigned'=> :UNSIGNED, 35 36 'int' => :INT, 37 'enum' => :ENUM, 38 39 'if' => :IF, 40 'else' => :ELSE, 41 'while' => :WHILE, 42 'do' => :DO, 43 'for' => :FOR, 44 'case' => :CASE, 45 'default' => :DEFAULT, 46 'goto' => :GOTO, 47 'continue' => :CONTINUE, 48 'break' => :BREAK, 49 'return' => :RETURN, 50 '__inline__' => :__INLINE__, 51 'inline' => :INLINE, 52 '__inline' => :__INLINE, 53 'Inline' => :CINLINE, # inline starting with Capital letter 54 'static' => :STATIC, 55 'register' => :REGISTER, 56 'auto' => :AUTO, 57 '__extension__' => :EXTENSION, 58 59 } 60 61 @@generator_nest = -1 62 @@generator_stack = [] 63 @@current_locale = [] 64 65 def finalize 66 67 # mikan Namespace.pop 68 Celltype.pop 69 Cell.pop 70 CompositeCelltype.pop 71 Region.pop 72 73 end 74 75 def set_plugin( plugin ) 76 @plugin = plugin 77 end 78 79 def self.get_plugin 80 @@generator_stack[@@generator_nest].get_plugin 81 end 82 83 def get_plugin 84 @plugin 85 end 86 87 def parse(files) 88 89 # mikan Namespace.push 90 Celltype.push 91 Cell.push 92 CompositeCelltype.push 93 Region.push 94 95 @@generator_nest += 1 96 @@generator_stack[@@generator_nest] = self 97 @b_no_type_name = false 98 99 begin 100 101 @q = [] 102 comment = false 103 104 # euc のコメントを utf8 として扱うと、コメントの終わりを誤る問題の対策 105 TECS_LANG::set_kcode_binary 106 107 # 800U, 0xffLL など (整数リテラルに共通の修飾子) 108 integer_qualifier = "([Uu][Ll][Ll]|[Uu][Ll]|[Uu]|[Ll][Ll]|[Ll])?" 109 110 files.each {|file| 111 lineno = 1 112 begin 113 #2.0 IO.foreach(file) {|line| 114 TECSIO.foreach(file) {|line| 115 col = 1 116 line.rstrip! 117 118 until line.empty? 119 120 if comment 121 case line 122 # コメント終了 123 when /\A\*\// 124 comment = false 125 when /\A./ 126 ; 127 end 128 else 129 case line 130 # 空白、プリプロセスディレクティブ 131 when /\A\s+/ 132 ; 133 # 識別子 134 when /\A[a-zA-Z_]\w*/ 135 word = $& 136 @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)] 137 # 16 進数定数 138 when /\A0x[0-9A-Fa-f]+#{integer_qualifier}/ 139 @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)] 140 # 8 進数定数 141 when /\A0[0-7]+#{integer_qualifier}/ 142 @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)] 143 # 浮動小数定数 144 when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/ 145 @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)] 146 # 整数定数 147 when /\A\d+#{integer_qualifier}/ 148 # when /\A\d+/ 149 @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)] 150 # 文字 151 when /\A'(?:[^'\\]|\\.)'/ 152 @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)] 153 # 文字列 154 # "#include #include #include \"../systask/logtask.cfg\" 最後の " 忘れ)で無限ループ 155 # when /\A"(?:[^"\\]+|\\.)*"/ 156 when /\A"(?:[^"\\]|\\.)*"/ # これはうまく行くようだ 157 @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)] 158 # 行コメント 159 when /\A\/\/.*$/ 160 # 読み飛ばすだけ 161 # コメント開始 162 when /\A\/\*/ 163 comment = true 164 when /\A>>=/, /\A<<=/, /\A>>/, /\A<</ 165 @q << [$&, Token.new($&, file, lineno, col)] 166 when /\A\+=/, /\A\-=/, /\A\*=/, /\A\/=/, /\A%=/, /\A&=/, /\A\|=/, /\A\^=/ 167 @q << [$&, Token.new($&, file, lineno, col)] 168 when /\A::/, /\A==/, /\A!=/, /\A>=/, /\A<=/, /\A\->/, /\A\+\+/, /\A\-\-/ 169 @q << [$&, Token.new($&, file, lineno, col)] 170 when /\A./ 171 @q << [$&, Token.new($&, file, lineno, col)] 172 else 173 raise 174 end 175 end 176 177 line = $' 178 col += $&.length 179 end 180 181 lineno += 1 182 } 183 184 rescue => evar 185 Generator.error( "B1002 while open or reading \'$1\'" , file ) 186 print_exception( evar ) 187 end 188 } 189 190 # 終了の印 191 @q << nil 192 193 @yydebug = true 194 do_parse 195 196 ensure 197 @@generator_nest -= 1 198 TECS_LANG::reset_kcode 199 end 200 201 end 202 203 204 def next_token 205 token = @q.shift 206 207 if token then 208 @@current_locale[@@generator_nest] = token[1].locale 209 210 case token[1].val 211 when ";", ":", ",", "(", ")", "{", "}" 212 set_no_type_name false 213 when ".", "->" 214 set_no_type_name true 215 end 216 217 # TYPE_NAME トークンへ置き換え 218 if @b_no_type_name == false 219 if token[0] == :IDENTIFIER && Namespace.is_typename?( token[1].val ) then 220 token[0] = :TYPE_NAME 221 end 222 end 223 224 if $debug then # 070107 token 無効時ここを通さないようした (through 対応 -d の時に例外発生) 225 locale = @@current_locale[@@generator_nest] 226 if token then 227 print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" ) 228 else 229 print( "#{locale[0]}: line #{locale[1]} : EOF\n" ) 230 end 231 end 232 end 233 234 token 235 end 236 237 def on_error(t, v, vstack) 238 if v == "$" then 239 Generator.error( "B1003 Unexpected EOF" ) 240 else 241 Generator.error( "B1004 syntax error near \'$1\'" , v.val ) 242 end 243 244 end 245 246 def self.current_locale 247 @@current_locale[ @@generator_nest ] 248 end 249 250 @@n_error = 0 251 @@n_warning = 0 252 253 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切) 254 def self.error( msg ) 255 @@n_error += 1 256 locale = @@current_locale[ @@generator_nest ] 257 258 if locale then 259 Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}" 260 else 261 Console.puts "error: #{msg}" 262 end 263 end 264 265 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でウォーニング発生は不適切) 266 def self.warning( msg ) 267 @@n_warning += 1 268 locale = @@current_locale[ @@generator_nest ] 269 Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}" 270 end 271 272 def self.get_n_error 273 @@n_error 274 end 275 276 def self.get_n_warning 277 @@n_warning 278 end 279 280 def self.get_nest 281 @@generator_nest 282 end 283 284 def set_no_type_name b_no_type_name 285 # print "b_no_type_name=#{b_no_type_name}\n" 286 @b_no_type_name = b_no_type_name 287 end 10 module_eval(<<'...end C_parser.y.rb/module_eval...', 'C_parser.y.rb', 784) 11 12 RESERVED = { 13 # keyword 14 'typedef' => :TYPEDEF, 15 'struct' => :STRUCT, 16 'union' => :UNION, 17 'sizeof' => :SIZEOF, 18 'throw' => :THROW, 19 20 # specifier 21 # types 22 'void' => :VOID, 23 'char' => :CHAR, 24 'short' => :SHORT, 25 26 'volatile'=> :VOLATILE, 27 'restrict'=> :RESTRICT, 28 'const' => :CONST, 29 'extern' => :EXTERN, 30 31 'long' => :LONG, 32 'float' => :FLOAT, 33 'double' => :DOUBLE, 34 'signed' => :SIGNED, 35 'unsigned'=> :UNSIGNED, 36 37 'int' => :INT, 38 'enum' => :ENUM, 39 40 'if' => :IF, 41 'else' => :ELSE, 42 'while' => :WHILE, 43 'do' => :DO, 44 'for' => :FOR, 45 'switch' => :SWITCH, 46 'case' => :CASE, 47 'default' => :DEFAULT, 48 'goto' => :GOTO, 49 'continue' => :CONTINUE, 50 'break' => :BREAK, 51 'return' => :RETURN, 52 '__inline__' => :__INLINE__, 53 'inline' => :INLINE, 54 '__inline' => :__INLINE, 55 'Inline' => :CINLINE, # inline starting with Capital letter 56 'static' => :STATIC, 57 'register' => :REGISTER, 58 'auto' => :AUTO, 59 '__extension__' => :EXTENSION, 60 '__asm__' => :_ASM, 61 'asm' => :_ASM 62 63 } 64 65 @@generator_nest = -1 66 @@generator_stack = [] 67 @@current_locale = [] 68 69 def finalize 70 71 # mikan Namespace.pop 72 Celltype.pop 73 Cell.pop 74 CompositeCelltype.pop 75 Region.pop 76 77 end 78 79 def set_plugin( plugin ) 80 @plugin = plugin 81 end 82 83 def self.get_plugin 84 @@generator_stack[@@generator_nest].get_plugin 85 end 86 87 def get_plugin 88 @plugin 89 end 90 91 def parse(files) 92 93 # mikan Namespace.push 94 Celltype.push 95 Cell.push 96 CompositeCelltype.push 97 Region.push 98 99 @@generator_nest += 1 100 @@generator_stack[@@generator_nest] = self 101 @b_no_type_name = false 102 103 begin 104 105 @q = [] 106 comment = false 107 # b_asm = false 108 109 # euc のコメントを utf8 として扱うと、コメントの終わりを誤る問題の対策 110 TECS_LANG::set_kcode_binary 111 112 # 800U, 0xffLL など (整数リテラルに共通の修飾子) 113 integer_qualifier = "([Uu][Ll][Ll]|[Uu][Ll]|[Uu]|[Ll][Ll]|[Ll])?" 114 115 files.each {|file| 116 lineno = 1 117 begin 118 #2.0 IO.foreach(file) {|line| 119 TECSIO.foreach(file) {|line| 120 col = 1 121 line.rstrip! 122 123 until line.empty? 124 125 if comment 126 case line 127 # コメント終了 128 when /\A\*\// 129 comment = false 130 when /\A./ 131 ; 132 end 133 else 134 case line 135 # 空白、プリプロセスディレクティブ 136 when /\A\s+/ 137 ; 138 # 識別子 139 when /\A[a-zA-Z_]\w*/ 140 word = $& 141 @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)] 142 # 16 進数定数 143 when /\A0x[0-9A-Fa-f]+#{integer_qualifier}/ 144 @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)] 145 # 8 進数定数 146 when /\A0[0-7]+#{integer_qualifier}/ 147 @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)] 148 # 浮動小数定数 149 when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/ 150 @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)] 151 # 整数定数 152 when /\A\d+#{integer_qualifier}/ 153 # when /\A\d+/ 154 @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)] 155 # 文字 156 when /\A'(?:[^'\\]|\\.)'/ 157 @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)] 158 # 文字列 159 # "#include #include #include \"../systask/logtask.cfg\" 最後の " 忘れ)で無限ループ 160 # when /\A"(?:[^"\\]+|\\.)*"/ 161 when /\A"(?:[^"\\]|\\.)*"/ # これはうまく行くようだ 162 @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)] 163 # 行コメント 164 when /\A\/\/.*$/ 165 # 読み飛ばすだけ 166 # コメント開始 167 when /\A\/\*/ 168 comment = true 169 when /\A>>=/, /\A<<=/, /\A>>/, /\A<</ 170 @q << [$&, Token.new($&, file, lineno, col)] 171 when /\A\+=/, /\A\-=/, /\A\*=/, /\A\/=/, /\A%=/, /\A&=/, /\A\|=/, /\A\^=/ 172 @q << [$&, Token.new($&, file, lineno, col)] 173 when /\A::/, /\A==/, /\A!=/, /\A>=/, /\A<=/, /\A\->/, /\A\+\+/, /\A\-\-/ 174 @q << [$&, Token.new($&, file, lineno, col)] 175 when /\A\|\|/, /\A\&\&/ 176 @q << [$&, Token.new($&, file, lineno, col)] 177 when /\A./ 178 @q << [$&, Token.new($&, file, lineno, col)] 179 else 180 raise 181 end 182 end 183 184 line = $' 185 col += $&.length 186 end 187 188 lineno += 1 189 } 190 191 rescue => evar 192 Generator.error( "B1002 while open or reading \'$1\'" , file ) 193 print_exception( evar ) 194 end 195 } 196 197 # 終了の印 198 @q << nil 199 200 @yydebug = true 201 do_parse 202 203 ensure 204 @@generator_nest -= 1 205 TECS_LANG::reset_kcode 206 end 207 208 end 209 210 211 def next_token 212 token = @q.shift 213 214 if token then 215 @@current_locale[@@generator_nest] = token[1].locale 216 217 case token[1].val 218 when ";", ":", ",", "(", ")", "{", "}" 219 set_no_type_name false 220 when ".", "->" 221 set_no_type_name true 222 end 223 224 # TYPE_NAME トークンへ置き換え 225 if @b_no_type_name == false 226 if token[0] == :IDENTIFIER && Namespace.is_typename?( token[1].val ) then 227 token[0] = :TYPE_NAME 228 locale = @@current_locale[@@generator_nest] 229 #print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}: type_name'\n" ) 230 end 231 end 232 233 if $debug then # 070107 token 無効時ここを通さないようした (through 対応 -d の時に例外発生) 234 locale = @@current_locale[@@generator_nest] 235 if token then 236 print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" ) 237 else 238 print( "#{locale[0]}: line #{locale[1]} : EOF\n" ) 239 end 240 end 241 end 242 243 token 244 end 245 246 def on_error(t, v, vstack) 247 if v == "$" then 248 Generator.error( "B1003 Unexpected EOF" ) 249 else 250 Generator.error( "B1004 syntax error near \'$1\'" , v.val ) 251 end 252 253 end 254 255 def self.current_locale 256 @@current_locale[ @@generator_nest ] 257 end 258 259 @@n_error = 0 260 @@n_warning = 0 261 @@n_info = 0 262 263 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切) 264 def self.error( msg ) 265 @@n_error += 1 266 locale = @@current_locale[ @@generator_nest ] 267 268 if locale then 269 Console.puts "#{locale[0]}:#{locale[1]}: error: #{msg}" 270 else 271 Console.puts "error: #{msg}" 272 end 273 end 274 275 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でウォーニング発生は不適切) 276 def self.warning( msg ) 277 @@n_warning += 1 278 locale = @@current_locale[ @@generator_nest ] 279 Console.puts "#{locale[0]}:#{locale[1]}: warning: #{msg}" 280 end 281 282 # このメソッドは構文解析、意味解析からのみ呼出し可 283 def self.info( msg ) 284 @@n_info += 1 285 locale = @@current_locale[ @@generator_nest ] 286 Console.puts "#{locale[0]}:#{locale[1]}: info: #{msg}" 287 end 288 289 def self.get_n_error 290 @@n_error 291 end 292 293 def self.get_n_warning 294 @@n_warning 295 end 296 297 def self.get_nest 298 @@generator_nest 299 end 300 301 def set_no_type_name b_no_type_name 302 locale = @@current_locale[ @@generator_nest ] 303 #print "b_no_type_name=#{b_no_type_name} #{locale[0]}: line #{locale[1]}\n" 304 @b_no_type_name = b_no_type_name 305 end 288 306 289 307 ...end C_parser.y.rb/module_eval... … … 291 309 292 310 clist = [ 293 '104,105,106,107,108,110,68,111,66,179,300,141,53,116,117,206,115,118', 294 '119,120,121,122,123,104,105,106,107,108,110,168,111,203,204,207,141', 295 '74,116,117,168,115,118,119,120,121,122,123,303,208,67,299,65,26,27,104', 296 '105,106,107,108,110,73,111,26,27,75,141,348,116,117,167,115,118,119', 297 '120,121,122,123,77,265,195,196,160,304,305,306,307,308,309,310,311,312', 298 '313,262,351,142,8,9,10,11,15,16,17,18,19,20,21,22,53,192,23,25,26,27', 299 '193,194,343,261,142,104,105,106,107,108,110,344,111,172,340,151,141', 300 '272,116,117,251,115,118,119,120,121,122,123,104,105,106,107,108,110', 301 '142,111,355,171,339,141,81,116,117,80,115,118,119,120,121,122,123,104', 302 '105,106,107,108,110,52,111,195,196,3,141,51,116,117,359,115,118,119', 303 '120,121,122,123,104,105,106,107,108,110,373,111,96,335,361,141,334,116', 304 '117,344,115,118,119,120,121,122,123,79,142,247,335,272,251,334,251,51', 305 '104,105,106,107,108,110,81,111,53,80,362,234,363,116,117,142,115,118', 306 '119,120,121,122,123,247,52,364,251,197,198,51,51,197,198,79,197,198', 307 '53,53,142,228,365,8,9,10,11,15,16,17,18,19,20,21,22,77,192,23,25,26', 308 '27,193,194,142,229,95,230,231,232,233,87,235,236,238,239,240,241,192', 309 '199,200,201,202,193,194,197,198,370,37,38,39,40,41,42,43,44,142,104', 310 '105,106,107,108,110,86,111,203,204,85,141,375,116,117,376,115,118,119', 311 '120,121,122,123,104,105,106,107,108,110,377,111,195,196,378,141,379', 312 '116,117,380,115,118,119,120,121,122,123,104,105,106,107,108,110,382', 313 '111,383,35,384,141,63,116,117,60,115,118,119,120,121,122,123,104,105', 314 '106,107,108,110,389,111,209,210,390,141,391,116,117,392,115,118,119', 315 '120,121,122,123,59,142,394,34,396,8,9,10,11,15,16,17,18,19,20,21,22', 316 '52,278,23,25,26,27,51,142,36,52,52,52,35,53,52,51,51,51,197,198,51,45', 317 '53,53,53,277,275,53,269,268,142,267,37,38,39,40,41,42,43,44,181,95,182', 318 '254,183,184,185,199,200,201,202,253,34,142,8,9,10,11,15,16,17,18,19', 319 '20,21,22,245,244,23,25,26,27,243,30,36,104,105,106,107,108,110,214,111', 320 '213,208,207,141,206,116,117,205,115,118,119,120,121,122,123,37,38,39', 321 '40,41,42,43,44,301,104,105,106,107,108,110,314,111,315,317,318,234,319', 322 '116,117,321,115,118,119,120,121,122,123,52,52,52,322,52,323,51,51,51', 323 '324,51,327,174,53,53,53,228,53,8,9,10,11,15,16,17,18,19,20,21,22,77', 324 '173,23,25,26,27,75,95,142,229,169,230,231,232,233,161,235,236,238,239', 325 '240,241,199,200,201,202,346,347,205,,,,37,38,39,40,41,42,43,44,142,104', 326 '105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123', 327 ',,104,105,106,107,108,110,,111,,,,234,,116,117,,115,118,119,120,121', 328 '122,123,,,,,,,,,,,,,,,,,228,,8,9,10,11,15,16,17,18,19,20,21,22,77,,23', 329 '25,26,27,,,,229,,230,231,232,233,142,235,236,238,239,240,241,,,,,,,', 330 ',,,37,38,39,40,41,42,43,44,142,104,105,106,107,108,110,,111,,,,234,', 331 '116,117,,115,118,119,120,121,122,123,,,,,,,,,,,,,,,,,228,,8,9,10,11', 332 '15,16,17,18,19,20,21,22,77,,23,25,26,27,,,,229,,230,231,232,233,,235', 333 '236,238,239,240,241,,,,,,,,,,,37,38,39,40,41,42,43,44,142,104,105,106', 334 '107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,104,105', 335 '106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,104', 336 '105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123', 337 '104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122', 338 '123,,142,,,,,,,,104,105,106,107,108,110,,111,,,,141,,116,117,142,115', 339 '118,119,120,121,122,123,104,105,106,107,108,110,,111,,366,,141,,116', 340 '117,142,115,118,119,120,121,122,123,,,,,,,,104,105,106,107,108,110,', 341 '111,142,,,234,,116,117,,115,118,119,120,121,122,123,,,,,,,,,,,,,,,,', 342 '228,142,8,9,10,11,15,16,17,18,19,20,21,22,77,,23,25,26,27,,,,229,142', 343 '230,231,232,233,,235,236,238,239,240,241,,,,,,,,,,,37,38,39,40,41,42', 344 '43,44,142,104,105,106,107,108,110,,111,,,,234,,116,117,,115,118,119', 345 '120,121,122,123,,,,,,,,,,,,,,,,,228,,8,9,10,11,15,16,17,18,19,20,21', 346 '22,77,,23,25,26,27,,,,229,,230,231,232,233,,235,236,238,239,240,241', 347 ',,,,,,,,,,37,38,39,40,41,42,43,44,142,104,105,106,107,108,110,,111,', 348 ',,234,,116,117,,115,118,119,120,121,122,123,,,,,,,,,,,,,,,,,228,,8,9', 349 '10,11,15,16,17,18,19,20,21,22,77,,23,25,26,27,,,,229,,230,231,232,233', 350 ',235,236,238,239,240,241,,,,,,,,,,,37,38,39,40,41,42,43,44,142,104,105', 351 '106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,104', 352 '105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123', 353 '104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122', 354 '123,104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121', 355 '122,123,,142,,,,,,139,,,,,,140,104,105,106,107,108,110,,111,,145,142', 356 '141,,116,117,,115,118,119,120,121,122,123,104,105,106,107,108,110,,111', 357 ',,142,141,,116,117,,115,118,119,120,121,122,123,104,105,106,107,108', 358 '110,,111,,,142,141,,116,117,,115,118,119,120,121,122,123,104,105,106', 359 '107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,,142,', 360 ',,,,,,104,105,106,107,108,110,,111,,,,141,,116,117,142,115,118,119,120', 361 '121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,142,115,118', 362 '119,120,121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,142', 363 '115,118,119,120,121,122,123,104,105,106,107,108,110,,111,,,,141,,116', 364 '117,,115,118,119,120,121,122,123,,142,,,,,,139,349,,,,,140,104,105,106', 365 '107,108,110,,111,,,142,141,,116,117,,115,118,119,120,121,122,123,104', 366 '105,106,107,108,110,,111,,,142,141,,116,117,,115,118,119,120,121,122', 367 '123,104,105,106,107,108,110,,111,,,142,141,,116,117,,115,118,119,120', 368 '121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119', 369 '120,121,122,123,,142,,,,,,,,104,105,106,107,108,110,,111,,,,141,,116', 370 '117,142,115,118,119,120,121,122,123,104,105,106,107,108,110,,111,,,', 371 '141,,116,117,142,115,118,119,120,121,122,123,104,105,106,107,108,110', 372 ',111,,,,141,,116,117,142,115,118,119,120,121,122,123,,,,,,,,,,104,105', 373 '106,107,108,110,,111,,,,234,,116,117,142,115,118,119,120,121,122,123', 374 ',,,,,,,,,,,,,,,142,228,,8,9,10,11,15,16,17,18,19,20,21,22,77,237,23', 375 '25,26,27,,,142,229,,230,231,232,233,,235,236,238,239,240,241,,,,,,,', 376 ',,,37,38,39,40,41,42,43,44,142,104,105,106,107,108,110,,111,,336,,141', 377 ',116,117,,115,118,119,120,121,122,123,104,105,106,107,108,110,,111,', 378 ',,141,,116,117,,115,118,119,120,121,122,123,8,9,10,11,15,16,17,18,19', 379 '20,21,22,,,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26', 380 '27,,104,105,106,107,108,110,,111,,,142,141,,116,117,,115,118,119,120', 381 '121,122,123,104,105,106,107,108,110,,111,,,142,141,,116,117,,115,118', 382 '119,120,121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,,115', 383 '118,119,120,121,122,123,104,105,106,107,108,187,,111,,,,141,,116,117', 384 ',115,118,119,120,121,122,123,,142,,,,,,,,104,105,106,107,108,189,,111', 385 ',,,141,,116,117,142,115,118,119,120,121,122,123,104,105,106,107,108', 386 '189,,111,,,,141,,116,117,142,115,118,119,120,121,122,123,104,105,106', 387 '107,108,110,,111,,,,141,,116,117,142,115,118,119,120,121,122,123,104', 388 '105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123', 389 ',142,,,,,,139,,,,,,140,272,332,326,251,104,105,106,107,108,110,142,111', 390 ',53,,141,,116,117,,115,118,119,120,121,122,123,,,,,,,142,,,8,9,10,11', 391 '15,16,17,18,19,20,21,22,,,23,25,26,27,,,142,104,105,106,107,108,110', 392 ',111,,,,234,,116,117,,115,118,119,120,121,122,123,37,38,39,40,41,42', 393 '43,44,,,,,,,,,228,142,8,9,10,11,15,16,17,18,19,20,21,22,77,,23,25,26', 394 '27,,,,229,,230,231,232,233,,235,236,238,239,240,241,368,,,,,,,,,,37', 395 '38,39,40,41,42,43,44,142,247,332,,251,,,51,,,,,,,53,,,8,9,10,11,15,16', 396 '17,18,19,20,21,22,,,23,25,26,27,,,8,9,10,11,15,16,17,18,19,20,21,22', 397 ',,23,25,26,27,147,,,,,,37,38,39,40,41,42,43,44,,,,,,,,,328,,,,37,38', 398 '39,40,41,42,43,44,,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,8', 399 '9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37,38,39,40,41', 400 '42,43,44,,,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19', 401 '20,21,22,,,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,338,23,25', 402 '26,27,,,,,,,,,37,38,39,40,41,42,43,44,,,,,,,,,,,37,38,39,40,41,42,43', 403 '44,8,9,10,11,15,16,17,18,19,20,21,22,,162,23,25,26,27,8,9,10,11,15,16', 404 '17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37,38,39,40,41,42,43,44,,,,', 405 ',,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19,20,21,22,,,23', 406 '25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37', 407 '38,39,40,41,42,43,44,,,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15', 408 '16,17,18,19,20,21,22,,255,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21', 409 '22,,,23,25,26,27,,,,,,,,,37,38,39,40,41,42,43,44,,,,,,,,,,,37,38,39', 410 '40,41,42,43,44,8,9,10,11,15,16,17,18,19,20,21,22,,260,23,25,26,27,8', 411 '9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37,38,39,40,41', 412 '42,43,44,,,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19', 413 '20,21,22,,,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26', 414 '27,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19,20,21,22', 415 ',,23,25,26,27' ] 416 racc_action_table = arr = ::Array.new(2877, nil) 311 '111,112,113,114,115,117,294,118,56,298,55,163,54,123,124,82,54,262,122', 312 '125,126,127,128,129,130,111,112,113,114,115,117,217,118,271,391,101', 313 '163,91,123,124,82,271,271,122,125,126,127,128,129,130,56,70,171,72,82', 314 '69,397,71,80,32,33,34,224,309,271,223,216,226,84,227,228,229,84,392', 315 '101,325,272,171,298,312,80,164,165,172,393,173,174,175,176,177,178,179', 316 '180,149,181,101,218,79,308,369,388,32,33,34,265,266,164,165,172,73,173', 317 '174,175,176,177,178,179,180,149,181,111,112,113,114,115,117,384,118', 318 '32,33,34,163,78,123,124,82,440,402,122,125,126,127,128,129,130,55,219', 319 '271,271,383,101,54,332,248,325,387,55,298,249,250,56,382,54,111,112', 320 '113,114,115,117,56,118,56,171,331,163,395,123,124,82,276,210,122,125', 321 '126,127,128,129,130,420,55,378,210,248,377,396,54,330,249,250,393,92', 322 '164,165,172,56,173,174,175,176,177,178,179,180,149,181,171,9,10,11,12', 323 '13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,355,356', 324 '213,164,165,172,204,173,174,175,176,177,178,179,180,149,181,111,112', 325 '113,114,115,117,404,118,93,378,203,163,377,123,124,82,193,271,122,125', 326 '126,127,128,129,130,111,112,113,114,115,117,290,118,101,86,55,163,85', 327 '123,124,82,54,291,122,125,126,127,128,129,130,56,357,171,13,14,15,16', 328 '17,18,19,20,21,22,26,28,30,31,32,33,34,248,86,322,438,85,249,250,171', 329 '434,435,370,164,165,172,271,173,174,175,176,177,178,179,180,149,181', 330 '259,260,261,321,255,256,257,258,315,316,262,164,165,172,271,173,174', 331 '175,176,177,178,179,180,149,181,111,112,113,114,115,117,403,118,317', 332 '318,263,163,264,123,124,82,320,271,122,125,126,127,128,129,130,13,14', 333 '15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,437,111,112,113,114,115', 334 '117,360,118,400,171,271,163,368,123,124,82,166,103,122,125,126,127,128', 335 '129,130,102,55,255,256,257,258,310,54,255,256,257,258,405,164,165,172', 336 '56,173,174,175,176,177,178,179,180,149,181,171,9,10,11,12,13,14,15,16', 337 '17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,259,260,301,164,165', 338 '172,300,173,174,175,176,177,178,179,180,149,181,111,112,113,114,115', 339 '117,408,118,253,254,292,163,409,123,124,82,253,254,122,125,126,127,128', 340 '129,130,111,112,113,114,115,117,410,118,253,254,55,163,289,123,124,82', 341 '54,288,122,125,126,127,128,129,130,56,415,171,13,14,15,16,17,18,19,20', 342 '21,22,26,28,30,31,32,33,34,253,254,253,254,251,252,261,171,211,212,285', 343 '164,165,172,284,173,174,175,176,177,178,179,180,149,181,237,238,239', 344 '240,241,242,243,244,245,246,247,164,165,172,283,173,174,175,176,177', 345 '178,179,180,149,181,111,112,113,114,115,117,282,118,251,252,389,163', 346 '389,123,124,82,251,252,122,125,126,127,128,129,130,111,112,113,114,115', 347 '117,101,118,67,82,55,163,64,123,124,82,54,63,122,125,126,127,128,129', 348 '130,56,55,171,55,55,294,280,54,298,54,54,54,279,430,431,432,56,433,56', 349 '56,56,365,436,278,263,275,264,171,273,270,48,164,165,172,444,173,174', 350 '175,176,177,178,179,180,149,181,269,3,,,,,,,,,,164,165,172,,173,174', 351 '175,176,177,178,179,180,149,181,111,112,113,114,115,117,,118,,,,163', 352 ',123,124,82,,,122,125,126,127,128,129,130,111,112,113,114,115,117,,118', 353 ',,,148,,123,124,,,,122,125,126,127,128,129,130,,,171,111,112,113,114', 354 '115,117,,118,,,,148,,123,124,,,,122,125,126,127,128,129,130,,,,164,165', 355 '172,,173,174,175,176,177,178,179,180,149,181,,,,,,,111,112,113,114,115', 356 '117,,118,,411,,148,,123,124,,,149,122,125,126,127,128,129,130,,,,111', 357 '112,113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129', 358 '130,111,112,113,114,115,117,,118,,,,148,,123,124,,,,122,125,126,127', 359 '128,129,130,,,171,,,,,,,,,,,,,149,,111,112,113,114,115,117,,118,,,171', 360 '148,,123,124,,,,122,125,126,127,128,129,130,,149,,,,,,,,111,112,113', 361 '114,115,117,,118,,,,148,,123,124,146,398,149,122,125,126,127,128,129', 362 '130,111,112,113,114,115,117,,118,,,,148,,123,124,,,,122,125,126,127', 363 '128,129,130,111,112,113,114,115,117,,118,,149,,148,,123,124,389,,,122', 364 '125,126,127,128,129,130,,,,147,,,111,112,113,114,115,117,,118,,,,148', 365 '149,123,124,,,,122,125,126,127,128,129,130,111,112,113,114,115,117,', 366 '118,,379,,148,149,123,124,,,,122,125,126,127,128,129,130,,,,,,,,,,,', 367 ',149,,,,,111,112,113,114,115,117,,118,,,,148,,123,124,,,,122,125,126', 368 '127,128,129,130,,149,,,,,,,,,,,,,,,,,,,,,,,,,149,171,9,10,11,12,13,14', 369 '15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,111,112,113', 370 '114,115,117,,118,,,,148,,123,124,149,,,122,125,126,127,128,129,130,111', 371 '112,113,114,115,117,,118,,,,148,,123,124,146,,,122,125,126,127,128,129', 372 '130,111,112,113,114,115,117,,118,,,,148,,123,124,,,,122,125,126,127', 373 '128,129,130,,111,112,113,114,115,117,,118,,,,148,,123,124,,,149,122', 374 '125,126,127,128,129,130,,,147,,,111,112,113,114,115,117,,118,,,,148', 375 '149,123,124,,,,122,125,126,127,128,129,130,111,112,113,114,115,117,', 376 '118,,,,148,149,123,124,,,,122,125,126,127,128,129,130,,111,112,113,114', 377 '115,117,,118,,,,148,149,123,124,,,,122,125,126,127,128,129,130,111,112', 378 '113,114,115,117,,118,,,,148,,123,124,146,,149,122,125,126,127,128,129', 379 '130,111,112,113,114,115,117,427,118,,,,148,,123,124,,,149,122,125,126', 380 '127,128,129,130,,111,112,113,114,115,117,,118,,,,148,,123,124,,,149', 381 '122,125,126,127,128,129,130,,,147,,,111,112,113,114,115,117,,118,,185', 382 ',148,149,123,124,,,,122,125,126,127,128,129,130,111,112,113,114,115', 383 '117,,118,,,,148,149,123,124,,,,122,125,126,127,128,129,130,,111,112', 384 '113,114,115,117,,118,,,,148,149,123,124,,,,122,125,126,127,128,129,130', 385 '111,112,113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128', 386 '129,130,111,112,113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126', 387 '127,128,129,130,,111,112,113,114,115,117,,118,,,,148,,123,124,,,149', 388 '122,125,126,127,128,129,130,111,112,113,114,115,117,,118,,,,148,,123', 389 '124,,,149,122,125,126,127,128,129,130,111,112,113,114,115,117,,118,', 390 ',,148,,123,124,,,149,122,125,126,127,128,129,130,,111,112,113,114,115', 391 '117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130,111,112,113', 392 '114,115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130,111', 393 '112,113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129', 394 '130,,111,112,113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126', 395 '127,128,129,130,111,112,113,114,115,117,,118,,,,148,,123,124,,,149,122', 396 '125,126,127,128,129,130,111,112,113,114,115,117,,118,,,,148,,123,124', 397 ',,149,122,125,126,127,128,129,130,,111,112,113,114,115,117,,118,,,,148', 398 ',123,124,,,149,122,125,126,127,128,129,130,111,112,113,114,115,117,', 399 '118,,,,148,,123,124,,,149,122,125,126,127,128,129,130,111,112,113,114', 400 '115,117,,118,,,,148,,123,124,146,,149,122,125,126,127,128,129,130,,111', 401 '112,113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129', 402 '130,,,,,,,,,,,,,,,,,,149,,,,,,,,,,147,,,111,112,113,114,115,117,,118', 403 ',,,148,149,123,124,,,,122,125,126,127,128,129,130,,111,112,113,114,115', 404 '117,,118,,,,148,149,123,124,,,,122,125,126,127,128,129,130,,,,,,,13', 405 '14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,,,111,112,113,114,115', 406 '117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130,,111,112', 407 '113,114,115,231,,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130', 408 '111,112,113,114,115,233,,118,,,,148,,123,124,,,,122,125,126,127,128', 409 '129,130,111,112,113,114,115,233,,118,,,,148,,123,124,,,149,122,125,126', 410 '127,128,129,130,,,,,,,,,,,,,111,112,113,114,115,117,149,118,,,,148,', 411 '123,124,,,,122,125,126,127,128,129,130,111,112,113,114,115,117,149,118', 412 ',,,148,,123,124,,,,122,125,126,127,128,129,130,,,,,,,149,13,14,15,16', 413 '17,18,19,20,21,22,26,28,30,31,32,33,34,,,111,112,113,114,115,117,,118', 414 ',,,148,,123,124,,,149,122,125,126,127,128,129,130,111,112,113,114,115', 415 '117,327,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130,,,,,,', 416 ',13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,,,111,112,113,114', 417 '115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130,111,112', 418 '113,114,115,117,,118,,,,148,,123,124,,,149,122,125,126,127,128,129,130', 419 '111,112,113,114,115,117,,118,,,,148,,123,124,,,,122,125,126,127,128', 420 '129,130,,111,112,113,114,115,117,429,118,,,,148,,123,124,,,149,122,125', 421 '126,127,128,129,130,,287,,,,111,112,113,114,115,117,,118,,,,148,149', 422 '123,124,146,442,,122,125,126,127,128,129,130,111,112,113,114,115,117', 423 ',118,,,,148,149,123,124,,,,122,125,126,127,128,129,130,,111,112,113', 424 '114,115,117,,118,,,,148,149,123,124,,,,122,125,126,127,128,129,130,', 425 ',147,,,,,,,,,,,,,,46,149,,,,,,,,,,,,,,,,,,,,,,,,,149,,,46,,,,,,,,,,', 426 ',,,,,,,,,,,,149,45,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,30', 427 '31,32,33,34,35,36,37,38,,,47,45,9,10,11,12,13,14,15,16,17,18,19,20,21', 428 '22,26,28,30,31,32,33,34,35,36,37,38,,41,47,294,375,,298,,,54,,,,,,,', 429 ',56,,,,,,,,,,325,375,,298,,,,,,,,,,,,56,,,,,,,,9,10,11,12,13,14,15,16', 430 '17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,9,10,11,12,13,14', 431 '15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,188,,,,,192', 432 ',,,,,,,,,,,,,,,,,,,413,,,,,,,,,,,,,,,,,,,,,,9,10,11,12,13,14,15,16,17', 433 '18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,9,10,11,12,13,14,15', 434 '16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,371,9,10,11,12', 435 '13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,,,,,', 436 '205,,,,,,,,,,,,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,30,31', 437 '32,33,34,35,36,37,38,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28', 438 '30,31,32,33,34,35,36,37,38,307,,,,,,,,,,,,,,,,,,,,,,,,,381,,,,,,,,,', 439 ',,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36', 440 '37,38,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34', 441 '35,36,37,38,302,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,30,31', 442 '32,33,34,35,36,37,38,,,,,,,,,,,,9,10,11,12,13,14,15,16,17,18,19,20,21', 443 '22,26,28,30,31,32,33,34,35,36,37,38,9,10,11,12,13,14,15,16,17,18,19', 444 '20,21,22,26,28,30,31,32,33,34,35,36,37,38,9,10,11,12,13,14,15,16,17', 445 '18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,9,10,11,12,13,14,15', 446 '16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,9,10,11,12,13', 447 '14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,9,10,11', 448 '12,13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37,38,9', 449 '10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,30,31,32,33,34,35,36,37', 450 '38' ] 451 racc_action_table = arr = ::Array.new(3198, nil) 417 452 idx = 0 418 453 clist.each do |str| … … 424 459 425 460 clist = [ 426 '208,208,208,208,208,208,24,208,23,112,211,208,53,208,208,295,208,208', 427 '208,208,208,208,208,209,209,209,209,209,209,93,209,130,130,296,209,46', 428 '209,209,170,209,209,209,209,209,209,209,215,297,24,211,23,53,53,187', 429 '187,187,187,187,187,46,187,112,112,48,187,298,187,187,93,187,187,187', 430 '187,187,187,187,48,170,285,285,88,215,215,215,215,215,215,215,215,215', 431 '215,164,301,208,187,187,187,187,187,187,187,187,187,187,187,187,83,283', 432 '187,187,187,187,283,283,273,164,209,392,392,392,392,392,392,273,392', 433 '99,257,82,392,271,392,392,271,392,392,392,392,392,392,392,179,179,179', 434 '179,179,179,187,179,316,99,257,179,50,179,179,50,179,179,179,179,179', 435 '179,179,192,192,192,192,192,192,49,192,286,286,1,192,49,192,192,320', 436 '192,192,192,192,192,192,192,193,193,193,193,193,193,345,193,68,250,322', 437 '193,250,193,193,345,193,193,193,193,193,193,193,49,392,246,330,178,246', 438 '330,178,246,390,390,390,390,390,390,78,390,178,78,325,390,328,390,390', 439 '179,390,390,390,390,390,390,390,150,158,331,150,287,287,150,158,288', 440 '288,246,289,289,150,158,192,390,333,390,390,390,390,390,390,390,390', 441 '390,390,390,390,390,284,390,390,390,390,284,284,193,390,67,390,390,390', 442 '390,64,390,390,390,390,390,390,126,129,129,129,129,126,126,290,290,337', 443 '390,390,390,390,390,390,390,390,390,379,379,379,379,379,379,62,379,293', 444 '293,61,379,352,379,379,353,379,379,379,379,379,379,379,378,378,378,378', 445 '378,378,354,378,127,127,355,378,356,378,378,357,378,378,378,378,378', 446 '378,378,194,194,194,194,194,194,363,194,367,30,369,194,22,194,194,14', 447 '194,194,194,194,194,194,194,195,195,195,195,195,195,380,195,135,135', 448 '385,195,387,195,195,388,195,195,195,195,195,195,195,12,379,391,30,395', 449 '30,30,30,30,30,30,30,30,30,30,30,30,92,183,30,30,30,30,92,378,30,262', 450 '74,4,2,92,72,262,74,4,128,128,72,3,262,74,4,182,180,72,176,175,194,173', 451 '30,30,30,30,30,30,30,30,113,168,113,155,113,113,113,291,291,291,291', 452 '154,2,195,2,2,2,2,2,2,2,2,2,2,2,2,148,146,2,2,2,2,144,2,2,196,196,196', 453 '196,196,196,142,196,140,134,133,196,132,196,196,131,196,196,196,196', 454 '196,196,196,2,2,2,2,2,2,2,2,213,377,377,377,377,377,377,229,377,230', 455 '232,233,377,234,377,377,236,377,377,377,377,377,377,377,340,216,172', 456 '238,52,239,340,216,172,240,52,242,109,340,216,172,377,52,377,377,377', 457 '377,377,377,377,377,377,377,377,377,377,103,377,377,377,377,102,96,196', 458 '377,95,377,377,377,377,89,377,377,377,377,377,377,292,292,292,292,276', 459 '279,294,,,,377,377,377,377,377,377,377,377,377,169,169,169,169,169,169', 460 ',169,,,,169,,169,169,,169,169,169,169,169,169,169,,,376,376,376,376', 461 '376,376,,376,,,,376,,376,376,,376,376,376,376,376,376,376,,,,,,,,,,', 462 ',,,,,,376,,376,376,376,376,376,376,376,376,376,376,376,376,376,,376', 463 '376,376,376,,,,376,,376,376,376,376,169,376,376,376,376,376,376,,,,', 464 ',,,,,,376,376,376,376,376,376,376,376,376,359,359,359,359,359,359,,359', 465 ',,,359,,359,359,,359,359,359,359,359,359,359,,,,,,,,,,,,,,,,,359,,359', 466 '359,359,359,359,359,359,359,359,359,359,359,359,,359,359,359,359,,,', 467 '359,,359,359,359,359,,359,359,359,359,359,359,,,,,,,,,,,359,359,359', 468 '359,359,359,359,359,359,197,197,197,197,197,197,,197,,,,197,,197,197', 469 ',197,197,197,197,197,197,197,348,348,348,348,348,348,,348,,,,348,,348', 470 '348,,348,348,348,348,348,348,348,344,344,344,344,344,344,,344,,,,344', 471 ',344,344,,344,344,344,344,344,344,344,189,189,189,189,189,189,,189,', 472 ',,189,,189,189,,189,189,189,189,189,189,189,,197,,,,,,,,198,198,198', 473 '198,198,198,,198,,,,198,,198,198,348,198,198,198,198,198,198,198,334', 474 '334,334,334,334,334,,334,,334,,334,,334,334,344,334,334,334,334,334', 475 '334,334,,,,,,,,321,321,321,321,321,321,,321,189,,,321,,321,321,,321', 476 '321,321,321,321,321,321,,,,,,,,,,,,,,,,,321,198,321,321,321,321,321', 477 '321,321,321,321,321,321,321,321,,321,321,321,321,,,,321,334,321,321', 478 '321,321,,321,321,321,321,321,321,,,,,,,,,,,321,321,321,321,321,321,321', 479 '321,321,319,319,319,319,319,319,,319,,,,319,,319,319,,319,319,319,319', 480 '319,319,319,,,,,,,,,,,,,,,,,319,,319,319,319,319,319,319,319,319,319', 481 '319,319,319,319,,319,319,319,319,,,,319,,319,319,319,319,,319,319,319', 482 '319,319,319,,,,,,,,,,,319,319,319,319,319,319,319,319,319,396,396,396', 483 '396,396,396,,396,,,,396,,396,396,,396,396,396,396,396,396,396,,,,,,', 484 ',,,,,,,,,,396,,396,396,396,396,396,396,396,396,396,396,396,396,396,', 485 '396,396,396,396,,,,396,,396,396,396,396,,396,396,396,396,396,396,,,', 486 ',,,,,,,396,396,396,396,396,396,396,396,396,318,318,318,318,318,318,', 487 '318,,,,318,,318,318,,318,318,318,318,318,318,318,317,317,317,317,317', 488 '317,,317,,,,317,,317,317,,317,317,317,317,317,317,317,75,75,75,75,75', 489 '75,,75,,,,75,,75,75,,75,75,75,75,75,75,75,315,315,315,315,315,315,,315', 490 ',,,315,,315,315,,315,315,315,315,315,315,315,,318,,,,,,75,,,,,,75,80', 491 '80,80,80,80,80,,80,,80,317,80,,80,80,,80,80,80,80,80,80,80,181,181,181', 492 '181,181,181,,181,,,75,181,,181,181,,181,181,181,181,181,181,181,314', 493 '314,314,314,314,314,,314,,,315,314,,314,314,,314,314,314,314,314,314', 494 '314,302,302,302,302,302,302,,302,,,,302,,302,302,,302,302,302,302,302', 495 '302,302,,80,,,,,,,,199,199,199,199,199,199,,199,,,,199,,199,199,181', 496 '199,199,199,199,199,199,199,200,200,200,200,200,200,,200,,,,200,,200', 497 '200,314,200,200,200,200,200,200,200,300,300,300,300,300,300,,300,,,', 498 '300,,300,300,302,300,300,300,300,300,300,300,275,275,275,275,275,275', 499 ',275,,,,275,,275,275,,275,275,275,275,275,275,275,,199,,,,,,300,300', 500 ',,,,300,201,201,201,201,201,201,,201,,,200,201,,201,201,,201,201,201', 501 '201,201,201,201,207,207,207,207,207,207,,207,,,300,207,,207,207,,207', 502 '207,207,207,207,207,207,210,210,210,210,210,210,,210,,,275,210,,210', 503 '210,,210,210,210,210,210,210,210,202,202,202,202,202,202,,202,,,,202', 504 ',202,202,,202,202,202,202,202,202,202,,201,,,,,,,,269,269,269,269,269', 505 '269,,269,,,,269,,269,269,207,269,269,269,269,269,269,269,203,203,203', 506 '203,203,203,,203,,,,203,,203,203,210,203,203,203,203,203,203,203,204', 507 '204,204,204,204,204,,204,,,,204,,204,204,202,204,204,204,204,204,204', 508 '204,,,,,,,,,,143,143,143,143,143,143,,143,,,,143,,143,143,269,143,143', 509 '143,143,143,143,143,,,,,,,,,,,,,,,,203,143,,143,143,143,143,143,143', 510 '143,143,143,143,143,143,143,143,143,143,143,143,,,204,143,,143,143,143', 511 '143,,143,143,143,143,143,143,,,,,,,,,,,143,143,143,143,143,143,143,143', 512 '143,251,251,251,251,251,251,,251,,251,,251,,251,251,,251,251,251,251', 513 '251,251,251,110,110,110,110,110,110,,110,,,,110,,110,110,,110,110,110', 514 '110,110,110,110,70,70,70,70,70,70,70,70,70,70,70,70,,,70,70,70,70,110', 515 '110,110,110,110,110,110,110,110,110,110,110,,,110,110,110,110,,205,205', 516 '205,205,205,205,,205,,,251,205,,205,205,,205,205,205,205,205,205,205', 517 '206,206,206,206,206,206,,206,,,110,206,,206,206,,206,206,206,206,206', 518 '206,206,114,114,114,114,114,114,,114,,,,114,,114,114,,114,114,114,114', 519 '114,114,114,115,115,115,115,115,115,,115,,,,115,,115,115,,115,115,115', 520 '115,115,115,115,,205,,,,,,,,116,116,116,116,116,116,,116,,,,116,,116', 521 '116,206,116,116,116,116,116,116,116,117,117,117,117,117,117,,117,,,', 522 '117,,117,117,114,117,117,117,117,117,117,117,139,139,139,139,139,139', 523 ',139,,,,139,,139,139,115,139,139,139,139,139,139,139,241,241,241,241', 524 '241,241,,241,,,,241,,241,241,,241,241,241,241,241,241,241,,116,,,,,', 525 '139,,,,,,139,272,272,241,272,235,235,235,235,235,235,117,235,,272,,235', 526 ',235,235,,235,235,235,235,235,235,235,,,,,,,139,,,272,272,272,272,272', 527 '272,272,272,272,272,272,272,,,272,272,272,272,,,241,231,231,231,231', 528 '231,231,,231,,,,231,,231,231,,231,231,231,231,231,231,231,272,272,272', 529 '272,272,272,272,272,,,,,,,,,231,235,231,231,231,231,231,231,231,231', 530 '231,231,231,231,231,,231,231,231,231,,,,231,,231,231,231,231,,231,231', 531 '231,231,231,231,335,,,,,,,,,,231,231,231,231,231,231,231,231,231,247', 532 '247,,247,,,247,,,,,,,247,,,335,335,335,335,335,335,335,335,335,335,335', 533 '335,,,335,335,335,335,,,247,247,247,247,247,247,247,247,247,247,247', 534 '247,,,247,247,247,247,81,,,,,,335,335,335,335,335,335,335,335,,,,,,', 535 ',,245,,,,247,247,247,247,247,247,247,247,,81,81,81,81,81,81,81,81,81', 536 '81,81,81,,,81,81,81,81,245,245,245,245,245,245,245,245,245,245,245,245', 537 ',,245,245,245,245,,,,,,,,,81,81,81,81,81,81,81,81,,,,,,,,,,,245,245', 538 '245,245,245,245,245,245,5,5,5,5,5,5,5,5,5,5,5,5,,,5,5,5,5,252,252,252', 539 '252,252,252,252,252,252,252,252,252,,252,252,252,252,252,,,,,,,,,5,5', 540 '5,5,5,5,5,5,,,,,,,,,,,252,252,252,252,252,252,252,252,90,90,90,90,90', 541 '90,90,90,90,90,90,90,,90,90,90,90,90,153,153,153,153,153,153,153,153', 542 '153,153,153,153,,,153,153,153,153,,,,,,,,,90,90,90,90,90,90,90,90,,', 543 ',,,,,,,,153,153,153,153,153,153,153,153,87,87,87,87,87,87,87,87,87,87', 544 '87,87,,,87,87,87,87,86,86,86,86,86,86,86,86,86,86,86,86,,,86,86,86,86', 545 ',,,,,,,,87,87,87,87,87,87,87,87,,,,,,,,,,,86,86,86,86,86,86,86,86,156', 546 '156,156,156,156,156,156,156,156,156,156,156,,156,156,156,156,156,65', 547 '65,65,65,65,65,65,65,65,65,65,65,,,65,65,65,65,,,,,,,,,156,156,156,156', 548 '156,156,156,156,,,,,,,,,,,65,65,65,65,65,65,65,65,159,159,159,159,159', 549 '159,159,159,159,159,159,159,,159,159,159,159,159,7,7,7,7,7,7,7,7,7,7', 550 '7,7,,,7,7,7,7,,,,,,,,,159,159,159,159,159,159,159,159,,,,,,,,,,,7,7', 551 '7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,,,6,6,6,6,36,36,36,36,36,36,36,36', 552 '36,36,36,36,,,36,36,36,36,,,,,,,,,6,6,6,6,6,6,6,6,71,71,71,71,71,71', 553 '71,71,71,71,71,71,,,71,71,71,71' ] 554 racc_action_check = arr = ::Array.new(2877, nil) 461 '440,440,440,440,440,440,293,440,56,293,52,440,293,440,440,440,52,139', 462 '440,440,440,440,440,440,440,438,438,438,438,438,438,106,438,354,326', 463 '103,438,65,438,438,438,151,326,438,438,438,438,438,438,438,88,29,440', 464 '31,51,29,354,31,109,56,56,56,120,207,286,120,106,120,293,120,120,120', 465 '52,328,212,324,151,438,324,212,51,440,440,440,328,440,440,440,440,440', 466 '440,440,440,440,440,318,110,49,207,286,318,88,88,88,142,142,438,438', 467 '438,31,438,438,438,438,438,438,438,438,438,438,436,436,436,436,436,436', 468 '304,436,120,120,120,436,49,436,436,436,428,362,436,436,436,436,436,436', 469 '436,98,116,428,362,304,316,98,227,340,222,316,309,222,340,340,98,304', 470 '309,167,167,167,167,167,167,222,167,309,436,226,167,333,167,167,167', 471 '167,98,167,167,167,167,167,167,167,394,4,297,309,339,297,334,4,225,339', 472 '339,394,66,436,436,436,4,436,436,436,436,436,436,436,436,436,436,167', 473 '167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167', 474 '167,167,167,167,167,167,167,167,267,267,101,167,167,167,95,167,167,167', 475 '167,167,167,167,167,167,167,429,429,429,429,429,429,364,429,68,373,94', 476 '429,373,429,429,429,87,364,429,429,429,429,429,429,429,427,427,427,427', 477 '427,427,187,427,71,83,217,427,83,427,427,427,217,187,427,427,427,427', 478 '427,427,427,217,269,429,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75', 479 '75,75,133,53,221,426,53,133,133,427,418,418,291,429,429,429,426,429', 480 '429,429,429,429,429,429,429,429,429,137,137,350,220,136,136,136,136', 481 '214,214,351,427,427,427,220,427,427,427,427,427,427,427,427,427,427', 482 '175,175,175,175,175,175,363,175,215,215,352,175,353,175,175,175,218', 483 '363,175,175,175,175,175,175,175,76,76,76,76,76,76,76,76,76,76,76,76', 484 '76,76,76,76,76,425,82,82,82,82,82,82,274,82,357,175,425,82,283,82,82', 485 '82,82,73,82,82,82,82,82,82,82,72,201,347,347,347,347,209,201,348,348', 486 '348,348,365,175,175,175,201,175,175,175,175,175,175,175,175,175,175', 487 '82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82', 488 '82,82,82,349,349,198,82,82,82,197,82,82,82,82,82,82,82,82,82,82,273', 489 '273,273,273,273,273,371,273,135,135,189,273,374,273,273,273,346,346', 490 '273,273,273,273,273,273,273,404,404,404,404,404,404,376,404,345,345', 491 '79,404,186,404,404,404,79,184,404,404,404,404,404,404,404,79,380,273', 492 '47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,344,344,343,343,342', 493 '342,138,404,99,99,179,273,273,273,178,273,273,273,273,273,273,273,273', 494 '273,273,131,131,131,131,131,131,131,131,131,131,131,404,404,404,177', 495 '404,404,404,404,404,404,404,404,404,404,402,402,402,402,402,402,176', 496 '402,341,341,395,402,396,402,402,402,134,134,402,402,402,402,402,402', 497 '402,275,275,275,275,275,275,102,275,27,403,77,275,25,275,275,275,77', 498 '23,275,275,275,275,275,275,275,77,55,402,152,384,191,174,55,191,152', 499 '384,191,173,408,412,414,55,416,152,384,191,281,422,172,140,165,141,275', 500 '163,149,3,402,402,402,437,402,402,402,402,402,402,402,402,402,402,147', 501 '1,,,,,,,,,,275,275,275,,275,275,275,275,275,275,275,275,275,275,360', 502 '360,360,360,360,360,,360,,,,360,,360,360,360,,,360,360,360,360,360,360', 503 '360,249,249,249,249,249,249,,249,,,,249,,249,249,,,,249,249,249,249', 504 '249,249,249,,,360,383,383,383,383,383,383,,383,,,,383,,383,383,,,,383', 505 '383,383,383,383,383,383,,,,360,360,360,,360,360,360,360,360,360,360', 506 '360,360,360,,,,,,,377,377,377,377,377,377,,377,,377,,377,,377,377,,', 507 '249,377,377,377,377,377,377,377,,,,367,367,367,367,367,367,,367,,,,367', 508 ',367,367,,,383,367,367,367,367,367,367,367,366,366,366,366,366,366,', 509 '366,,,,366,,366,366,,,,366,366,366,366,366,366,366,,,367,,,,,,,,,,,', 510 ',377,,393,393,393,393,393,393,,393,,,366,393,,393,393,,,,393,393,393', 511 '393,393,393,393,,367,,,,,,,,356,356,356,356,356,356,,356,,,,356,,356', 512 '356,356,356,366,356,356,356,356,356,356,356,330,330,330,330,330,330', 513 ',330,,,,330,,330,330,,,,330,330,330,330,330,330,330,322,322,322,322', 514 '322,322,,322,,393,,322,,322,322,322,,,322,322,322,322,322,322,322,,', 515 ',356,,,310,310,310,310,310,310,,310,,,,310,356,310,310,,,,310,310,310', 516 '310,310,310,310,298,298,298,298,298,298,,298,,298,,298,330,298,298,', 517 ',,298,298,298,298,298,298,298,,,,,,,,,,,,,322,,,,,282,282,282,282,282', 518 '282,,282,,,,282,,282,282,,,,282,282,282,282,282,282,282,,310,,,,,,,', 519 ',,,,,,,,,,,,,,,,,298,282,282,282,282,282,282,282,282,282,282,282,282', 520 '282,282,282,282,282,282,282,282,282,282,282,282,282,282,280,280,280', 521 '280,280,280,,280,,,,280,,280,280,282,,,280,280,280,280,280,280,280,146', 522 '146,146,146,146,146,,146,,,,146,,146,146,146,,,146,146,146,146,146,146', 523 '146,278,278,278,278,278,278,,278,,,,278,,278,278,,,,278,278,278,278', 524 '278,278,278,,397,397,397,397,397,397,,397,,,,397,,397,397,,,280,397', 525 '397,397,397,397,397,397,,,146,,,405,405,405,405,405,405,,405,,,,405', 526 '146,405,405,,,,405,405,405,405,405,405,405,271,271,271,271,271,271,', 527 '271,,,,271,278,271,271,,,,271,271,271,271,271,271,271,,266,266,266,266', 528 '266,266,,266,,,,266,397,266,266,,,,266,266,266,266,266,266,266,80,80', 529 '80,80,80,80,,80,,,,80,,80,80,80,,405,80,80,80,80,80,80,80,406,406,406', 530 '406,406,406,406,406,,,,406,,406,406,,,271,406,406,406,406,406,406,406', 531 ',265,265,265,265,265,265,,265,,,,265,,265,265,,,266,265,265,265,265', 532 '265,265,265,,,80,,,85,85,85,85,85,85,,85,,85,,85,80,85,85,,,,85,85,85', 533 '85,85,85,85,264,264,264,264,264,264,,264,,,,264,406,264,264,,,,264,264', 534 '264,264,264,264,264,,263,263,263,263,263,263,,263,,,,263,265,263,263', 535 ',,,263,263,263,263,263,263,263,262,262,262,262,262,262,,262,,,,262,', 536 '262,262,,,85,262,262,262,262,262,262,262,261,261,261,261,261,261,,261', 537 ',,,261,,261,261,,,264,261,261,261,261,261,261,261,,260,260,260,260,260', 538 '260,,260,,,,260,,260,260,,,263,260,260,260,260,260,260,260,259,259,259', 539 '259,259,259,,259,,,,259,,259,259,,,262,259,259,259,259,259,259,259,258', 540 '258,258,258,258,258,,258,,,,258,,258,258,,,261,258,258,258,258,258,258', 541 '258,,257,257,257,257,257,257,,257,,,,257,,257,257,,,260,257,257,257', 542 '257,257,257,257,256,256,256,256,256,256,,256,,,,256,,256,256,,,259,256', 543 '256,256,256,256,256,256,255,255,255,255,255,255,,255,,,,255,,255,255', 544 ',,258,255,255,255,255,255,255,255,,254,254,254,254,254,254,,254,,,,254', 545 ',254,254,,,257,254,254,254,254,254,254,254,253,253,253,253,253,253,', 546 '253,,,,253,,253,253,,,256,253,253,253,253,253,253,253,252,252,252,252', 547 '252,252,,252,,,,252,,252,252,,,255,252,252,252,252,252,252,252,,251', 548 '251,251,251,251,251,,251,,,,251,,251,251,,,254,251,251,251,251,251,251', 549 '251,250,250,250,250,250,250,,250,,,,250,,250,250,,,253,250,250,250,250', 550 '250,250,250,389,389,389,389,389,389,,389,,,,389,,389,389,389,,252,389', 551 '389,389,389,389,389,389,,248,248,248,248,248,248,,248,,,,248,,248,248', 552 ',,251,248,248,248,248,248,248,248,,,,,,,,,,,,,,,,,,250,,,,,,,,,,389', 553 ',,117,117,117,117,117,117,,117,,,,117,389,117,117,,,,117,117,117,117', 554 '117,117,117,,236,236,236,236,236,236,,236,,,,236,248,236,236,,,,236', 555 '236,236,236,236,236,236,,,,,,,117,117,117,117,117,117,117,117,117,117', 556 '117,117,117,117,117,117,117,,,121,121,121,121,121,121,,121,,,,121,,121', 557 '121,,,117,121,121,121,121,121,121,121,,122,122,122,122,122,122,,122', 558 ',,,122,,122,122,,,236,122,122,122,122,122,122,122,123,123,123,123,123', 559 '123,,123,,,,123,,123,123,,,,123,123,123,123,123,123,123,124,124,124', 560 '124,124,124,,124,,,,124,,124,124,,,121,124,124,124,124,124,124,124,', 561 ',,,,,,,,,,,233,233,233,233,233,233,122,233,,,,233,,233,233,,,,233,233', 562 '233,233,233,233,233,223,223,223,223,223,223,123,223,,,,223,,223,223', 563 ',,,223,223,223,223,223,223,223,,,,,,,124,233,233,233,233,233,233,233', 564 '233,233,233,233,233,233,233,233,233,233,,,231,231,231,231,231,231,,231', 565 ',,,231,,231,231,,,233,231,231,231,231,231,231,231,224,224,224,224,224', 566 '224,224,224,,,,224,,224,224,,,223,224,224,224,224,224,224,224,,,,,,', 567 ',231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231', 568 ',,213,213,213,213,213,213,,213,,,,213,,213,213,,,231,213,213,213,213', 569 '213,213,213,210,210,210,210,210,210,,210,,,,210,,210,210,,,224,210,210', 570 '210,210,210,210,210,180,180,180,180,180,180,,180,,,,180,,180,180,,,', 571 '180,180,180,180,180,180,180,,407,407,407,407,407,407,407,407,,,,407', 572 ',407,407,,,213,407,407,407,407,407,407,407,,180,,,,435,435,435,435,435', 573 '435,,435,,,,435,210,435,435,435,435,,435,435,435,435,435,435,435,164', 574 '164,164,164,164,164,,164,,,,164,180,164,164,,,,164,164,164,164,164,164', 575 '164,,279,279,279,279,279,279,,279,,,,279,407,279,279,,,,279,279,279', 576 '279,279,279,279,,,435,,,,,,,,,,,,,,41,435,,,,,,,,,,,,,,,,,,,,,,,,,164', 577 ',,2,,,,,,,,,,,,,,,,,,,,,,,279,41,41,41,41,41,41,41,41,41,41,41,41,41', 578 '41,41,41,41,41,41,41,41,41,41,41,41,41,,,41,2,2,2,2,2,2,2,2,2,2,2,2', 579 '2,2,2,2,2,2,2,2,2,2,2,2,2,2,,2,2,294,294,,294,,,294,,,,,,,,,294,,,,', 580 ',,,,,325,325,,325,,,,,,,,,,,,325,,,,,,,,294,294,294,294,294,294,294', 581 '294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294', 582 '294,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325', 583 '325,325,325,325,325,325,325,325,325,86,,,,,86,,,,,,,,,,,,,,,,,,,,378', 584 ',,,,,,,,,,,,,,,,,,,,,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86', 585 '86,86,86,86,86,86,86,86,86,378,378,378,378,378,378,378,378,378,378,378', 586 '378,378,378,378,378,378,378,378,378,378,378,378,378,378,292,7,7,7,7', 587 '7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,,,,,,96,,,,,,,,,,,,292,292', 588 '292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292', 589 '292,292,292,292,292,292,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96', 590 '96,96,96,96,96,96,96,96,96,96,202,,,,,,,,,,,,,,,,,,,,,,,,,299,,,,,,', 591 ',,,,,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202', 592 '202,202,202,202,202,202,202,202,202,299,299,299,299,299,299,299,299', 593 '299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299', 594 '199,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92', 595 '92,92,92,,,,,,,,,,,,199,199,199,199,199,199,199,199,199,199,199,199', 596 '199,199,199,199,199,199,199,199,199,199,199,199,199,8,8,8,8,8,8,8,8', 597 '8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,196,196,196,196,196,196,196,196,196', 598 '196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,6,6', 599 '6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5', 600 '5,5,5,5,5,5,5,5,5,5,5,5,5,5,93,93,93,93,93,93,93,93,93,93,93,93,93,93', 601 '93,93,93,93,93,93,93,93,93,93,93,69,69,69,69,69,69,69,69,69,69,69,69', 602 '69,69,69,69,69,69,69,69,69,69,69,69,69' ] 603 racc_action_check = arr = ::Array.new(3198, nil) 555 604 idx = 0 556 605 clist.each do |str| … … 562 611 563 612 racc_action_pointer = [ 564 nil, 173, 432, 442, 425, 2414, 2764, 2712, nil, nil, 565 nil, nil, 363, nil, 332, nil, nil, nil, nil, nil, 566 nil, nil, 357, -5, -7, nil, nil, nil, nil, nil, 567 366, nil, nil, nil, nil, nil, 2782, nil, nil, nil, 568 nil, nil, nil, nil, nil, nil, 18, nil, 21, 162, 569 145, nil, 548, -8, nil, nil, nil, nil, nil, nil, 570 nil, 267, 263, nil, 231, 2642, nil, 268, 139, nil, 571 1860, 2816, 428, nil, 424, 1315, nil, nil, 217, nil, 572 1375, 2344, 119, 86, nil, nil, 2572, 2554, 39, 555, 573 2484, nil, 414, 12, nil, 549, 575, nil, nil, 108, 574 nil, nil, 545, 487, nil, nil, nil, nil, nil, 554, 575 1878, nil, 2, 451, 1984, 2007, 2039, 2062, nil, nil, 576 nil, nil, nil, nil, nil, nil, 273, 322, 412, 265, 577 -2, 492, 473, 470, 468, 351, nil, nil, nil, 2085, 578 497, nil, 489, 1761, 482, nil, 480, nil, 470, nil, 579 234, nil, nil, 2502, 431, 423, 2624, nil, 235, 2694, 580 nil, nil, nil, nil, 74, nil, nil, nil, 449, 620, 581 21, nil, 546, 439, nil, 442, 441, nil, 206, 138, 582 440, 1398, 433, 409, nil, nil, nil, 51, nil, 902, 583 nil, nil, 161, 184, 356, 379, 494, 833, 934, 1476, 584 1499, 1582, 1651, 1706, 1729, 1938, 1961, 1605, -2, 21, 585 1628, -7, nil, 518, nil, 4, 545, nil, nil, nil, 586 nil, nil, nil, nil, nil, nil, nil, nil, nil, 527, 587 529, 2202, 530, 531, 500, 2149, 503, nil, 541, 515, 588 519, 2108, 521, nil, nil, 2362, 204, 2291, nil, nil, 589 188, 1855, 2432, nil, nil, nil, nil, 109, nil, nil, 590 nil, nil, 423, nil, nil, nil, nil, nil, nil, 1683, 591 nil, 122, 2140, 106, nil, 1545, 596, nil, nil, 600, 592 nil, nil, nil, 87, 252, 57, 150, 218, 222, 225, 593 273, 439, 574, 287, 590, -20, -3, 10, 25, nil, 594 1522, 84, 1444, nil, nil, nil, nil, nil, nil, nil, 595 nil, nil, nil, nil, 1421, 1338, 82, 1292, 1269, 1081, 596 138, 987, 155, nil, nil, 187, nil, nil, 218, nil, 597 205, 235, nil, 250, 957, 2271, nil, 291, nil, nil, 598 544, nil, nil, nil, 879, 184, nil, nil, 856, nil, 599 nil, nil, 283, 319, 333, 338, 306, 342, nil, 739, 600 nil, nil, nil, 352, nil, nil, nil, 355, nil, 360, 601 nil, nil, nil, nil, nil, nil, 645, 526, 333, 310, 602 317, nil, nil, nil, nil, 326, nil, 385, 355, nil, 603 216, 365, 115, nil, nil, 400, 1175, nil ] 613 nil, 732, 2528, 716, 182, 3068, 3043, 2752, 2993, nil, 614 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 615 nil, nil, nil, 624, nil, 619, nil, 656, nil, 38, 616 nil, 40, nil, nil, nil, nil, nil, nil, nil, nil, 617 nil, 2499, nil, nil, nil, nil, nil, 510, nil, 78, 618 nil, 37, 3, 322, nil, 680, -14, nil, nil, nil, 619 nil, nil, nil, nil, nil, 20, 183, nil, 249, 3118, 620 nil, 278, 429, 421, nil, 252, 344, 664, nil, 544, 621 1392, nil, 419, 285, nil, 1473, 2701, 266, 28, nil, 622 nil, nil, 2932, 3093, 214, 193, 2819, nil, 138, 576, 623 nil, 200, 654, 22, nil, nil, 12, nil, nil, 15, 624 1, nil, nil, nil, nil, nil, 137, 1959, nil, nil, 625 55, 2035, 2061, 2086, 2111, nil, nil, nil, nil, nil, 626 nil, 568, nil, 306, 629, 495, 326, 318, 571, -20, 627 672, 673, 64, nil, nil, nil, 1235, 724, nil, 702, 628 nil, 22, 682, nil, nil, nil, nil, nil, nil, nil, 629 nil, nil, nil, 672, 2431, 669, nil, 161, nil, nil, 630 nil, nil, 702, 691, 685, 376, 635, 612, 546, 542, 631 2350, nil, nil, nil, 547, nil, 545, 281, nil, 507, 632 nil, 684, nil, nil, nil, nil, 3018, 451, 447, 2968, 633 nil, 440, 2881, nil, nil, nil, nil, 44, nil, 410, 634 2325, nil, 61, 2300, 343, 368, nil, 286, 381, nil, 635 348, 322, 147, 2173, 2249, 189, 160, 139, nil, nil, 636 nil, 2224, nil, 2148, nil, nil, 1985, nil, nil, nil, 637 nil, nil, nil, nil, nil, nil, nil, nil, 1904, 779, 638 1853, 1828, 1802, 1777, 1752, 1726, 1701, 1676, 1650, 1625, 639 1600, 1574, 1549, 1524, 1498, 1443, 1367, 223, nil, 300, 640 nil, 1341, nil, 514, 385, 659, nil, nil, 1260, 2457, 641 1210, 619, 1132, 379, nil, nil, 45, nil, nil, nil, 642 nil, 325, 2794, -1, 2604, nil, nil, 183, 1090, 2906, 643 nil, nil, nil, nil, 107, nil, nil, nil, nil, 149, 644 1065, nil, nil, nil, nil, nil, 137, nil, 82, nil, 645 nil, nil, 1034, nil, 68, 2629, 23, nil, 65, nil, 646 1009, nil, nil, 167, 186, nil, nil, nil, nil, 170, 647 131, 621, 567, 559, 557, 520, 503, 417, 423, 464, 648 334, 326, 350, 351, 14, nil, 984, 421, nil, nil, 649 754, nil, 129, 376, 256, 451, 908, 883, nil, nil, 650 nil, 510, nil, 260, 520, nil, 539, 855, 2726, nil, 651 556, nil, nil, 807, 683, nil, nil, nil, nil, 1878, 652 nil, nil, nil, 950, 180, 629, 631, 1286, nil, nil, 653 nil, nil, 634, 653, 539, 1316, 1417, 2376, 687, nil, 654 nil, nil, 689, nil, 693, nil, 649, nil, 318, nil, 655 nil, nil, 622, nil, nil, 412, 323, 281, 128, 256, 656 nil, nil, nil, nil, nil, 2406, 118, 666, 23, nil, 657 -2, nil, nil, nil, nil, nil, nil ] 604 658 605 659 racc_action_default = [ 606 -174, -241, -1, -241, -241, -70, -71, -72, -80, -81, 607 -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, 608 -92, -93, -96, -241, -241, -127, -132, -133, -175, -176, 609 -241, -178, -179, -182, -183, -184, -241, -230, -231, -232, 610 -233, -234, -235, -236, -237, 398, -241, -76, -78, -241, 611 -135, -137, -241, -143, -73, -84, -86, -74, -75, -181, 612 -180, -98, -241, -101, -114, -241, -117, -241, -126, -177, 613 -105, -107, -241, -69, -241, -241, -188, -189, -134, -136, 614 -241, -241, -241, -144, -145, -94, -241, -241, -84, -85, 615 -241, -115, -241, -241, -128, -130, -241, -106, -108, -241, 616 -186, -77, -78, -2, -3, -4, -5, -6, -7, -8, 617 -241, -10, -12, -23, -241, -241, -241, -241, -29, -30, 618 -31, -32, -33, -34, -35, -37, -41, -44, -47, -52, 619 -55, -57, -59, -61, -63, -65, -68, -79, -168, -241, 620 -241, -238, -241, -241, -241, -140, -241, -142, -147, -149, 621 -153, -138, -146, -241, -84, -85, -241, -99, -241, -241, 622 -120, -119, -113, -116, -241, -121, -123, -124, -241, -241, 623 -241, -185, -241, -241, -11, -241, -241, -67, -154, -20, 624 -241, -241, -241, -241, -18, -19, -24, -241, -25, -241, 625 -27, -28, -241, -241, -241, -241, -241, -241, -241, -241, 626 -241, -241, -241, -241, -241, -241, -241, -241, -241, -241, 627 -241, -241, -172, -241, -239, -35, -241, -190, -191, -192, 628 -193, -194, -195, -196, -197, -198, -199, -200, -201, -241, 629 -241, -241, -241, -241, -238, -241, -241, -211, -241, -241, 630 -241, -241, -241, -139, -141, -241, -156, -241, -151, -152, 631 -157, -241, -241, -104, -103, -97, -100, -241, -109, -111, 632 -112, -118, -241, -129, -131, -125, -187, -240, -9, -241, 633 -155, -156, -241, -241, -21, -20, -241, -16, -17, -241, 634 -38, -39, -40, -42, -43, -45, -46, -48, -49, -50, 635 -51, -53, -54, -56, -58, -60, -62, -64, -241, -169, 636 -241, -241, -241, -219, -220, -221, -222, -223, -224, -225, 637 -226, -227, -228, -229, -241, -241, -241, -241, -241, -241, 638 -241, -241, -241, -213, -214, -241, -216, -217, -241, -150, 639 -158, -241, -164, -241, -241, -241, -160, -241, -95, -102, 640 -241, -122, -36, -13, -241, -241, -15, -26, -241, -170, 641 -173, -171, -241, -241, -241, -241, -241, -241, -208, -241, 642 -210, -212, -215, -241, -159, -165, -162, -241, -166, -241, 643 -161, -110, -22, -14, -66, -218, -241, -241, -241, -241, 644 -241, -209, -148, -163, -167, -202, -204, -241, -241, -207, 645 -241, -241, -241, -203, -205, -241, -241, -206 ] 660 -215, -269, -1, -269, -269, -86, -88, -90, -92, -98, 661 -99, -100, -101, -102, -103, -104, -105, -106, -107, -108, 662 -109, -110, -111, -112, -113, -114, -115, -118, -121, -269, 663 -139, -269, -163, -164, -165, -166, -167, -168, -169, -216, 664 -217, -269, -219, -220, -223, -224, -225, -269, 447, -269, 665 -94, -96, -269, -171, -173, -269, -180, -87, -112, -114, 666 -89, -91, -93, -222, -221, -120, -269, -124, -138, -269, 667 -142, -269, -155, -158, -218, -130, -132, -269, -85, -269, 668 -269, -229, -269, -170, -172, -269, -269, -269, -181, -182, 669 -184, -116, -269, -269, -112, -113, -269, -140, -269, -269, 670 -159, -161, -269, -269, -129, -131, -269, -227, -95, -96, 671 -2, -3, -4, -5, -6, -7, -8, -269, -10, -12, 672 -25, -269, -269, -269, -269, -31, -32, -33, -34, -35, 673 -36, -37, -39, -43, -46, -49, -54, -57, -59, -61, 674 -63, -65, -67, -69, -97, -209, -269, -269, -265, -269, 675 -82, -269, -269, -230, -231, -232, -233, -234, -235, -236, 676 -237, -238, -239, -265, -269, -269, -243, -269, -245, -247, 677 -248, -249, -269, -269, -269, -269, -269, -269, -269, -269, 678 -269, -268, -37, -84, -269, -176, -269, -269, -179, -186, 679 -188, -192, -193, -174, -183, -185, -269, -112, -113, -269, 680 -122, -269, -269, -145, -144, -137, -141, -269, -146, -148, 681 -269, -151, -269, -269, -269, -269, -226, -269, -269, -11, 682 -269, -269, -195, -269, -269, -269, -269, -269, -19, -20, 683 -26, -269, -27, -269, -29, -30, -269, -71, -72, -73, 684 -74, -75, -76, -77, -78, -79, -80, -81, -269, -269, 685 -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, 686 -269, -269, -269, -269, -269, -269, -269, -269, -213, -269, 687 -266, -269, -250, -269, -269, -269, -244, -246, -269, -269, 688 -269, -269, -269, -269, -261, -262, -269, -263, -175, -177, 689 -178, -269, -269, -197, -269, -190, -191, -198, -269, -269, 690 -128, -127, -119, -123, -269, -133, -135, -136, -143, -269, 691 -269, -149, -153, -160, -162, -152, -269, -156, -269, -228, 692 -267, -9, -269, -196, -197, -269, -269, -14, -269, -23, 693 -269, -17, -18, -269, -269, -70, -40, -41, -42, -44, 694 -45, -47, -48, -50, -51, -52, -53, -55, -56, -58, 695 -60, -62, -64, -66, -269, -210, -269, -269, -83, -240, 696 -269, -242, -269, -269, -269, -269, -269, -269, -260, -264, 697 -194, -269, -189, -199, -269, -205, -269, -269, -269, -201, 698 -269, -117, -125, -269, -269, -147, -150, -154, -157, -269, 699 -38, -13, -15, -269, -269, -28, -269, -269, -211, -214, 700 -212, -241, -269, -269, -269, -269, -269, -269, -269, -200, 701 -206, -203, -269, -207, -269, -202, -269, -134, -269, -24, 702 -16, -68, -251, -253, -254, -269, -269, -269, -269, -269, 703 -187, -204, -208, -126, -21, -269, -269, -269, -269, -256, 704 -269, -258, -22, -252, -255, -257, -259 ] 646 705 647 706 racc_goto_table = [ 648 48, 4, 144, 146, 54, 57, 58, 217, 84, 12, 649 136, 137, 78, 175, 258, 136, 273, 165, 188, 190, 650 191, 186, 72, 89, 256, 93, 176, 163, 70, 4, 651 33, 156, 249, 29, 283, 284, 302, 12, 152, 14, 652 330, 2, 71, 293, 155, 89, 215, 90, 89, 287, 653 288, 289, 290, 294, 170, 295, 97, 98, 33, 83, 654 270, 69, 70, 70, 92, 330, 296, 14, 100, 159, 655 102, 297, 88, 101, 136, 212, 71, 71, 285, 286, 656 150, 61, 274, 153, 276, 158, 92, 62, 166, 92, 657 175, 264, 175, 154, 88, 316, 163, 88, 252, 280, 658 281, 282, 70, 279, 136, 246, 291, 292, 257, 64, 659 164, 155, 345, 298, 155, 263, 71, 89, 180, 329, 660 256, 211, 28, 99, 76, 143, 1, nil, nil, nil, 661 nil, nil, nil, 271, 215, nil, nil, nil, nil, nil, 662 nil, nil, nil, nil, 325, nil, 248, nil, nil, nil, 663 nil, nil, 158, nil, 259, 158, nil, 320, 92, nil, 664 154, nil, nil, 154, nil, nil, 88, nil, 266, nil, 665 136, nil, nil, 337, nil, nil, 342, nil, 274, 70, 666 nil, nil, nil, 358, nil, 360, 136, 341, nil, nil, 667 nil, nil, nil, 71, nil, nil, 371, nil, nil, nil, 668 nil, nil, 246, nil, nil, 352, nil, nil, nil, 78, 669 155, nil, 102, nil, nil, nil, nil, 353, 354, nil, 670 356, 357, 215, 381, 215, nil, nil, 271, nil, nil, 671 nil, nil, nil, nil, nil, 136, 350, nil, nil, nil, 672 385, 386, nil, nil, 150, nil, 150, 372, nil, nil, 673 nil, 158, nil, nil, 393, nil, 367, 369, 166, 154, 674 397, nil, 215, nil, nil, nil, nil, nil, nil, 136, 675 nil, 150, nil, nil, nil, nil, nil, nil, nil, 215, 676 215, 387, 388, 374, nil, nil, nil, nil, nil, nil, 677 nil, nil, nil, 215, nil, 395, nil, nil, nil, 215, 707 51, 144, 145, 81, 183, 182, 184, 281, 186, 23, 708 267, 95, 208, 83, 206, 305, 303, 313, 328, 169, 709 25, 4, 199, 230, 57, 60, 61, 62, 75, 89, 710 40, 99, 168, 221, 198, 95, 296, 77, 95, 220, 711 373, 182, 232, 234, 235, 65, 96, 207, 23, 76, 712 304, 366, 343, 344, 345, 346, 75, 75, 90, 25, 713 4, 194, 214, 215, 66, 104, 105, 323, 145, 74, 714 202, 373, 196, 107, 68, 109, 94, 76, 76, 347, 715 348, 339, 340, 183, 182, 274, 341, 342, 98, 108, 716 195, 236, 187, 88, 209, 372, 353, 352, 75, 197, 717 94, 152, 286, 94, 169, 359, 39, 361, 351, 106, 718 350, 201, 98, 349, 2, 98, 303, 277, 167, 76, 719 206, 313, 225, 313, 394, 1, 299, nil, nil, 183, 720 182, 311, 183, 182, 314, 406, 407, nil, 198, nil, 721 nil, 198, nil, nil, 95, 326, 329, 333, 109, 334, 722 336, 337, 338, 220, nil, 220, nil, nil, 335, nil, 723 nil, nil, nil, nil, 293, nil, nil, nil, 182, 182, 724 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 725 182, 182, 182, 182, 182, 182, 152, 295, 354, nil, 726 nil, nil, 401, 358, nil, 324, nil, 306, 417, nil, 727 362, 363, 364, 197, nil, nil, 197, nil, nil, 94, 728 nil, nil, 75, 319, 75, 201, nil, nil, 201, 367, 729 380, 98, nil, 385, 390, nil, nil, nil, nil, 183, 730 182, 386, nil, 76, 422, 76, 424, nil, nil, nil, 731 nil, 198, 182, nil, nil, nil, nil, nil, nil, nil, 732 nil, nil, 329, 418, 83, nil, nil, nil, nil, 439, 733 nil, 441, nil, nil, nil, nil, nil, 293, 443, nil, 734 445, nil, 446, nil, nil, nil, nil, 399, 145, nil, 735 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 736 nil, nil, nil, nil, nil, nil, nil, nil, 324, 412, 737 414, 152, 183, 182, 416, 209, 197, nil, nil, nil, 738 nil, 145, nil, nil, nil, 419, 421, 182, 201, nil, 739 nil, nil, nil, nil, nil, nil, nil, 425, 426, 428, 678 740 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 679 741 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 680 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 681 nil, nil, nil, nil, 150, nil, 259 ] 682 683 racc_goto_check = [ 684 32, 27, 25, 55, 27, 27, 27, 68, 53, 34, 685 24, 33, 54, 6, 44, 24, 8, 49, 10, 10, 686 10, 12, 43, 35, 41, 51, 13, 47, 30, 27, 687 26, 38, 58, 62, 14, 14, 77, 34, 53, 36, 688 59, 2, 9, 18, 35, 35, 10, 46, 35, 16, 689 16, 16, 16, 19, 51, 20, 43, 43, 26, 9, 690 58, 62, 30, 30, 27, 59, 21, 36, 32, 46, 691 32, 22, 34, 31, 24, 33, 9, 9, 15, 15, 692 27, 37, 6, 39, 6, 27, 27, 40, 32, 27, 693 6, 25, 6, 34, 34, 68, 47, 34, 38, 12, 694 12, 12, 30, 13, 24, 53, 17, 17, 42, 45, 695 48, 35, 8, 6, 35, 52, 9, 35, 9, 57, 696 41, 60, 61, 65, 66, 67, 1, nil, nil, nil, 697 nil, nil, nil, 53, 10, nil, nil, nil, nil, nil, 698 nil, nil, nil, nil, 6, nil, 32, nil, nil, nil, 699 nil, nil, 27, nil, 32, 27, nil, 25, 27, nil, 700 34, nil, nil, 34, nil, nil, 34, nil, 32, nil, 701 24, nil, nil, 25, nil, nil, 12, nil, 6, 30, 702 nil, nil, nil, 68, nil, 68, 24, 49, nil, nil, 703 nil, nil, nil, 9, nil, nil, 44, nil, nil, nil, 704 nil, nil, 53, nil, nil, 6, nil, nil, nil, 54, 705 35, nil, 32, nil, nil, nil, nil, 6, 6, nil, 706 6, 6, 10, 68, 10, nil, nil, 53, nil, nil, 707 nil, nil, nil, nil, nil, 24, 33, nil, nil, nil, 708 68, 68, nil, nil, 27, nil, 27, 6, nil, nil, 709 nil, 27, nil, nil, 68, nil, 25, 55, 32, 34, 710 68, nil, 10, nil, nil, nil, nil, nil, nil, 24, 711 nil, 27, nil, nil, nil, nil, nil, nil, nil, 10, 712 10, 6, 6, 24, nil, nil, nil, nil, nil, nil, 713 nil, nil, nil, 10, nil, 6, nil, nil, nil, 10, 742 nil, nil, nil, nil, nil, 423, 399, 145, nil, nil, 714 743 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 715 744 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 745 306 ] 746 747 racc_goto_check = [ 748 36, 37, 12, 72, 26, 13, 28, 73, 60, 38, 749 11, 39, 55, 59, 53, 49, 46, 57, 8, 29, 750 40, 30, 43, 15, 30, 30, 30, 30, 33, 58, 751 68, 56, 84, 10, 39, 39, 65, 48, 39, 6, 752 66, 13, 13, 13, 13, 42, 52, 54, 38, 9, 753 47, 75, 18, 18, 18, 18, 33, 33, 9, 40, 754 30, 58, 56, 56, 45, 48, 48, 65, 12, 68, 755 52, 66, 44, 36, 51, 36, 38, 9, 9, 19, 756 19, 16, 16, 26, 13, 28, 17, 17, 30, 35, 757 9, 27, 61, 62, 36, 64, 24, 23, 33, 38, 758 38, 30, 6, 38, 29, 73, 67, 73, 22, 71, 759 21, 30, 30, 20, 2, 30, 46, 84, 83, 9, 760 53, 57, 9, 57, 8, 1, 43, nil, nil, 26, 761 13, 28, 26, 13, 28, 75, 75, nil, 39, nil, 762 nil, 39, nil, nil, 39, 6, 12, 10, 36, 10, 763 15, 15, 15, 6, nil, 6, nil, nil, 12, nil, 764 nil, nil, nil, nil, 58, nil, nil, nil, 13, 13, 765 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 766 13, 13, 13, 13, 13, 13, 30, 36, 6, nil, 767 nil, nil, 73, 12, nil, 58, nil, 36, 49, nil, 768 6, 6, 6, 38, nil, nil, 38, nil, nil, 38, 769 nil, nil, 33, 36, 33, 30, nil, nil, 30, 29, 770 12, 30, nil, 55, 15, nil, nil, nil, nil, 26, 771 13, 28, nil, 9, 73, 9, 73, nil, nil, nil, 772 nil, 39, 13, nil, nil, nil, nil, nil, nil, nil, 773 nil, nil, 12, 11, 59, nil, nil, nil, nil, 73, 774 nil, 73, nil, nil, nil, nil, nil, 58, 73, nil, 775 73, nil, 73, nil, nil, nil, nil, 37, 12, nil, 716 776 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 717 nil, nil, nil, nil, 27, nil, 32 ] 777 nil, nil, nil, nil, nil, nil, nil, nil, 58, 12, 778 60, 30, 26, 13, 28, 36, 38, nil, nil, nil, 779 nil, 12, nil, nil, nil, 12, 26, 13, 30, nil, 780 nil, nil, nil, nil, nil, nil, nil, 6, 6, 6, 781 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 782 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 783 nil, nil, nil, nil, nil, 72, 37, 12, nil, nil, 784 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 785 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 786 36 ] 718 787 719 788 racc_goto_pointer = [ 720 nil, 126, 41, nil, nil, nil, -97, nil, -163, 6, 721 -97, nil, -93, -84, -161, -119, -150, -97, -162, -153, 722 -152, -142, -138, nil, -65, -78, 28, -1, nil, nil, 723 -8, -1, -4, -64, 7, -42, 37, 59, -55, -2, 724 65, -132, -50, -14, -144, 86, -18, -63, 18, -75, 725 nil, -42, -53, -45, -37, -78, nil, -126, -118, -206, 726 -18, 120, 31, nil, nil, 51, 76, 48, -136, nil, 727 nil, nil, nil, nil, nil, nil, nil, -179 ] 789 nil, 125, 114, nil, nil, nil, -78, nil, -206, 2, 790 -84, -136, -78, -80, nil, -98, -170, -167, -203, -180, 791 -148, -152, -155, -167, -169, nil, -81, -40, -79, -63, 792 19, nil, nil, -19, nil, 10, -4, -79, 7, -58, 793 18, nil, 18, -70, -19, 37, -183, -151, -10, -186, 794 nil, 45, -23, -82, -51, -86, -40, -195, -27, -39, 795 -78, 6, 37, nil, -197, -155, -253, 104, 28, nil, 796 nil, 32, -48, -168, nil, -231, nil, nil, nil, nil, 797 nil, nil, nil, 36, -50 ] 728 798 729 799 racc_goto_default = [ 730 nil, nil, nil, 112, 103, 109, 242, 113, nil, 7, 731 124, 114, 125, nil, 126, 127, 128, 129, 130, 131, 732 132, 133, 134, 135, 177, 138, 218, 216, 46, 5, 733 6, 47, 82, nil, 55, 13, 56, nil, nil, nil, 734 nil, 157, nil, 178, nil, nil, nil, 91, nil, nil, 735 24, nil, 94, 49, 50, 333, 148, 149, 331, 250, 736 nil, nil, nil, 31, 32, nil, 225, nil, nil, 219, 737 220, 221, 222, 223, 224, 226, 227, nil ] 800 nil, nil, nil, 119, 110, 116, 151, 120, nil, 7, 801 nil, nil, 150, 131, 121, 132, 133, 134, 135, 136, 802 137, 138, 139, 140, 141, 142, 143, nil, nil, 44, 803 191, 49, 5, 6, 8, 50, 87, 268, 58, 24, 804 59, 27, nil, nil, nil, nil, 200, nil, 222, nil, 805 29, nil, nil, 97, nil, nil, nil, 100, 52, 53, 806 376, nil, nil, 189, 190, 374, 297, nil, nil, 42, 807 43, nil, 154, 170, 153, 155, 156, 157, 158, 159, 808 160, 161, 162, nil, nil ] 738 809 739 810 racc_reduce_table = [ 740 811 0, 0, :racc_error, 741 1, 97, :_reduce_none, 742 1, 99, :_reduce_2, 743 1, 99, :_reduce_3, 744 1, 99, :_reduce_4, 745 1, 99, :_reduce_5, 746 1, 99, :_reduce_6, 747 1, 99, :_reduce_7, 748 1, 99, :_reduce_8, 749 3, 99, :_reduce_9, 750 1, 101, :_reduce_10, 751 2, 101, :_reduce_11, 752 1, 103, :_reduce_none, 753 4, 103, :_reduce_none, 754 5, 103, :_reduce_none, 755 4, 103, :_reduce_15, 756 3, 103, :_reduce_16, 757 3, 103, :_reduce_17, 758 2, 103, :_reduce_18, 759 2, 103, :_reduce_19, 760 0, 104, :_reduce_none, 812 1, 98, :_reduce_none, 813 1, 100, :_reduce_2, 814 1, 100, :_reduce_3, 815 1, 100, :_reduce_4, 816 1, 100, :_reduce_5, 817 1, 100, :_reduce_6, 818 1, 100, :_reduce_7, 819 1, 100, :_reduce_8, 820 3, 100, :_reduce_9, 821 1, 102, :_reduce_10, 822 2, 102, :_reduce_11, 761 823 1, 104, :_reduce_none, 824 4, 104, :_reduce_13, 762 825 3, 104, :_reduce_none, 763 1, 106, :_reduce_none, 764 2, 106, :_reduce_24, 765 2, 106, :_reduce_25, 766 4, 106, :_reduce_26, 767 2, 106, :_reduce_27, 768 2, 106, :_reduce_28, 769 1, 107, :_reduce_29, 770 1, 107, :_reduce_30, 771 1, 107, :_reduce_31, 772 1, 107, :_reduce_32, 773 1, 107, :_reduce_33, 774 1, 107, :_reduce_34, 775 1, 108, :_reduce_none, 776 4, 108, :_reduce_36, 826 4, 104, :_reduce_none, 827 5, 104, :_reduce_none, 828 3, 104, :_reduce_17, 829 3, 104, :_reduce_18, 830 2, 104, :_reduce_19, 831 2, 104, :_reduce_20, 832 6, 104, :_reduce_none, 833 7, 104, :_reduce_none, 834 1, 105, :_reduce_none, 835 3, 105, :_reduce_none, 777 836 1, 110, :_reduce_none, 778 3, 110, :_reduce_38, 779 3, 110, :_reduce_39, 780 3, 110, :_reduce_40, 781 1, 111, :_reduce_none, 782 3, 111, :_reduce_42, 783 3, 111, :_reduce_43, 837 2, 110, :_reduce_26, 838 2, 110, :_reduce_27, 839 4, 110, :_reduce_28, 840 2, 110, :_reduce_29, 841 2, 110, :_reduce_30, 842 1, 111, :_reduce_31, 843 1, 111, :_reduce_32, 844 1, 111, :_reduce_33, 845 1, 111, :_reduce_34, 846 1, 111, :_reduce_35, 847 1, 111, :_reduce_36, 784 848 1, 112, :_reduce_none, 785 3, 112, :_reduce_45, 786 3, 112, :_reduce_46, 849 4, 112, :_reduce_38, 787 850 1, 113, :_reduce_none, 788 3, 113, :_reduce_48, 789 3, 113, :_reduce_49, 790 3, 113, :_reduce_50, 791 3, 113, :_reduce_51, 851 3, 113, :_reduce_40, 852 3, 113, :_reduce_41, 853 3, 113, :_reduce_42, 792 854 1, 114, :_reduce_none, 793 3, 114, :_reduce_ 53,794 3, 114, :_reduce_ 54,855 3, 114, :_reduce_44, 856 3, 114, :_reduce_45, 795 857 1, 115, :_reduce_none, 796 3, 115, :_reduce_56, 858 3, 115, :_reduce_47, 859 3, 115, :_reduce_48, 797 860 1, 116, :_reduce_none, 798 3, 116, :_reduce_58, 861 3, 116, :_reduce_50, 862 3, 116, :_reduce_51, 863 3, 116, :_reduce_52, 864 3, 116, :_reduce_53, 799 865 1, 117, :_reduce_none, 800 3, 117, :_reduce_60, 866 3, 117, :_reduce_55, 867 3, 117, :_reduce_56, 801 868 1, 118, :_reduce_none, 802 3, 118, :_reduce_ 62,869 3, 118, :_reduce_58, 803 870 1, 119, :_reduce_none, 804 3, 119, :_reduce_6 4,871 3, 119, :_reduce_60, 805 872 1, 120, :_reduce_none, 806 5, 120, :_reduce_66,807 1, 1 02, :_reduce_67,808 1, 121, :_reduce_68,809 3, 122, :_reduce_none,810 1, 123, :_reduce_70,873 3, 120, :_reduce_62, 874 1, 121, :_reduce_none, 875 3, 121, :_reduce_64, 876 1, 122, :_reduce_none, 877 3, 122, :_reduce_66, 811 878 1, 123, :_reduce_none, 812 1, 123, :_reduce_72, 813 2, 123, :_reduce_73, 814 2, 123, :_reduce_74, 815 2, 123, :_reduce_75, 816 1, 124, :_reduce_76, 817 3, 124, :_reduce_77, 879 5, 123, :_reduce_68, 880 1, 109, :_reduce_none, 881 3, 109, :_reduce_none, 882 1, 124, :_reduce_none, 883 1, 124, :_reduce_none, 884 1, 124, :_reduce_none, 885 1, 124, :_reduce_none, 886 1, 124, :_reduce_none, 887 1, 124, :_reduce_none, 888 1, 124, :_reduce_none, 889 1, 124, :_reduce_none, 890 1, 124, :_reduce_none, 891 1, 124, :_reduce_none, 892 1, 124, :_reduce_none, 893 1, 103, :_reduce_82, 894 3, 103, :_reduce_83, 895 1, 125, :_reduce_84, 896 3, 126, :_reduce_none, 897 1, 127, :_reduce_86, 898 2, 127, :_reduce_87, 818 899 1, 127, :_reduce_none, 819 3, 127, :_reduce_79, 820 1, 126, :_reduce_80, 821 1, 126, :_reduce_81, 822 1, 126, :_reduce_82, 823 1, 126, :_reduce_83, 824 1, 126, :_reduce_84, 825 1, 126, :_reduce_85, 826 1, 126, :_reduce_86, 827 1, 126, :_reduce_87, 828 1, 126, :_reduce_88, 829 1, 126, :_reduce_89, 830 1, 126, :_reduce_90, 831 1, 126, :_reduce_91, 832 1, 126, :_reduce_92, 833 1, 126, :_reduce_93, 834 0, 135, :_reduce_94, 835 6, 130, :_reduce_95, 836 0, 136, :_reduce_96, 837 5, 130, :_reduce_97, 838 2, 130, :_reduce_98, 839 1, 134, :_reduce_none, 840 2, 134, :_reduce_none, 841 1, 133, :_reduce_101, 842 3, 137, :_reduce_102, 843 2, 137, :_reduce_none, 844 2, 137, :_reduce_none, 845 1, 139, :_reduce_none, 846 2, 139, :_reduce_106, 847 1, 139, :_reduce_107, 848 2, 139, :_reduce_108, 849 1, 138, :_reduce_109, 850 3, 138, :_reduce_110, 900 2, 127, :_reduce_89, 901 1, 127, :_reduce_90, 902 2, 127, :_reduce_91, 903 1, 127, :_reduce_none, 904 2, 127, :_reduce_none, 905 1, 128, :_reduce_94, 906 3, 128, :_reduce_95, 907 1, 132, :_reduce_none, 908 3, 132, :_reduce_97, 909 1, 129, :_reduce_none, 910 1, 129, :_reduce_none, 911 1, 129, :_reduce_none, 912 1, 129, :_reduce_none, 913 1, 130, :_reduce_102, 914 1, 130, :_reduce_103, 915 1, 130, :_reduce_104, 916 1, 130, :_reduce_105, 917 1, 130, :_reduce_106, 918 1, 130, :_reduce_107, 919 1, 130, :_reduce_108, 920 1, 130, :_reduce_109, 921 1, 130, :_reduce_110, 922 1, 130, :_reduce_111, 923 1, 130, :_reduce_112, 924 1, 130, :_reduce_113, 925 1, 130, :_reduce_114, 926 1, 130, :_reduce_115, 927 0, 141, :_reduce_116, 928 6, 135, :_reduce_117, 929 0, 142, :_reduce_118, 930 5, 135, :_reduce_119, 931 2, 135, :_reduce_120, 932 1, 138, :_reduce_121, 851 933 1, 140, :_reduce_none, 852 5, 131, :_reduce_none, 853 4, 131, :_reduce_none, 854 2, 131, :_reduce_none, 855 1, 142, :_reduce_none, 856 2, 142, :_reduce_none, 857 1, 141, :_reduce_none, 858 3, 143, :_reduce_none, 934 2, 140, :_reduce_none, 935 1, 139, :_reduce_124, 936 3, 143, :_reduce_125, 937 5, 143, :_reduce_126, 859 938 2, 143, :_reduce_none, 860 939 2, 143, :_reduce_none, 861 1, 144, :_reduce_none, 862 3, 144, :_reduce_none, 940 2, 145, :_reduce_129, 863 941 1, 145, :_reduce_none, 864 4, 132, :_reduce_none, 865 5, 132, :_reduce_none, 866 2, 132, :_reduce_none, 867 1, 146, :_reduce_127, 868 1, 147, :_reduce_none, 869 3, 147, :_reduce_none, 942 2, 145, :_reduce_131, 943 1, 145, :_reduce_132, 944 1, 144, :_reduce_133, 945 3, 144, :_reduce_134, 946 1, 146, :_reduce_none, 947 5, 136, :_reduce_none, 948 4, 136, :_reduce_none, 949 2, 136, :_reduce_none, 950 1, 147, :_reduce_139, 951 1, 149, :_reduce_none, 952 2, 149, :_reduce_none, 870 953 1, 148, :_reduce_none, 871 3, 148, :_reduce_none, 872 1, 105, :_reduce_132, 873 1, 105, :_reduce_133, 874 2, 128, :_reduce_134, 875 1, 128, :_reduce_none, 876 2, 128, :_reduce_136, 877 1, 150, :_reduce_137, 878 3, 150, :_reduce_138, 879 4, 150, :_reduce_139, 880 3, 150, :_reduce_140, 881 4, 150, :_reduce_141, 882 3, 150, :_reduce_142, 883 1, 149, :_reduce_143, 884 2, 149, :_reduce_144, 885 2, 149, :_reduce_145, 886 3, 149, :_reduce_146, 954 3, 150, :_reduce_none, 955 2, 150, :_reduce_none, 956 2, 150, :_reduce_none, 887 957 1, 151, :_reduce_none, 888 5, 151, :_reduce_none,958 3, 151, :_reduce_none, 889 959 1, 152, :_reduce_none, 960 2, 152, :_reduce_none, 890 961 3, 152, :_reduce_none, 891 2, 153, :_reduce_none, 892 2, 153, :_reduce_none, 962 4, 137, :_reduce_none, 963 5, 137, :_reduce_none, 964 5, 137, :_reduce_none, 965 6, 137, :_reduce_none, 966 2, 137, :_reduce_none, 967 5, 137, :_reduce_none, 968 6, 137, :_reduce_none, 969 2, 137, :_reduce_none, 893 970 1, 153, :_reduce_none, 894 1, 109, :_reduce_none, 895 2, 109, :_reduce_none, 971 3, 153, :_reduce_none, 896 972 1, 154, :_reduce_none, 897 1, 154, :_reduce_none, 898 2, 154, :_reduce_none, 899 3, 155, :_reduce_none, 900 2, 155, :_reduce_none, 901 3, 155, :_reduce_none, 902 3, 155, :_reduce_none, 903 4, 155, :_reduce_none, 904 2, 155, :_reduce_164, 905 3, 155, :_reduce_none, 906 3, 155, :_reduce_166, 907 4, 155, :_reduce_none, 908 1, 129, :_reduce_168, 909 3, 129, :_reduce_169, 910 4, 129, :_reduce_170, 911 4, 129, :_reduce_171, 912 1, 156, :_reduce_172, 913 3, 156, :_reduce_173, 914 0, 98, :_reduce_none, 915 2, 98, :_reduce_none, 973 3, 154, :_reduce_none, 974 1, 106, :_reduce_163, 975 1, 106, :_reduce_none, 976 1, 106, :_reduce_165, 977 1, 131, :_reduce_none, 978 1, 131, :_reduce_none, 979 1, 131, :_reduce_none, 980 1, 131, :_reduce_none, 981 2, 133, :_reduce_170, 982 1, 133, :_reduce_none, 983 2, 133, :_reduce_172, 984 1, 156, :_reduce_173, 985 3, 156, :_reduce_174, 986 4, 156, :_reduce_175, 987 3, 156, :_reduce_176, 988 4, 156, :_reduce_177, 989 4, 156, :_reduce_none, 990 3, 156, :_reduce_179, 991 1, 155, :_reduce_180, 992 2, 155, :_reduce_181, 993 2, 155, :_reduce_182, 994 3, 155, :_reduce_183, 995 1, 159, :_reduce_none, 996 2, 159, :_reduce_none, 916 997 1, 157, :_reduce_none, 917 2, 157, :_reduce_none, 998 5, 157, :_reduce_none, 999 1, 160, :_reduce_none, 1000 3, 160, :_reduce_none, 1001 2, 161, :_reduce_none, 1002 2, 161, :_reduce_none, 1003 1, 161, :_reduce_none, 918 1004 1, 158, :_reduce_none, 919 1, 158, :_reduce_none, 920 2, 158, :_reduce_none, 921 2, 158, :_reduce_none, 922 1, 158, :_reduce_none, 923 1, 158, :_reduce_none, 924 1, 158, :_reduce_none, 925 4, 159, :_reduce_185, 926 1, 161, :_reduce_186, 927 3, 161, :_reduce_187, 928 3, 160, :_reduce_none, 929 0, 163, :_reduce_none, 1005 3, 158, :_reduce_none, 1006 1, 107, :_reduce_none, 1007 2, 107, :_reduce_none, 1008 1, 162, :_reduce_none, 1009 1, 162, :_reduce_none, 1010 2, 162, :_reduce_none, 1011 3, 163, :_reduce_none, 930 1012 2, 163, :_reduce_none, 1013 3, 163, :_reduce_none, 1014 3, 163, :_reduce_none, 1015 4, 163, :_reduce_none, 1016 2, 163, :_reduce_205, 1017 3, 163, :_reduce_none, 1018 3, 163, :_reduce_207, 1019 4, 163, :_reduce_none, 1020 1, 134, :_reduce_209, 1021 3, 134, :_reduce_210, 1022 4, 134, :_reduce_211, 1023 4, 134, :_reduce_212, 1024 1, 108, :_reduce_213, 1025 3, 108, :_reduce_214, 1026 0, 99, :_reduce_none, 1027 2, 99, :_reduce_none, 931 1028 1, 164, :_reduce_none, 932 1, 164, :_reduce_none, 933 1, 164, :_reduce_none, 934 1, 164, :_reduce_none, 935 1, 164, :_reduce_none, 936 1, 164, :_reduce_none, 937 1, 164, :_reduce_none, 938 1, 164, :_reduce_none, 939 1, 164, :_reduce_none, 940 1, 164, :_reduce_none, 941 1, 164, :_reduce_none, 942 5, 165, :_reduce_none, 943 7, 165, :_reduce_none, 944 5, 166, :_reduce_none, 945 7, 167, :_reduce_none, 946 9, 168, :_reduce_none, 947 5, 169, :_reduce_none, 948 3, 170, :_reduce_none, 949 4, 170, :_reduce_none, 950 3, 170, :_reduce_none, 951 3, 162, :_reduce_none, 1029 2, 164, :_reduce_none, 1030 1, 165, :_reduce_none, 1031 1, 165, :_reduce_none, 1032 2, 165, :_reduce_none, 1033 2, 165, :_reduce_none, 1034 1, 165, :_reduce_none, 1035 1, 165, :_reduce_none, 1036 1, 165, :_reduce_none, 1037 4, 166, :_reduce_226, 1038 1, 168, :_reduce_227, 1039 3, 168, :_reduce_228, 1040 3, 167, :_reduce_none, 1041 1, 170, :_reduce_none, 1042 1, 170, :_reduce_none, 1043 1, 170, :_reduce_none, 1044 1, 170, :_reduce_none, 1045 1, 170, :_reduce_none, 1046 1, 170, :_reduce_none, 1047 1, 170, :_reduce_none, 1048 1, 170, :_reduce_none, 1049 1, 170, :_reduce_none, 1050 1, 170, :_reduce_none, 952 1051 3, 171, :_reduce_none, 953 2, 171, :_reduce_none, 954 2, 171, :_reduce_none, 1052 4, 171, :_reduce_none, 955 1053 3, 171, :_reduce_none, 956 2, 171, :_reduce_none, 1054 2, 169, :_reduce_none, 1055 3, 169, :_reduce_none, 1056 1, 180, :_reduce_none, 1057 2, 180, :_reduce_none, 1058 1, 181, :_reduce_none, 1059 1, 181, :_reduce_none, 1060 1, 172, :_reduce_none, 957 1061 2, 172, :_reduce_none, 958 4, 172, :_reduce_none, 959 1, 173, :_reduce_none, 960 1, 173, :_reduce_none, 961 1, 173, :_reduce_none, 962 1, 173, :_reduce_none, 963 1, 173, :_reduce_none, 964 1, 173, :_reduce_none, 965 1, 173, :_reduce_none, 966 1, 173, :_reduce_none, 967 1, 173, :_reduce_none, 968 1, 173, :_reduce_none, 969 1, 173, :_reduce_none, 970 1, 125, :_reduce_none, 971 1, 125, :_reduce_none, 972 1, 125, :_reduce_none, 973 1, 125, :_reduce_none, 974 1, 125, :_reduce_none, 975 1, 125, :_reduce_none, 976 1, 125, :_reduce_none, 977 1, 125, :_reduce_none, 978 1, 100, :_reduce_238, 979 2, 100, :_reduce_239, 980 3, 100, :_reduce_240 ] 981 982 racc_reduce_n = 241 983 984 racc_shift_n = 398 1062 5, 173, :_reduce_none, 1063 7, 173, :_reduce_none, 1064 5, 177, :_reduce_none, 1065 5, 174, :_reduce_none, 1066 7, 175, :_reduce_none, 1067 6, 176, :_reduce_none, 1068 7, 176, :_reduce_none, 1069 6, 176, :_reduce_none, 1070 7, 176, :_reduce_none, 1071 3, 178, :_reduce_none, 1072 2, 178, :_reduce_none, 1073 2, 178, :_reduce_none, 1074 2, 178, :_reduce_none, 1075 3, 178, :_reduce_none, 1076 1, 101, :_reduce_265, 1077 2, 101, :_reduce_266, 1078 3, 101, :_reduce_267, 1079 1, 179, :_reduce_268 ] 1080 1081 racc_reduce_n = 269 1082 1083 racc_shift_n = 447 985 1084 986 1085 racc_token_table = { … … 1002 1101 "++" => 15, 1003 1102 "--" => 16, 1004 "," => 17, 1005 :SIZEOF => 18, 1006 "&" => 19, 1007 "*" => 20, 1008 "+" => 21, 1009 "-" => 22, 1010 "~" => 23, 1011 "!" => 24, 1012 "/" => 25, 1013 "%" => 26, 1014 "<<" => 27, 1015 ">>" => 28, 1016 "<" => 29, 1017 ">" => 30, 1018 "<=" => 31, 1019 ">=" => 32, 1020 "==" => 33, 1021 "!=" => 34, 1022 "^" => 35, 1023 "|" => 36, 1024 "&&" => 37, 1025 "||" => 38, 1026 "?" => 39, 1027 ":" => 40, 1028 ";" => 41, 1029 "=" => 42, 1030 :VOID => 43, 1031 :FLOAT => 44, 1032 :DOUBLE => 45, 1033 :BOOL => 46, 1034 :TYPE_NAME => 47, 1035 :CHAR => 48, 1036 :SHORT => 49, 1037 :INT => 50, 1038 :LONG => 51, 1039 :SIGNED => 52, 1040 :UNSIGNED => 53, 1041 :STRUCT => 54, 1042 "{" => 55, 1043 "}" => 56, 1044 :UNION => 57, 1045 :ENUM => 58, 1046 :CONST => 59, 1047 :VOLATILE => 60, 1048 :C_EXP => 61, 1049 :EXTENSION => 62, 1050 :TYPEDEF => 63, 1051 :IF => 64, 1052 :ELSE => 65, 1053 :WHILE => 66, 1054 :DO => 67, 1055 :FOR => 68, 1056 :SWITCH => 69, 1057 :infunc_statment => 70, 1058 :CASE => 71, 1059 :DEFAULT => 72, 1060 :GOTO => 73, 1061 :CONTINUE => 74, 1062 :BREAK => 75, 1063 :RETURN => 76, 1064 "+=" => 77, 1065 "-=" => 78, 1066 "*=" => 79, 1067 "/=" => 80, 1068 "%=" => 81, 1069 "<<=" => 82, 1070 ">>=" => 83, 1071 "&=" => 84, 1072 "|=" => 85, 1073 "^=" => 86, 1074 :__INLINE__ => 87, 1075 :INLINE => 88, 1076 :__INLINE => 89, 1077 :CINLINE => 90, 1078 :EXTERN => 91, 1079 :STATIC => 92, 1080 :AUTO => 93, 1081 :REGISTER => 94, 1082 "::" => 95 } 1083 1084 racc_nt_base = 96 1103 "{" => 17, 1104 "}" => 18, 1105 "," => 19, 1106 :SIZEOF => 20, 1107 "&" => 21, 1108 "*" => 22, 1109 "+" => 23, 1110 "-" => 24, 1111 "~" => 25, 1112 "!" => 26, 1113 "/" => 27, 1114 "%" => 28, 1115 "<<" => 29, 1116 ">>" => 30, 1117 "<" => 31, 1118 ">" => 32, 1119 "<=" => 33, 1120 ">=" => 34, 1121 "==" => 35, 1122 "!=" => 36, 1123 "^" => 37, 1124 "|" => 38, 1125 "&&" => 39, 1126 "||" => 40, 1127 "?" => 41, 1128 ":" => 42, 1129 "=" => 43, 1130 "+=" => 44, 1131 "-=" => 45, 1132 "*=" => 46, 1133 "/=" => 47, 1134 "%=" => 48, 1135 "<<=" => 49, 1136 ">>=" => 50, 1137 "&=" => 51, 1138 "|=" => 52, 1139 "^=" => 53, 1140 ";" => 54, 1141 :EXTERN => 55, 1142 :STATIC => 56, 1143 :AUTO => 57, 1144 :REGISTER => 58, 1145 :VOID => 59, 1146 :CHAR => 60, 1147 :SHORT => 61, 1148 :INT => 62, 1149 :LONG => 63, 1150 :FLOAT => 64, 1151 :DOUBLE => 65, 1152 :SIGNED => 66, 1153 :UNSIGNED => 67, 1154 :BOOL => 68, 1155 :TYPE_NAME => 69, 1156 :STRUCT => 70, 1157 :UNION => 71, 1158 :ENUM => 72, 1159 :CONST => 73, 1160 :RESTRICT => 74, 1161 :VOLATILE => 75, 1162 :__INLINE__ => 76, 1163 :INLINE => 77, 1164 :__INLINE => 78, 1165 :CINLINE => 79, 1166 :C_EXP => 80, 1167 :EXTENSION => 81, 1168 :TYPEDEF => 82, 1169 :CASE => 83, 1170 :DEFAULT => 84, 1171 :IF => 85, 1172 :ELSE => 86, 1173 :SWITCH => 87, 1174 :WHILE => 88, 1175 :DO => 89, 1176 :FOR => 90, 1177 :GOTO => 91, 1178 :CONTINUE => 92, 1179 :BREAK => 93, 1180 :RETURN => 94, 1181 "::" => 95, 1182 :_ASM => 96 } 1183 1184 racc_nt_base = 97 1085 1185 1086 1186 racc_use_result_var = true … … 1120 1220 "\"++\"", 1121 1221 "\"--\"", 1222 "\"{\"", 1223 "\"}\"", 1122 1224 "\",\"", 1123 1225 "SIZEOF", … … 1144 1246 "\"?\"", 1145 1247 "\":\"", 1146 "\";\"",1147 1248 "\"=\"", 1148 "VOID",1149 "FLOAT",1150 "DOUBLE",1151 "BOOL",1152 "TYPE_NAME",1153 "CHAR",1154 "SHORT",1155 "INT",1156 "LONG",1157 "SIGNED",1158 "UNSIGNED",1159 "STRUCT",1160 "\"{\"",1161 "\"}\"",1162 "UNION",1163 "ENUM",1164 "CONST",1165 "VOLATILE",1166 "C_EXP",1167 "EXTENSION",1168 "TYPEDEF",1169 "IF",1170 "ELSE",1171 "WHILE",1172 "DO",1173 "FOR",1174 "SWITCH",1175 "infunc_statment",1176 "CASE",1177 "DEFAULT",1178 "GOTO",1179 "CONTINUE",1180 "BREAK",1181 "RETURN",1182 1249 "\"+=\"", 1183 1250 "\"-=\"", … … 1190 1257 "\"|=\"", 1191 1258 "\"^=\"", 1259 "\";\"", 1260 "EXTERN", 1261 "STATIC", 1262 "AUTO", 1263 "REGISTER", 1264 "VOID", 1265 "CHAR", 1266 "SHORT", 1267 "INT", 1268 "LONG", 1269 "FLOAT", 1270 "DOUBLE", 1271 "SIGNED", 1272 "UNSIGNED", 1273 "BOOL", 1274 "TYPE_NAME", 1275 "STRUCT", 1276 "UNION", 1277 "ENUM", 1278 "CONST", 1279 "RESTRICT", 1280 "VOLATILE", 1192 1281 "__INLINE__", 1193 1282 "INLINE", 1194 1283 "__INLINE", 1195 1284 "CINLINE", 1196 "EXTERN", 1197 "STATIC", 1198 "AUTO", 1199 "REGISTER", 1285 "C_EXP", 1286 "EXTENSION", 1287 "TYPEDEF", 1288 "CASE", 1289 "DEFAULT", 1290 "IF", 1291 "ELSE", 1292 "SWITCH", 1293 "WHILE", 1294 "DO", 1295 "FOR", 1296 "GOTO", 1297 "CONTINUE", 1298 "BREAK", 1299 "RETURN", 1200 1300 "\"::\"", 1301 "_ASM", 1201 1302 "$start", 1202 1303 "all", … … 1207 1308 "expression", 1208 1309 "postfix_expression", 1209 "argument_ list",1310 "argument_expression_list", 1210 1311 "type_qualifier", 1312 "type_name", 1313 "initializer_list", 1314 "assignment_expression", 1211 1315 "unary_expression", 1212 1316 "unary_operator", 1213 1317 "cast_expression", 1214 "type_name",1215 1318 "multiplicative_expression", 1216 1319 "additive_expression", … … 1224 1327 "logical_or_expression", 1225 1328 "conditional_expression", 1329 "assignment_operator", 1226 1330 "constant_expression", 1227 1331 "declaration", 1228 1332 "declaration_specifiers", 1229 1333 "init_declarator_list", 1230 "storage_class ",1334 "storage_class_specifier", 1231 1335 "type_specifier", 1336 "function_specifier", 1232 1337 "init_declarator", 1233 1338 "declarator", … … 1236 1341 "union_specifier", 1237 1342 "enum_specifier", 1343 "struct_term", 1238 1344 "struct_tag", 1239 1345 "struct_declaration_list", … … 1242 1348 "struct_declaration", 1243 1349 "struct_declarator_list", 1244 " type_specifier_qualifier_list",1350 "specifier_qualifier_list", 1245 1351 "struct_declarator", 1352 "union_term", 1246 1353 "union_tag", 1247 1354 "union_declaration_list", … … 1249 1356 "union_declarator_list", 1250 1357 "union_declarator", 1251 "enum_type",1252 1358 "enumerator_list", 1253 1359 "enumerator", … … 1255 1361 "direct_declarator", 1256 1362 "parameter_type_list", 1363 "identifier_list", 1364 "type_qualifier_list", 1257 1365 "parameter_list", 1258 1366 "parameter_declaration", 1259 1367 "abstract_declarator", 1260 1368 "direct_abstract_declarator", 1261 "initializer_list",1262 1369 "extension_statement", 1263 " statement",1370 "cdl_statement", 1264 1371 "typedef", 1265 1372 "func_def", 1266 1373 "declarator_list", 1267 "compoundstatement", 1268 "infunc_statement_list", 1269 "infunc_statement", 1374 "compound_statement", 1375 "statement", 1376 "labeled_statement", 1377 "expression_statement", 1270 1378 "ifstatement", 1271 1379 "whilestatement", … … 1273 1381 "forstatement", 1274 1382 "switchstatement", 1275 " labelstatement",1276 " gotostatement",1277 " expressionstatement",1278 " assignment_operator" ]1383 "jump_statement", 1384 "asm_statement", 1385 "block_item_list", 1386 "block_item" ] 1279 1387 1280 1388 Racc_debug_parser = false … … 1286 1394 # reduce 1 omitted 1287 1395 1288 module_eval(<<'.,.,', 'C_parser.y.rb', 5 2)1396 module_eval(<<'.,.,', 'C_parser.y.rb', 57) 1289 1397 def _reduce_2(val, _values, result) 1290 1398 result = [ :IDENTIFIER, val[0] ] … … 1293 1401 .,., 1294 1402 1295 module_eval(<<'.,.,', 'C_parser.y.rb', 6 0)1403 module_eval(<<'.,.,', 'C_parser.y.rb', 65) 1296 1404 def _reduce_3(val, _values, result) 1297 1405 result = [ :INTEGER_CONSTANT, val[0] ] … … 1300 1408 .,., 1301 1409 1302 module_eval(<<'.,.,', 'C_parser.y.rb', 6 2)1410 module_eval(<<'.,.,', 'C_parser.y.rb', 67) 1303 1411 def _reduce_4(val, _values, result) 1304 1412 result = [ :FLOATING_CONSTANT, val[0] ] … … 1307 1415 .,., 1308 1416 1309 module_eval(<<'.,.,', 'C_parser.y.rb', 6 4)1417 module_eval(<<'.,.,', 'C_parser.y.rb', 69) 1310 1418 def _reduce_5(val, _values, result) 1311 1419 result = [ :OCTAL_CONSTANT, val[0] ] … … 1314 1422 .,., 1315 1423 1316 module_eval(<<'.,.,', 'C_parser.y.rb', 66)1424 module_eval(<<'.,.,', 'C_parser.y.rb', 71) 1317 1425 def _reduce_6(val, _values, result) 1318 1426 result = [ :HEX_CONSTANT, val[0] ] … … 1321 1429 .,., 1322 1430 1323 module_eval(<<'.,.,', 'C_parser.y.rb', 68)1431 module_eval(<<'.,.,', 'C_parser.y.rb', 73) 1324 1432 def _reduce_7(val, _values, result) 1325 1433 result = [ :CHARACTER_LITERAL, val[0] ] … … 1328 1436 .,., 1329 1437 1330 module_eval(<<'.,.,', 'C_parser.y.rb', 7 0)1438 module_eval(<<'.,.,', 'C_parser.y.rb', 75) 1331 1439 def _reduce_8(val, _values, result) 1332 1440 result = [ :STRING_LITERAL_LIST, val[0] ] … … 1335 1443 .,., 1336 1444 1337 module_eval(<<'.,.,', 'C_parser.y.rb', 7 2)1445 module_eval(<<'.,.,', 'C_parser.y.rb', 77) 1338 1446 def _reduce_9(val, _values, result) 1339 1447 result = [ :PARENTHESES, val[1].get_elements ] … … 1342 1450 .,., 1343 1451 1344 module_eval(<<'.,.,', 'C_parser.y.rb', 76)1452 module_eval(<<'.,.,', 'C_parser.y.rb', 81) 1345 1453 def _reduce_10(val, _values, result) 1346 1454 result = [val[0]] … … 1349 1457 .,., 1350 1458 1351 module_eval(<<'.,.,', 'C_parser.y.rb', 78)1459 module_eval(<<'.,.,', 'C_parser.y.rb', 83) 1352 1460 def _reduce_11(val, _values, result) 1353 1461 result << val[1] … … 1358 1466 # reduce 12 omitted 1359 1467 1360 # reduce 13 omitted 1468 module_eval(<<'.,.,', 'C_parser.y.rb', 89) 1469 def _reduce_13(val, _values, result) 1470 result = [ :OP_SUBSC, val[0], val[2] ] 1471 result 1472 end 1473 .,., 1361 1474 1362 1475 # reduce 14 omitted 1363 1476 1364 module_eval(<<'.,.,', 'C_parser.y.rb', 86) 1365 def _reduce_15(val, _values, result) 1366 result = [ :OP_SUBSC, val[0], val[2] ] 1367 result 1368 end 1369 .,., 1370 1371 module_eval(<<'.,.,', 'C_parser.y.rb', 88) 1372 def _reduce_16(val, _values, result) 1477 # reduce 15 omitted 1478 1479 # reduce 16 omitted 1480 1481 module_eval(<<'.,.,', 'C_parser.y.rb', 94) 1482 def _reduce_17(val, _values, result) 1373 1483 result = [ :OP_DOT, val[0], val[2] ] 1374 1484 result … … 1376 1486 .,., 1377 1487 1378 module_eval(<<'.,.,', 'C_parser.y.rb', 9 0)1379 def _reduce_1 7(val, _values, result)1488 module_eval(<<'.,.,', 'C_parser.y.rb', 96) 1489 def _reduce_18(val, _values, result) 1380 1490 result = [ :OP_REF, val[0], val[2] ] 1381 1491 result … … 1383 1493 .,., 1384 1494 1385 module_eval(<<'.,.,', 'C_parser.y.rb', 91) 1386 def _reduce_18(val, _values, result) 1387 result = val[0] 1388 result 1389 end 1390 .,., 1391 1392 module_eval(<<'.,.,', 'C_parser.y.rb', 92) 1495 module_eval(<<'.,.,', 'C_parser.y.rb', 97) 1393 1496 def _reduce_19(val, _values, result) 1394 1497 result = val[0] … … 1397 1500 .,., 1398 1501 1399 # reduce 20 omitted 1502 module_eval(<<'.,.,', 'C_parser.y.rb', 98) 1503 def _reduce_20(val, _values, result) 1504 result = val[0] 1505 result 1506 end 1507 .,., 1400 1508 1401 1509 # reduce 21 omitted … … 1405 1513 # reduce 23 omitted 1406 1514 1407 module_eval(<<'.,.,', 'C_parser.y.rb', 104) 1408 def _reduce_24(val, _values, result) 1515 # reduce 24 omitted 1516 1517 # reduce 25 omitted 1518 1519 module_eval(<<'.,.,', 'C_parser.y.rb', 111) 1520 def _reduce_26(val, _values, result) 1409 1521 result = [ val[0], val[1] ] 1410 1522 result … … 1412 1524 .,., 1413 1525 1414 module_eval(<<'.,.,', 'C_parser.y.rb', 1 06)1415 def _reduce_2 5(val, _values, result)1526 module_eval(<<'.,.,', 'C_parser.y.rb', 113) 1527 def _reduce_27(val, _values, result) 1416 1528 result = [ :OP_SIZEOF_EXPR, val[1] ] 1417 1529 result … … 1419 1531 .,., 1420 1532 1421 module_eval(<<'.,.,', 'C_parser.y.rb', 1 08)1422 def _reduce_2 6(val, _values, result)1533 module_eval(<<'.,.,', 'C_parser.y.rb', 115) 1534 def _reduce_28(val, _values, result) 1423 1535 result = [ :OP_SIZEOF_TYPE, val[1] ] 1424 1536 result … … 1426 1538 .,., 1427 1539 1428 module_eval(<<'.,.,', 'C_parser.y.rb', 1 09)1429 def _reduce_2 7(val, _values, result)1540 module_eval(<<'.,.,', 'C_parser.y.rb', 116) 1541 def _reduce_29(val, _values, result) 1430 1542 result = val[1] 1431 1543 result … … 1433 1545 .,., 1434 1546 1435 module_eval(<<'.,.,', 'C_parser.y.rb', 11 0)1436 def _reduce_ 28(val, _values, result)1547 module_eval(<<'.,.,', 'C_parser.y.rb', 117) 1548 def _reduce_30(val, _values, result) 1437 1549 result = val[1] 1438 1550 result … … 1440 1552 .,., 1441 1553 1442 module_eval(<<'.,.,', 'C_parser.y.rb', 1 13)1443 def _reduce_ 29(val, _values, result)1554 module_eval(<<'.,.,', 'C_parser.y.rb', 120) 1555 def _reduce_31(val, _values, result) 1444 1556 result = :OP_U_AMP 1445 1557 result … … 1447 1559 .,., 1448 1560 1449 module_eval(<<'.,.,', 'C_parser.y.rb', 1 14)1450 def _reduce_3 0(val, _values, result)1561 module_eval(<<'.,.,', 'C_parser.y.rb', 121) 1562 def _reduce_32(val, _values, result) 1451 1563 result = :OP_U_ASTER 1452 1564 result … … 1454 1566 .,., 1455 1567 1456 module_eval(<<'.,.,', 'C_parser.y.rb', 1 15)1457 def _reduce_3 1(val, _values, result)1568 module_eval(<<'.,.,', 'C_parser.y.rb', 122) 1569 def _reduce_33(val, _values, result) 1458 1570 result = :OP_U_PLUS 1459 1571 result … … 1461 1573 .,., 1462 1574 1463 module_eval(<<'.,.,', 'C_parser.y.rb', 1 16)1464 def _reduce_3 2(val, _values, result)1575 module_eval(<<'.,.,', 'C_parser.y.rb', 123) 1576 def _reduce_34(val, _values, result) 1465 1577 result = :OP_U_MINUS 1466 1578 result … … 1468 1580 .,., 1469 1581 1470 module_eval(<<'.,.,', 'C_parser.y.rb', 1 17)1471 def _reduce_3 3(val, _values, result)1582 module_eval(<<'.,.,', 'C_parser.y.rb', 124) 1583 def _reduce_35(val, _values, result) 1472 1584 result = :OP_U_TILDE 1473 1585 result … … 1475 1587 .,., 1476 1588 1477 module_eval(<<'.,.,', 'C_parser.y.rb', 1 18)1478 def _reduce_3 4(val, _values, result)1589 module_eval(<<'.,.,', 'C_parser.y.rb', 125) 1590 def _reduce_36(val, _values, result) 1479 1591 result = :OP_U_EXCLAM 1480 1592 result … … 1482 1594 .,., 1483 1595 1484 # reduce 3 5omitted1485 1486 module_eval(<<'.,.,', 'C_parser.y.rb', 1 23)1487 def _reduce_3 6(val, _values, result)1596 # reduce 37 omitted 1597 1598 module_eval(<<'.,.,', 'C_parser.y.rb', 130) 1599 def _reduce_38(val, _values, result) 1488 1600 result = [ :CAST, val[1], val[3] ] 1489 1601 result … … 1491 1603 .,., 1492 1604 1493 # reduce 3 7omitted1494 1495 module_eval(<<'.,.,', 'C_parser.y.rb', 1 28)1496 def _reduce_ 38(val, _values, result)1605 # reduce 39 omitted 1606 1607 module_eval(<<'.,.,', 'C_parser.y.rb', 135) 1608 def _reduce_40(val, _values, result) 1497 1609 result = [ :OP_MULT, val[0], val[2] ] 1498 1610 result … … 1500 1612 .,., 1501 1613 1502 module_eval(<<'.,.,', 'C_parser.y.rb', 13 0)1503 def _reduce_ 39(val, _values, result)1614 module_eval(<<'.,.,', 'C_parser.y.rb', 137) 1615 def _reduce_41(val, _values, result) 1504 1616 result = [ :OP_DIV, val[0], val[2] ] 1505 1617 result … … 1507 1619 .,., 1508 1620 1509 module_eval(<<'.,.,', 'C_parser.y.rb', 13 2)1510 def _reduce_4 0(val, _values, result)1621 module_eval(<<'.,.,', 'C_parser.y.rb', 139) 1622 def _reduce_42(val, _values, result) 1511 1623 result = [ :OP_REMAIN, val[0], val[2] ] 1512 1624 result … … 1514 1626 .,., 1515 1627 1516 # reduce 4 1omitted1517 1518 module_eval(<<'.,.,', 'C_parser.y.rb', 1 37)1519 def _reduce_4 2(val, _values, result)1628 # reduce 43 omitted 1629 1630 module_eval(<<'.,.,', 'C_parser.y.rb', 144) 1631 def _reduce_44(val, _values, result) 1520 1632 result = [ :OP_ADD, val[0], val[2] ] 1521 1633 result … … 1523 1635 .,., 1524 1636 1525 module_eval(<<'.,.,', 'C_parser.y.rb', 1 39)1526 def _reduce_4 3(val, _values, result)1637 module_eval(<<'.,.,', 'C_parser.y.rb', 146) 1638 def _reduce_45(val, _values, result) 1527 1639 result = [ :OP_SUB, val[0], val[2] ] 1528 1640 result … … 1530 1642 .,., 1531 1643 1532 # reduce 4 4omitted1533 1534 module_eval(<<'.,.,', 'C_parser.y.rb', 1 44)1535 def _reduce_4 5(val, _values, result)1644 # reduce 46 omitted 1645 1646 module_eval(<<'.,.,', 'C_parser.y.rb', 151) 1647 def _reduce_47(val, _values, result) 1536 1648 result = [ :OP_LSFT, val[0], val[2] ] 1537 1649 result … … 1539 1651 .,., 1540 1652 1541 module_eval(<<'.,.,', 'C_parser.y.rb', 1 46)1542 def _reduce_4 6(val, _values, result)1653 module_eval(<<'.,.,', 'C_parser.y.rb', 153) 1654 def _reduce_48(val, _values, result) 1543 1655 result = [ :OP_RSFT, val[0], val[2] ] 1544 1656 result … … 1546 1658 .,., 1547 1659 1548 # reduce 4 7omitted1549 1550 module_eval(<<'.,.,', 'C_parser.y.rb', 15 1)1551 def _reduce_ 48(val, _values, result)1660 # reduce 49 omitted 1661 1662 module_eval(<<'.,.,', 'C_parser.y.rb', 158) 1663 def _reduce_50(val, _values, result) 1552 1664 result = [ :OP_LT, val[0], val[2] ] 1553 1665 result … … 1555 1667 .,., 1556 1668 1557 module_eval(<<'.,.,', 'C_parser.y.rb', 1 53)1558 def _reduce_ 49(val, _values, result)1669 module_eval(<<'.,.,', 'C_parser.y.rb', 160) 1670 def _reduce_51(val, _values, result) 1559 1671 result = [ :OP_GT, val[0], val[2] ] 1560 1672 result … … 1562 1674 .,., 1563 1675 1564 module_eval(<<'.,.,', 'C_parser.y.rb', 1 55)1565 def _reduce_5 0(val, _values, result)1676 module_eval(<<'.,.,', 'C_parser.y.rb', 162) 1677 def _reduce_52(val, _values, result) 1566 1678 result = [ :OP_LE, val[0], val[2] ] 1567 1679 result … … 1569 1681 .,., 1570 1682 1571 module_eval(<<'.,.,', 'C_parser.y.rb', 1 57)1572 def _reduce_5 1(val, _values, result)1683 module_eval(<<'.,.,', 'C_parser.y.rb', 164) 1684 def _reduce_53(val, _values, result) 1573 1685 result = [ :OP_GE, val[0], val[2] ] 1574 1686 result … … 1576 1688 .,., 1577 1689 1578 # reduce 5 2omitted1579 1580 module_eval(<<'.,.,', 'C_parser.y.rb', 16 2)1581 def _reduce_5 3(val, _values, result)1690 # reduce 54 omitted 1691 1692 module_eval(<<'.,.,', 'C_parser.y.rb', 169) 1693 def _reduce_55(val, _values, result) 1582 1694 result = [ :OP_EQ, val[0], val[2] ] 1583 1695 result … … 1585 1697 .,., 1586 1698 1587 module_eval(<<'.,.,', 'C_parser.y.rb', 1 64)1588 def _reduce_5 4(val, _values, result)1699 module_eval(<<'.,.,', 'C_parser.y.rb', 171) 1700 def _reduce_56(val, _values, result) 1589 1701 result = [ :OP_NE, val[0], val[2] ] 1590 1702 result … … 1592 1704 .,., 1593 1705 1594 # reduce 5 5omitted1595 1596 module_eval(<<'.,.,', 'C_parser.y.rb', 1 69)1597 def _reduce_5 6(val, _values, result)1706 # reduce 57 omitted 1707 1708 module_eval(<<'.,.,', 'C_parser.y.rb', 176) 1709 def _reduce_58(val, _values, result) 1598 1710 result = [ :OP_AND, val[0], val[2] ] 1599 1711 result … … 1601 1713 .,., 1602 1714 1603 # reduce 5 7omitted1604 1605 module_eval(<<'.,.,', 'C_parser.y.rb', 1 74)1606 def _reduce_ 58(val, _values, result)1715 # reduce 59 omitted 1716 1717 module_eval(<<'.,.,', 'C_parser.y.rb', 181) 1718 def _reduce_60(val, _values, result) 1607 1719 result = [ :OP_EOR, val[0], val[2] ] 1608 1720 result … … 1610 1722 .,., 1611 1723 1612 # reduce 59omitted1613 1614 module_eval(<<'.,.,', 'C_parser.y.rb', 1 79)1615 def _reduce_6 0(val, _values, result)1724 # reduce 61 omitted 1725 1726 module_eval(<<'.,.,', 'C_parser.y.rb', 186) 1727 def _reduce_62(val, _values, result) 1616 1728 result = [ :OP_OR, val[0], val[2] ] 1617 1729 result … … 1619 1731 .,., 1620 1732 1621 # reduce 6 1omitted1622 1623 module_eval(<<'.,.,', 'C_parser.y.rb', 1 84)1624 def _reduce_6 2(val, _values, result)1733 # reduce 63 omitted 1734 1735 module_eval(<<'.,.,', 'C_parser.y.rb', 191) 1736 def _reduce_64(val, _values, result) 1625 1737 result = [ :OP_LAND, val[0], val[2] ] 1626 1738 result … … 1628 1740 .,., 1629 1741 1630 # reduce 6 3omitted1631 1632 module_eval(<<'.,.,', 'C_parser.y.rb', 1 89)1633 def _reduce_6 4(val, _values, result)1742 # reduce 65 omitted 1743 1744 module_eval(<<'.,.,', 'C_parser.y.rb', 196) 1745 def _reduce_66(val, _values, result) 1634 1746 result = [ :OP_LOR, val[0], val[2] ] 1635 1747 result … … 1637 1749 .,., 1638 1750 1639 # reduce 6 5omitted1640 1641 module_eval(<<'.,.,', 'C_parser.y.rb', 194)1642 def _reduce_6 6(val, _values, result)1751 # reduce 67 omitted 1752 1753 module_eval(<<'.,.,', 'C_parser.y.rb', 201) 1754 def _reduce_68(val, _values, result) 1643 1755 result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ] 1644 1756 result … … 1646 1758 .,., 1647 1759 1648 module_eval(<<'.,.,', 'C_parser.y.rb', 201) 1649 def _reduce_67(val, _values, result) 1760 # reduce 69 omitted 1761 1762 # reduce 70 omitted 1763 1764 # reduce 71 omitted 1765 1766 # reduce 72 omitted 1767 1768 # reduce 73 omitted 1769 1770 # reduce 74 omitted 1771 1772 # reduce 75 omitted 1773 1774 # reduce 76 omitted 1775 1776 # reduce 77 omitted 1777 1778 # reduce 78 omitted 1779 1780 # reduce 79 omitted 1781 1782 # reduce 80 omitted 1783 1784 # reduce 81 omitted 1785 1786 module_eval(<<'.,.,', 'C_parser.y.rb', 223) 1787 def _reduce_82(val, _values, result) 1650 1788 result = Expression.new( val[0] ) 1651 1789 # result.print … … 1655 1793 .,., 1656 1794 1657 module_eval(<<'.,.,', 'C_parser.y.rb', 208) 1658 def _reduce_68(val, _values, result) 1795 module_eval(<<'.,.,', 'C_parser.y.rb', 228) 1796 def _reduce_83(val, _values, result) 1797 result = Expression.new( val[2] ) # ',' の後ろを採用 1798 1799 result 1800 end 1801 .,., 1802 1803 module_eval(<<'.,.,', 'C_parser.y.rb', 234) 1804 def _reduce_84(val, _values, result) 1659 1805 result = Expression.new( val[0] ) 1660 1806 # result.print … … 1671 1817 .,., 1672 1818 1673 # reduce 69omitted1674 1675 module_eval(<<'.,.,', 'C_parser.y.rb', 2 37)1676 def _reduce_ 70(val, _values, result)1819 # reduce 85 omitted 1820 1821 module_eval(<<'.,.,', 'C_parser.y.rb', 261) 1822 def _reduce_86(val, _values, result) 1677 1823 result = CIntType.new( -3 ) # storage class は無視 1678 1824 … … 1681 1827 .,., 1682 1828 1683 # reduce 71 omitted 1684 1685 module_eval(<<'.,.,', 'C_parser.y.rb', 242) 1686 def _reduce_72(val, _values, result) 1829 module_eval(<<'.,.,', 'C_parser.y.rb', 265) 1830 def _reduce_87(val, _values, result) 1831 result = val[1] # storage class は無視 1832 1833 result 1834 end 1835 .,., 1836 1837 # reduce 88 omitted 1838 1839 module_eval(<<'.,.,', 'C_parser.y.rb', 270) 1840 def _reduce_89(val, _values, result) 1841 result = val[1].merge val[0] 1842 1843 result 1844 end 1845 .,., 1846 1847 module_eval(<<'.,.,', 'C_parser.y.rb', 274) 1848 def _reduce_90(val, _values, result) 1687 1849 result = CIntType.new( -3 ) 1688 1850 result.set_qualifier val[0] … … 1692 1854 .,., 1693 1855 1694 module_eval(<<'.,.,', 'C_parser.y.rb', 247) 1695 def _reduce_73(val, _values, result) 1696 result = val[1] # storage class は無視 1697 1698 result 1699 end 1700 .,., 1701 1702 module_eval(<<'.,.,', 'C_parser.y.rb', 251) 1703 def _reduce_74(val, _values, result) 1704 result = val[1].merge val[0] 1705 1706 result 1707 end 1708 .,., 1709 1710 module_eval(<<'.,.,', 'C_parser.y.rb', 255) 1711 def _reduce_75(val, _values, result) 1856 module_eval(<<'.,.,', 'C_parser.y.rb', 279) 1857 def _reduce_91(val, _values, result) 1712 1858 val[1].set_qualifier val[0] 1713 result = val[1] 1714 1715 result 1716 end 1717 .,., 1718 1719 module_eval(<<'.,.,', 'C_parser.y.rb', 262) 1720 def _reduce_76(val, _values, result) 1859 result = val[1] 1860 1861 result 1862 end 1863 .,., 1864 1865 # reduce 92 omitted 1866 1867 # reduce 93 omitted 1868 1869 module_eval(<<'.,.,', 'C_parser.y.rb', 287) 1870 def _reduce_94(val, _values, result) 1721 1871 result = [val[0]] 1722 1872 result … … 1724 1874 .,., 1725 1875 1726 module_eval(<<'.,.,', 'C_parser.y.rb', 2 64)1727 def _reduce_ 77(val, _values, result)1876 module_eval(<<'.,.,', 'C_parser.y.rb', 289) 1877 def _reduce_95(val, _values, result) 1728 1878 result << val[2] 1729 1879 result … … 1731 1881 .,., 1732 1882 1733 # reduce 78omitted1734 1735 module_eval(<<'.,.,', 'C_parser.y.rb', 2 69)1736 def _reduce_ 79(val, _values, result)1883 # reduce 96 omitted 1884 1885 module_eval(<<'.,.,', 'C_parser.y.rb', 294) 1886 def _reduce_97(val, _values, result) 1737 1887 val[0].set_initializer( val[2] ) 1738 1888 result … … 1740 1890 .,., 1741 1891 1742 module_eval(<<'.,.,', 'C_parser.y.rb', 272) 1743 def _reduce_80(val, _values, result) 1892 # reduce 98 omitted 1893 1894 # reduce 99 omitted 1895 1896 # reduce 100 omitted 1897 1898 # reduce 101 omitted 1899 1900 module_eval(<<'.,.,', 'C_parser.y.rb', 304) 1901 def _reduce_102(val, _values, result) 1744 1902 set_no_type_name true; result = CVoidType.new 1745 1903 result … … 1747 1905 .,., 1748 1906 1749 module_eval(<<'.,.,', 'C_parser.y.rb', 273) 1750 def _reduce_81(val, _values, result) 1907 module_eval(<<'.,.,', 'C_parser.y.rb', 306) 1908 def _reduce_103(val, _values, result) 1909 set_no_type_name true; result = CIntType.new(-11 ) 1910 result 1911 end 1912 .,., 1913 1914 module_eval(<<'.,.,', 'C_parser.y.rb', 308) 1915 def _reduce_104(val, _values, result) 1916 set_no_type_name true; result = CIntType.new( -2 ) 1917 result 1918 end 1919 .,., 1920 1921 module_eval(<<'.,.,', 'C_parser.y.rb', 310) 1922 def _reduce_105(val, _values, result) 1923 set_no_type_name true; result = CIntType.new( -3 ) 1924 result 1925 end 1926 .,., 1927 1928 module_eval(<<'.,.,', 'C_parser.y.rb', 312) 1929 def _reduce_106(val, _values, result) 1930 set_no_type_name true; result = CIntType.new( -4 ) 1931 result 1932 end 1933 .,., 1934 1935 module_eval(<<'.,.,', 'C_parser.y.rb', 314) 1936 def _reduce_107(val, _values, result) 1751 1937 set_no_type_name true; result = CFloatType.new(-32) 1752 1938 result … … 1754 1940 .,., 1755 1941 1756 module_eval(<<'.,.,', 'C_parser.y.rb', 274)1757 def _reduce_ 82(val, _values, result)1942 module_eval(<<'.,.,', 'C_parser.y.rb', 316) 1943 def _reduce_108(val, _values, result) 1758 1944 set_no_type_name true; result = CFloatType.new(-64) 1759 1945 result … … 1761 1947 .,., 1762 1948 1763 module_eval(<<'.,.,', 'C_parser.y.rb', 275) 1764 def _reduce_83(val, _values, result) 1765 set_no_type_name true; result = CBoolType.new 1766 result 1767 end 1768 .,., 1769 1770 module_eval(<<'.,.,', 'C_parser.y.rb', 276) 1771 def _reduce_84(val, _values, result) 1772 set_no_type_name true; result = val[0] 1773 result 1774 end 1775 .,., 1776 1777 module_eval(<<'.,.,', 'C_parser.y.rb', 277) 1778 def _reduce_85(val, _values, result) 1779 set_no_type_name true; result = CVoidType.new 1780 result 1781 end 1782 .,., 1783 1784 module_eval(<<'.,.,', 'C_parser.y.rb', 278) 1785 def _reduce_86(val, _values, result) 1786 set_no_type_name true; result = CVoidType.new 1787 result 1788 end 1789 .,., 1790 1791 module_eval(<<'.,.,', 'C_parser.y.rb', 279) 1792 def _reduce_87(val, _values, result) 1793 set_no_type_name true; result = CDefinedType.new( val[0].val ) 1794 result 1795 end 1796 .,., 1797 1798 module_eval(<<'.,.,', 'C_parser.y.rb', 281) 1799 def _reduce_88(val, _values, result) 1800 set_no_type_name true; result = CIntType.new(-11 ) 1801 result 1802 end 1803 .,., 1804 1805 module_eval(<<'.,.,', 'C_parser.y.rb', 282) 1806 def _reduce_89(val, _values, result) 1807 set_no_type_name true; result = CIntType.new( -2 ) 1808 result 1809 end 1810 .,., 1811 1812 module_eval(<<'.,.,', 'C_parser.y.rb', 283) 1813 def _reduce_90(val, _values, result) 1814 set_no_type_name true; result = CIntType.new( -3 ) 1815 result 1816 end 1817 .,., 1818 1819 module_eval(<<'.,.,', 'C_parser.y.rb', 284) 1820 def _reduce_91(val, _values, result) 1821 set_no_type_name true; result = CIntType.new( -4 ) 1822 result 1823 end 1824 .,., 1825 1826 module_eval(<<'.,.,', 'C_parser.y.rb', 287) 1827 def _reduce_92(val, _values, result) 1949 module_eval(<<'.,.,', 'C_parser.y.rb', 319) 1950 def _reduce_109(val, _values, result) 1828 1951 set_no_type_name true 1829 1952 result = CIntType.new( -3 ) … … 1834 1957 .,., 1835 1958 1836 module_eval(<<'.,.,', 'C_parser.y.rb', 293)1837 def _reduce_ 93(val, _values, result)1959 module_eval(<<'.,.,', 'C_parser.y.rb', 325) 1960 def _reduce_110(val, _values, result) 1838 1961 set_no_type_name true 1839 1962 result = CIntType.new( -3 ) … … 1844 1967 .,., 1845 1968 1846 module_eval(<<'.,.,', 'C_parser.y.rb', 301) 1847 def _reduce_94(val, _values, result) 1969 module_eval(<<'.,.,', 'C_parser.y.rb', 330) 1970 def _reduce_111(val, _values, result) 1971 set_no_type_name true; result = CBoolType.new 1972 result 1973 end 1974 .,., 1975 1976 module_eval(<<'.,.,', 'C_parser.y.rb', 332) 1977 def _reduce_112(val, _values, result) 1978 set_no_type_name true; result = val[0] 1979 result 1980 end 1981 .,., 1982 1983 module_eval(<<'.,.,', 'C_parser.y.rb', 334) 1984 def _reduce_113(val, _values, result) 1985 set_no_type_name true; result = CVoidType.new 1986 result 1987 end 1988 .,., 1989 1990 module_eval(<<'.,.,', 'C_parser.y.rb', 336) 1991 def _reduce_114(val, _values, result) 1992 set_no_type_name true; result = CVoidType.new 1993 result 1994 end 1995 .,., 1996 1997 module_eval(<<'.,.,', 'C_parser.y.rb', 338) 1998 def _reduce_115(val, _values, result) 1999 set_no_type_name true; result = CDefinedType.new( val[0].val ) 2000 result 2001 end 2002 .,., 2003 2004 module_eval(<<'.,.,', 'C_parser.y.rb', 344) 2005 def _reduce_116(val, _values, result) 1848 2006 StructType.set_define( true ) 1849 2007 result … … 1851 2009 .,., 1852 2010 1853 module_eval(<<'.,.,', 'C_parser.y.rb', 3 04)1854 def _reduce_ 95(val, _values, result)2011 module_eval(<<'.,.,', 'C_parser.y.rb', 347) 2012 def _reduce_117(val, _values, result) 1855 2013 StructType.end_of_parse 1856 2014 result = val[1] … … 1860 2018 .,., 1861 2019 1862 module_eval(<<'.,.,', 'C_parser.y.rb', 3 09)1863 def _reduce_ 96(val, _values, result)2020 module_eval(<<'.,.,', 'C_parser.y.rb', 353) 2021 def _reduce_118(val, _values, result) 1864 2022 result = CStructType.new() 1865 2023 StructType.set_define( true ) … … 1869 2027 .,., 1870 2028 1871 module_eval(<<'.,.,', 'C_parser.y.rb', 3 14)1872 def _reduce_ 97(val, _values, result)2029 module_eval(<<'.,.,', 'C_parser.y.rb', 358) 2030 def _reduce_119(val, _values, result) 1873 2031 StructType.end_of_parse 1874 2032 result = val[1] … … 1878 2036 .,., 1879 2037 1880 module_eval(<<'.,.,', 'C_parser.y.rb', 3 19)1881 def _reduce_ 98(val, _values, result)2038 module_eval(<<'.,.,', 'C_parser.y.rb', 364) 2039 def _reduce_120(val, _values, result) 1882 2040 StructType.set_define( false ) 1883 2041 StructType.end_of_parse … … 1888 2046 .,., 1889 2047 1890 # reduce 99 omitted 1891 1892 # reduce 100 omitted 1893 1894 module_eval(<<'.,.,', 'C_parser.y.rb', 331) 1895 def _reduce_101(val, _values, result) 2048 module_eval(<<'.,.,', 'C_parser.y.rb', 370) 2049 def _reduce_121(val, _values, result) 2050 set_no_type_name true 2051 result 2052 end 2053 .,., 2054 2055 # reduce 122 omitted 2056 2057 # reduce 123 omitted 2058 2059 module_eval(<<'.,.,', 'C_parser.y.rb', 379) 2060 def _reduce_124(val, _values, result) 1896 2061 result = CStructType.new( val[0].val ) 1897 2062 set_no_type_name true … … 1901 2066 .,., 1902 2067 1903 module_eval(<<'.,.,', 'C_parser.y.rb', 3 40)1904 def _reduce_1 02(val, _values, result)2068 module_eval(<<'.,.,', 'C_parser.y.rb', 388) 2069 def _reduce_125(val, _values, result) 1905 2070 val[1].each { |i| # i: Decl 1906 2071 i.set_type( val[0] ) … … 1915 2080 .,., 1916 2081 1917 # reduce 103 omitted 1918 1919 # reduce 104 omitted 1920 1921 # reduce 105 omitted 1922 1923 module_eval(<<'.,.,', 'C_parser.y.rb', 359) 1924 def _reduce_106(val, _values, result) 2082 module_eval(<<'.,.,', 'C_parser.y.rb', 399) 2083 def _reduce_126(val, _values, result) 2084 val[1].each { |i| # i: Decl 2085 i.set_type( val[0] ) 2086 i.set_kind( :MEMBER ) 2087 i.check 2088 CStructType.new_member( i ) 2089 } 2090 result = val[1] 2091 2092 result 2093 end 2094 .,., 2095 2096 # reduce 127 omitted 2097 2098 # reduce 128 omitted 2099 2100 module_eval(<<'.,.,', 'C_parser.y.rb', 417) 2101 def _reduce_129(val, _values, result) 1925 2102 result = val[1].merge val[0] 1926 2103 … … 1929 2106 .,., 1930 2107 1931 module_eval(<<'.,.,', 'C_parser.y.rb', 363) 1932 def _reduce_107(val, _values, result) 2108 # reduce 130 omitted 2109 2110 module_eval(<<'.,.,', 'C_parser.y.rb', 422) 2111 def _reduce_131(val, _values, result) 2112 val[1].set_qualifier val[0] 2113 result = val[1] 2114 2115 result 2116 end 2117 .,., 2118 2119 module_eval(<<'.,.,', 'C_parser.y.rb', 427) 2120 def _reduce_132(val, _values, result) 1933 2121 result = CIntType.new( -3 ) 1934 2122 result.set_qualifier val[0] … … 1938 2126 .,., 1939 2127 1940 module_eval(<<'.,.,', 'C_parser.y.rb', 368) 1941 def _reduce_108(val, _values, result) 1942 val[1].set_qualifier val[0] 1943 result = val[1] 1944 1945 result 1946 end 1947 .,., 1948 1949 module_eval(<<'.,.,', 'C_parser.y.rb', 374) 1950 def _reduce_109(val, _values, result) 2128 module_eval(<<'.,.,', 'C_parser.y.rb', 433) 2129 def _reduce_133(val, _values, result) 1951 2130 result = [ val[0] ] 1952 2131 result … … 1954 2133 .,., 1955 2134 1956 module_eval(<<'.,.,', 'C_parser.y.rb', 376)1957 def _reduce_1 10(val, _values, result)2135 module_eval(<<'.,.,', 'C_parser.y.rb', 435) 2136 def _reduce_134(val, _values, result) 1958 2137 result << val[2] 1959 2138 result … … 1961 2140 .,., 1962 2141 1963 # reduce 111 omitted 1964 1965 # reduce 112 omitted 1966 1967 # reduce 113 omitted 1968 1969 # reduce 114 omitted 1970 1971 # reduce 115 omitted 1972 1973 # reduce 116 omitted 1974 1975 # reduce 117 omitted 1976 1977 # reduce 118 omitted 1978 1979 # reduce 119 omitted 1980 1981 # reduce 120 omitted 1982 1983 # reduce 121 omitted 1984 1985 # reduce 122 omitted 1986 1987 # reduce 123 omitted 1988 1989 # reduce 124 omitted 1990 1991 # reduce 125 omitted 1992 1993 # reduce 126 omitted 1994 1995 module_eval(<<'.,.,', 'C_parser.y.rb', 418) 1996 def _reduce_127(val, _values, result) 1997 result = CEnumType.new( -1 ) 1998 result 1999 end 2000 .,., 2001 2002 # reduce 128 omitted 2003 2004 # reduce 129 omitted 2005 2006 # reduce 130 omitted 2007 2008 # reduce 131 omitted 2009 2010 module_eval(<<'.,.,', 'C_parser.y.rb', 434) 2011 def _reduce_132(val, _values, result) 2142 # reduce 135 omitted 2143 2144 # reduce 136 omitted 2145 2146 # reduce 137 omitted 2147 2148 # reduce 138 omitted 2149 2150 module_eval(<<'.,.,', 'C_parser.y.rb', 452) 2151 def _reduce_139(val, _values, result) 2152 set_no_type_name true 2153 result 2154 end 2155 .,., 2156 2157 # reduce 140 omitted 2158 2159 # reduce 141 omitted 2160 2161 # reduce 142 omitted 2162 2163 # reduce 143 omitted 2164 2165 # reduce 144 omitted 2166 2167 # reduce 145 omitted 2168 2169 # reduce 146 omitted 2170 2171 # reduce 147 omitted 2172 2173 # reduce 148 omitted 2174 2175 # reduce 149 omitted 2176 2177 # reduce 150 omitted 2178 2179 # reduce 151 omitted 2180 2181 # reduce 152 omitted 2182 2183 # reduce 153 omitted 2184 2185 # reduce 154 omitted 2186 2187 # reduce 155 omitted 2188 2189 # reduce 156 omitted 2190 2191 # reduce 157 omitted 2192 2193 # reduce 158 omitted 2194 2195 # reduce 159 omitted 2196 2197 # reduce 160 omitted 2198 2199 # reduce 161 omitted 2200 2201 # reduce 162 omitted 2202 2203 module_eval(<<'.,.,', 'C_parser.y.rb', 495) 2204 def _reduce_163(val, _values, result) 2012 2205 result = :CONST 2013 2206 result … … 2015 2208 .,., 2016 2209 2017 module_eval(<<'.,.,', 'C_parser.y.rb', 435) 2018 def _reduce_133(val, _values, result) 2210 # reduce 164 omitted 2211 2212 module_eval(<<'.,.,', 'C_parser.y.rb', 498) 2213 def _reduce_165(val, _values, result) 2019 2214 result = :VOLATILE 2020 2215 result … … 2022 2217 .,., 2023 2218 2024 module_eval(<<'.,.,', 'C_parser.y.rb', 440) 2025 def _reduce_134(val, _values, result) 2219 # reduce 166 omitted 2220 2221 # reduce 167 omitted 2222 2223 # reduce 168 omitted 2224 2225 # reduce 169 omitted 2226 2227 module_eval(<<'.,.,', 'C_parser.y.rb', 509) 2228 def _reduce_170(val, _values, result) 2026 2229 val[1].set_type( val[0] ) 2027 2230 result = val[1] … … 2031 2234 .,., 2032 2235 2033 # reduce 1 35omitted2034 2035 module_eval(<<'.,.,', 'C_parser.y.rb', 446)2036 def _reduce_1 36(val, _values, result)2236 # reduce 171 omitted 2237 2238 module_eval(<<'.,.,', 'C_parser.y.rb', 515) 2239 def _reduce_172(val, _values, result) 2037 2240 result = Decl.new( val[1].val ) 2038 2241 result.set_type( val[0] ) … … 2042 2245 .,., 2043 2246 2044 module_eval(<<'.,.,', 'C_parser.y.rb', 452)2045 def _reduce_1 37(val, _values, result)2247 module_eval(<<'.,.,', 'C_parser.y.rb', 521) 2248 def _reduce_173(val, _values, result) 2046 2249 result = Decl.new( val[0].val ) 2047 2250 result … … 2049 2252 .,., 2050 2253 2051 module_eval(<<'.,.,', 'C_parser.y.rb', 454)2052 def _reduce_1 38(val, _values, result)2254 module_eval(<<'.,.,', 'C_parser.y.rb', 523) 2255 def _reduce_174(val, _values, result) 2053 2256 result = val[1] 2054 2257 result … … 2056 2259 .,., 2057 2260 2058 module_eval(<<'.,.,', 'C_parser.y.rb', 457)2059 def _reduce_1 39(val, _values, result)2261 module_eval(<<'.,.,', 'C_parser.y.rb', 526) 2262 def _reduce_175(val, _values, result) 2060 2263 val[0].set_type( CArrayType.new( val[2] ) ) 2061 2264 result = val[0] … … 2065 2268 .,., 2066 2269 2067 module_eval(<<'.,.,', 'C_parser.y.rb', 462)2068 def _reduce_1 40(val, _values, result)2270 module_eval(<<'.,.,', 'C_parser.y.rb', 531) 2271 def _reduce_176(val, _values, result) 2069 2272 val[0].set_type( CArrayType.new ) 2070 2273 result = val[0] … … 2074 2277 .,., 2075 2278 2076 module_eval(<<'.,.,', 'C_parser.y.rb', 467)2077 def _reduce_1 41(val, _values, result)2279 module_eval(<<'.,.,', 'C_parser.y.rb', 536) 2280 def _reduce_177(val, _values, result) 2078 2281 # Generator.warning( "W6001 need 'void' for no parameter" ) 2079 2282 val[0].set_type( CFuncType.new ) … … 2084 2287 .,., 2085 2288 2086 module_eval(<<'.,.,', 'C_parser.y.rb', 475) 2087 def _reduce_142(val, _values, result) 2289 # reduce 178 omitted 2290 2291 module_eval(<<'.,.,', 'C_parser.y.rb', 543) 2292 def _reduce_179(val, _values, result) 2088 2293 # Generator.warning( "W6002 need 'void' for no parameter" ) 2089 2294 val[0].set_type( CFuncType.new ) … … 2094 2299 .,., 2095 2300 2096 module_eval(<<'.,.,', 'C_parser.y.rb', 482)2097 def _reduce_1 43(val, _values, result)2301 module_eval(<<'.,.,', 'C_parser.y.rb', 550) 2302 def _reduce_180(val, _values, result) 2098 2303 result = CPtrType.new 2099 2304 result … … 2101 2306 .,., 2102 2307 2103 module_eval(<<'.,.,', 'C_parser.y.rb', 485)2104 def _reduce_1 44(val, _values, result)2308 module_eval(<<'.,.,', 'C_parser.y.rb', 553) 2309 def _reduce_181(val, _values, result) 2105 2310 result = CPtrType.new 2106 2311 result.set_qualifier( val[1] ) … … 2110 2315 .,., 2111 2316 2112 module_eval(<<'.,.,', 'C_parser.y.rb', 490)2113 def _reduce_1 45(val, _values, result)2317 module_eval(<<'.,.,', 'C_parser.y.rb', 558) 2318 def _reduce_182(val, _values, result) 2114 2319 val[1].set_type(CPtrType.new) 2115 2320 result = val[1] … … 2119 2324 .,., 2120 2325 2121 module_eval(<<'.,.,', 'C_parser.y.rb', 495)2122 def _reduce_1 46(val, _values, result)2326 module_eval(<<'.,.,', 'C_parser.y.rb', 563) 2327 def _reduce_183(val, _values, result) 2123 2328 ptrtype = CPtrType.new 2124 2329 ptrtype.set_qualifier( val[1] ) … … 2130 2335 .,., 2131 2336 2132 # reduce 147 omitted 2133 2134 # reduce 148 omitted 2135 2136 # reduce 149 omitted 2137 2138 # reduce 150 omitted 2139 2140 # reduce 151 omitted 2141 2142 # reduce 152 omitted 2143 2144 # reduce 153 omitted 2145 2146 # reduce 154 omitted 2147 2148 # reduce 155 omitted 2149 2150 # reduce 156 omitted 2151 2152 # reduce 157 omitted 2153 2154 # reduce 158 omitted 2155 2156 # reduce 159 omitted 2157 2158 # reduce 160 omitted 2159 2160 # reduce 161 omitted 2161 2162 # reduce 162 omitted 2163 2164 # reduce 163 omitted 2165 2166 module_eval(<<'.,.,', 'C_parser.y.rb', 559) 2167 def _reduce_164(val, _values, result) 2337 # reduce 184 omitted 2338 2339 # reduce 185 omitted 2340 2341 # reduce 186 omitted 2342 2343 # reduce 187 omitted 2344 2345 # reduce 188 omitted 2346 2347 # reduce 189 omitted 2348 2349 # reduce 190 omitted 2350 2351 # reduce 191 omitted 2352 2353 # reduce 192 omitted 2354 2355 # reduce 193 omitted 2356 2357 # reduce 194 omitted 2358 2359 # reduce 195 omitted 2360 2361 # reduce 196 omitted 2362 2363 # reduce 197 omitted 2364 2365 # reduce 198 omitted 2366 2367 # reduce 199 omitted 2368 2369 # reduce 200 omitted 2370 2371 # reduce 201 omitted 2372 2373 # reduce 202 omitted 2374 2375 # reduce 203 omitted 2376 2377 # reduce 204 omitted 2378 2379 module_eval(<<'.,.,', 'C_parser.y.rb', 630) 2380 def _reduce_205(val, _values, result) 2168 2381 Generator.warning( "W6003 need 'void' for no parameter" ) 2169 2382 … … 2172 2385 .,., 2173 2386 2174 # reduce 165omitted2175 2176 module_eval(<<'.,.,', 'C_parser.y.rb', 564)2177 def _reduce_ 166(val, _values, result)2387 # reduce 206 omitted 2388 2389 module_eval(<<'.,.,', 'C_parser.y.rb', 635) 2390 def _reduce_207(val, _values, result) 2178 2391 Generator.warning( "W6004 need 'void' for no parameter" ) 2179 2392 … … 2182 2395 .,., 2183 2396 2184 # reduce 167omitted2185 2186 module_eval(<<'.,.,', 'C_parser.y.rb', 571)2187 def _reduce_ 168(val, _values, result)2397 # reduce 208 omitted 2398 2399 module_eval(<<'.,.,', 'C_parser.y.rb', 642) 2400 def _reduce_209(val, _values, result) 2188 2401 result = val[0] 2189 2402 result … … 2191 2404 .,., 2192 2405 2193 module_eval(<<'.,.,', 'C_parser.y.rb', 573)2194 def _reduce_ 169(val, _values, result)2406 module_eval(<<'.,.,', 'C_parser.y.rb', 644) 2407 def _reduce_210(val, _values, result) 2195 2408 result = val[1] 2196 2409 result … … 2198 2411 .,., 2199 2412 2200 module_eval(<<'.,.,', 'C_parser.y.rb', 575)2201 def _reduce_ 170(val, _values, result)2413 module_eval(<<'.,.,', 'C_parser.y.rb', 646) 2414 def _reduce_211(val, _values, result) 2202 2415 result = val[1] 2203 2416 result … … 2205 2418 .,., 2206 2419 2207 module_eval(<<'.,.,', 'C_parser.y.rb', 577)2208 def _reduce_ 171(val, _values, result)2420 module_eval(<<'.,.,', 'C_parser.y.rb', 648) 2421 def _reduce_212(val, _values, result) 2209 2422 result = C_EXP.new( val[2] ) 2210 2423 result … … 2212 2425 .,., 2213 2426 2214 module_eval(<<'.,.,', 'C_parser.y.rb', 582)2215 def _reduce_ 172(val, _values, result)2427 module_eval(<<'.,.,', 'C_parser.y.rb', 653) 2428 def _reduce_213(val, _values, result) 2216 2429 result = [ val[0] ] 2217 2430 … … 2220 2433 .,., 2221 2434 2222 module_eval(<<'.,.,', 'C_parser.y.rb', 586)2223 def _reduce_ 173(val, _values, result)2435 module_eval(<<'.,.,', 'C_parser.y.rb', 657) 2436 def _reduce_214(val, _values, result) 2224 2437 val[0] << val[2] 2225 2438 result = val[0] … … 2229 2442 .,., 2230 2443 2231 # reduce 174omitted2232 2233 # reduce 175omitted2234 2235 # reduce 176omitted2236 2237 # reduce 177omitted2238 2239 # reduce 178omitted2240 2241 # reduce 179omitted2242 2243 # reduce 180omitted2244 2245 # reduce 181omitted2246 2247 # reduce 182omitted2248 2249 # reduce 183omitted2250 2251 # reduce 184omitted2252 2253 module_eval(<<'.,.,', 'C_parser.y.rb', 6 14)2254 def _reduce_ 185(val, _values, result)2444 # reduce 215 omitted 2445 2446 # reduce 216 omitted 2447 2448 # reduce 217 omitted 2449 2450 # reduce 218 omitted 2451 2452 # reduce 219 omitted 2453 2454 # reduce 220 omitted 2455 2456 # reduce 221 omitted 2457 2458 # reduce 222 omitted 2459 2460 # reduce 223 omitted 2461 2462 # reduce 224 omitted 2463 2464 # reduce 225 omitted 2465 2466 module_eval(<<'.,.,', 'C_parser.y.rb', 685) 2467 def _reduce_226(val, _values, result) 2255 2468 val[2].each{ |i| 2256 2469 i.set_kind( :TYPEDEF ) … … 2263 2476 .,., 2264 2477 2265 module_eval(<<'.,.,', 'C_parser.y.rb', 6 23)2266 def _reduce_ 186(val, _values, result)2478 module_eval(<<'.,.,', 'C_parser.y.rb', 694) 2479 def _reduce_227(val, _values, result) 2267 2480 result = [ val[0] ] 2268 2481 result … … 2270 2483 .,., 2271 2484 2272 module_eval(<<'.,.,', 'C_parser.y.rb', 6 25)2273 def _reduce_ 187(val, _values, result)2485 module_eval(<<'.,.,', 'C_parser.y.rb', 696) 2486 def _reduce_228(val, _values, result) 2274 2487 result << val[2] 2275 2488 result … … 2277 2490 .,., 2278 2491 2279 # reduce 188 omitted2280 2281 # reduce 189 omitted2282 2283 # reduce 190 omitted2284 2285 # reduce 191 omitted2286 2287 # reduce 192 omitted2288 2289 # reduce 193 omitted2290 2291 # reduce 194 omitted2292 2293 # reduce 195 omitted2294 2295 # reduce 196 omitted2296 2297 # reduce 197 omitted2298 2299 # reduce 198 omitted2300 2301 # reduce 199 omitted2302 2303 # reduce 200 omitted2304 2305 # reduce 201 omitted2306 2307 # reduce 202 omitted2308 2309 # reduce 203 omitted2310 2311 # reduce 204 omitted2312 2313 # reduce 205 omitted2314 2315 # reduce 206 omitted2316 2317 # reduce 207 omitted2318 2319 # reduce 208 omitted2320 2321 # reduce 209 omitted2322 2323 # reduce 210 omitted2324 2325 # reduce 211 omitted2326 2327 # reduce 212 omitted2328 2329 # reduce 213 omitted2330 2331 # reduce 214 omitted2332 2333 # reduce 215 omitted2334 2335 # reduce 216 omitted2336 2337 # reduce 217 omitted2338 2339 # reduce 218 omitted2340 2341 # reduce 219 omitted2342 2343 # reduce 220 omitted2344 2345 # reduce 221 omitted2346 2347 # reduce 222 omitted2348 2349 # reduce 223 omitted2350 2351 # reduce 224 omitted2352 2353 # reduce 225 omitted2354 2355 # reduce 226 omitted2356 2357 # reduce 227 omitted2358 2359 # reduce 228 omitted2360 2361 2492 # reduce 229 omitted 2362 2493 … … 2377 2508 # reduce 237 omitted 2378 2509 2379 module_eval(<<'.,.,', 'C_parser.y.rb', 706) 2380 def _reduce_238(val, _values, result) 2510 # reduce 238 omitted 2511 2512 # reduce 239 omitted 2513 2514 # reduce 240 omitted 2515 2516 # reduce 241 omitted 2517 2518 # reduce 242 omitted 2519 2520 # reduce 243 omitted 2521 2522 # reduce 244 omitted 2523 2524 # reduce 245 omitted 2525 2526 # reduce 246 omitted 2527 2528 # reduce 247 omitted 2529 2530 # reduce 248 omitted 2531 2532 # reduce 249 omitted 2533 2534 # reduce 250 omitted 2535 2536 # reduce 251 omitted 2537 2538 # reduce 252 omitted 2539 2540 # reduce 253 omitted 2541 2542 # reduce 254 omitted 2543 2544 # reduce 255 omitted 2545 2546 # reduce 256 omitted 2547 2548 # reduce 257 omitted 2549 2550 # reduce 258 omitted 2551 2552 # reduce 259 omitted 2553 2554 # reduce 260 omitted 2555 2556 # reduce 261 omitted 2557 2558 # reduce 262 omitted 2559 2560 # reduce 263 omitted 2561 2562 # reduce 264 omitted 2563 2564 module_eval(<<'.,.,', 'C_parser.y.rb', 761) 2565 def _reduce_265(val, _values, result) 2381 2566 result = NamespacePath.new( val[0].val, false ) 2382 2567 result … … 2384 2569 .,., 2385 2570 2386 module_eval(<<'.,.,', 'C_parser.y.rb', 7 07)2387 def _reduce_2 39(val, _values, result)2571 module_eval(<<'.,.,', 'C_parser.y.rb', 762) 2572 def _reduce_266(val, _values, result) 2388 2573 result = NamespacePath.new( val[1].val, true ) 2389 2574 result … … 2391 2576 .,., 2392 2577 2393 module_eval(<<'.,.,', 'C_parser.y.rb', 7 09)2394 def _reduce_2 40(val, _values, result)2578 module_eval(<<'.,.,', 'C_parser.y.rb', 764) 2579 def _reduce_267(val, _values, result) 2395 2580 result = val[0].append!( val[2].val ) 2581 result 2582 end 2583 .,., 2584 2585 module_eval(<<'.,.,', 'C_parser.y.rb', 768) 2586 def _reduce_268(val, _values, result) 2587 while true 2588 # ';' が表れるまで、トークンを読み飛ばす。 2589 # gcc の構文拡張に対応すべきだが、単純な実装として、';' まで読み飛ばす。 2590 # トークン単位で読み飛ばしているので、文字列やコメント内の ';' は対象にならない。 2591 token = next_token 2592 if token[1].val == ";" 2593 break 2594 end 2595 # p "skip: #{token[1].val}" 2596 end 2597 2396 2598 result 2397 2599 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.y.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 # 上記著作権者は,以下の(1) ~(4)の条件を満たす場合に限り,本ソフトウェ8 # 上記著作権者は,以下の(1)〜(4)の条件を満たす場合に限り,本ソフトウェ 9 9 # ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 10 10 # 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. … … 35 35 # の責任を負わない. 36 36 # 37 # $Id $37 # $Id: C_parser.y.rb 2810 2018-03-11 13:20:03Z okuma-top $ 38 38 #++ 39 39 … … 48 48 # argument_expression_list(関数引数), assignment_expression(代入)がない 49 49 # 式の result は、すべて配列で第一要素が識別シンボル、第二要素以下が引数 50 # 51 # 2019/3/28 長島 下記のC99の構文に近づくよう変更 52 #(読めないヘッダーファイルがあったため) 53 # http://www.quut.com/c/ANSI-C-grammar-y-1999.html 54 # 元々のコメントと合わなくなっています 50 55 51 56 primary_expression 52 57 : namespace_identifier 53 58 { result = [ :IDENTIFIER, val[0] ] } #1ok 54 59 # : IDENTIFIER # mikan namespace への対応 … … 58 63 # | FALSE 59 64 # { result = [ :BOOL_CONSTANT, false ] } 60 65 | INTEGER_CONSTANT 61 66 { result = [ :INTEGER_CONSTANT, val[0] ] } 62 67 | FLOATING_CONSTANT 63 68 { result = [ :FLOATING_CONSTANT, val[0] ] } 64 69 | OCTAL_CONSTANT 65 70 { result = [ :OCTAL_CONSTANT, val[0] ] } 66 71 | HEX_CONSTANT 67 72 { result = [ :HEX_CONSTANT, val[0] ] } 68 73 | CHARACTER_LITERAL 69 74 { result = [ :CHARACTER_LITERAL, val[0] ] } 70 75 | string_literal_list 71 76 { result = [ :STRING_LITERAL_LIST, val[0] ] } 72 77 | '(' expression ')' 73 78 { result = [ :PARENTHESES, val[1].get_elements ] } 74 79 75 80 string_literal_list 76 81 : STRING_LITERAL 77 82 { result = [val[0]] } 78 83 | string_literal_list STRING_LITERAL 79 84 { result << val[1] } 80 85 81 86 # 関数呼び出しと後置インクリメント、デクリメント演算子がない 82 87 postfix_expression 83 : primary_expression 84 | primary_expression '(' argument_list ')' 85 | primary_expression type_qualifier '(' argument_list ')' # intended __asm volatile ( " MNEMONIC OPERAND" ); 86 | postfix_expression '[' expression ']' 88 : primary_expression 89 | postfix_expression '[' expression ']' 87 90 { result = [ :OP_SUBSC, val[0], val[2] ] } 88 | postfix_expression '.' IDENTIFIER 91 | postfix_expression '(' ')' 92 | postfix_expression '(' argument_expression_list ')' 93 | postfix_expression type_qualifier '(' argument_expression_list ')' # intended __asm volatile ( " MNEMONIC OPERAND" ); 94 | postfix_expression '.' IDENTIFIER 89 95 { result = [ :OP_DOT, val[0], val[2] ] } 90 96 | postfix_expression '->' IDENTIFIER 91 97 { result = [ :OP_REF, val[0], val[2] ] } 92 | postfix_expression '++' { result = val[0] } # ++, -- は無視する 93 | postfix_expression '--' { result = val[0] } 94 95 argument_list 96 : 97 | expression 98 | argument_list ',' expression 98 | postfix_expression '++' { result = val[0] } # ++, -- は無視する 99 | postfix_expression '--' { result = val[0] } 100 | '(' type_name ')' '{' initializer_list '}' 101 | '(' type_name ')' '{' initializer_list ',' '}' 102 103 argument_expression_list 104 : assignment_expression 105 | argument_expression_list ',' assignment_expression 99 106 100 107 101 108 # 前置インクリメント、デクリメント演算子がない 102 109 unary_expression 103 104 110 : postfix_expression 111 | unary_operator cast_expression 105 112 { result = [ val[0], val[1] ] } 106 113 | SIZEOF unary_expression 107 114 { result = [ :OP_SIZEOF_EXPR, val[1] ] } 108 115 | SIZEOF '(' type_name ')' 109 116 { result = [ :OP_SIZEOF_TYPE, val[1] ] } 110 117 | '++' unary_expression { result = val[1] } # ++, -- は無視する … … 112 119 113 120 unary_operator 114 115 116 117 118 119 121 : '&' { result = :OP_U_AMP } 122 | '*' { result = :OP_U_ASTER } 123 | '+' { result = :OP_U_PLUS } 124 | '-' { result = :OP_U_MINUS } 125 | '~' { result = :OP_U_TILDE } 126 | '!' { result = :OP_U_EXCLAM } 120 127 121 128 cast_expression 122 123 129 : unary_expression 130 | '(' type_name ')' cast_expression 124 131 { result = [ :CAST, val[1], val[3] ] } 125 132 126 133 multiplicative_expression 127 128 134 : cast_expression 135 | multiplicative_expression '*' cast_expression 129 136 { result = [ :OP_MULT, val[0], val[2] ] } 130 137 | multiplicative_expression '/' cast_expression 131 138 { result = [ :OP_DIV, val[0], val[2] ] } 132 139 | multiplicative_expression '%' cast_expression 133 140 { result = [ :OP_REMAIN, val[0], val[2] ] } 134 141 135 142 additive_expression 136 137 143 : multiplicative_expression 144 | additive_expression '+' multiplicative_expression 138 145 { result = [ :OP_ADD, val[0], val[2] ] } 139 146 | additive_expression '-' multiplicative_expression 140 147 { result = [ :OP_SUB, val[0], val[2] ] } 141 148 142 149 shift_expression 143 144 150 : additive_expression 151 | shift_expression '<<' additive_expression 145 152 { result = [ :OP_LSFT, val[0], val[2] ] } 146 153 | shift_expression '>>' additive_expression 147 154 { result = [ :OP_RSFT, val[0], val[2] ] } 148 155 149 156 relational_expression 150 151 157 : shift_expression 158 | relational_expression '<' shift_expression 152 159 { result = [ :OP_LT, val[0], val[2] ] } 153 160 | relational_expression '>' shift_expression 154 161 { result = [ :OP_GT, val[0], val[2] ] } 155 162 | relational_expression '<=' shift_expression 156 163 { result = [ :OP_LE, val[0], val[2] ] } 157 164 | relational_expression '>=' shift_expression 158 165 { result = [ :OP_GE, val[0], val[2] ] } 159 166 160 167 equality_expression 161 162 168 : relational_expression 169 | equality_expression '==' relational_expression 163 170 { result = [ :OP_EQ, val[0], val[2] ] } 164 171 | equality_expression '!=' relational_expression 165 172 { result = [ :OP_NE, val[0], val[2] ] } 166 173 167 174 and_expression 168 169 175 : equality_expression 176 | and_expression '&' equality_expression 170 177 { result = [ :OP_AND, val[0], val[2] ] } 171 178 172 179 exclusive_or_expression 173 174 180 : and_expression 181 | exclusive_or_expression '^' and_expression 175 182 { result = [ :OP_EOR, val[0], val[2] ] } 176 183 177 184 inclusive_or_expression 178 179 185 : exclusive_or_expression 186 | inclusive_or_expression '|' exclusive_or_expression 180 187 { result = [ :OP_OR, val[0], val[2] ] } 181 188 182 189 logical_and_expression 183 184 190 : inclusive_or_expression 191 | logical_and_expression '&&' inclusive_or_expression 185 192 { result = [ :OP_LAND, val[0], val[2] ] } 186 193 187 194 logical_or_expression 188 189 195 : logical_and_expression 196 | logical_or_expression '||' logical_and_expression 190 197 { result = [ :OP_LOR, val[0], val[2] ] } 191 198 192 199 conditional_expression 193 194 200 : logical_or_expression 201 | logical_or_expression '?' expression ':' conditional_expression 195 202 { result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ] } 196 203 197 198 # コンマ演算子が使えない 204 assignment_expression 205 : conditional_expression 206 | unary_expression assignment_operator assignment_expression 207 208 assignment_operator 209 : '=' 210 | '+=' 211 | '-=' 212 | '*=' 213 | '/=' 214 | '%=' 215 | '<<=' 216 | '>>=' 217 | '&=' 218 | '|=' 219 | '^=' 220 199 221 expression 200 : conditional_expression222 : assignment_expression 201 223 { 202 224 result = Expression.new( val[0] ) 203 225 # result.print 204 226 } 227 | expression ',' assignment_expression 228 { 229 result = Expression.new( val[2] ) # ',' の後ろを採用 230 } 205 231 206 232 constant_expression 207 233 : conditional_expression 208 234 { 209 235 result = Expression.new( val[0] ) … … 218 244 } 219 245 220 221 222 246 # Types 223 247 ########################## 宣言 ########################## … … 227 251 # K&Rとの違い: storage classが指定できない、型が省略できない 228 252 declaration 229 230 # : type_specifier_qualifier_list init_declarator_list ';'253 : declaration_specifiers init_declarator_list ';' 254 # : specifier_qualifier_list init_declarator_list ';' 231 255 232 256 # declaration_specifiersは関数のパラメータで使われるが、 233 # type_specifier_qualifier_listで十分かもしれない257 # specifier_qualifier_listで十分かもしれない 234 258 235 259 declaration_specifiers 236 : storage_class 260 : storage_class_specifier 237 261 { 238 262 result = CIntType.new( -3 ) # storage class は無視 239 263 } 240 | type_specifier 241 | type_qualifier 264 | storage_class_specifier declaration_specifiers 265 { 266 result = val[1] # storage class は無視 267 } 268 | type_specifier 269 | type_specifier declaration_specifiers 270 { 271 result = val[1].merge val[0] 272 } 273 | type_qualifier 242 274 { 243 275 result = CIntType.new( -3 ) 244 276 result.set_qualifier val[0] 245 277 } 246 | storage_class declaration_specifiers 247 { 248 result = val[1] # storage class は無視 249 } 250 | type_specifier declaration_specifiers 251 { 252 result = val[1].merge val[0] 253 } 254 | type_qualifier declaration_specifiers 278 | type_qualifier declaration_specifiers 255 279 { 256 280 val[1].set_qualifier val[0] 257 result = val[1] 258 } 259 281 result = val[1] 282 } 283 | function_specifier 284 | function_specifier declaration_specifiers 260 285 261 286 init_declarator_list 262 287 : init_declarator 263 288 { result = [val[0]] } 264 289 | init_declarator_list ',' init_declarator 265 290 { result << val[2] } 266 291 267 292 init_declarator 268 269 293 : declarator 294 | declarator '=' initializer 270 295 { val[0].set_initializer( val[2] ) } 271 296 297 storage_class_specifier 298 : EXTERN 299 | STATIC 300 | AUTO 301 | REGISTER 302 272 303 type_specifier 273 : VOID { set_no_type_name true; result = CVoidType.new } 274 | FLOAT { set_no_type_name true; result = CFloatType.new(-32) } 275 | DOUBLE { set_no_type_name true; result = CFloatType.new(-64) } 276 | BOOL { set_no_type_name true; result = CBoolType.new } 277 | struct_specifier { set_no_type_name true; result = val[0] } # set_no_type_name true は struct_tag でも呼ばれる 278 | union_specifier { set_no_type_name true; result = CVoidType.new } # void が宣言されたとする 279 | enum_specifier { set_no_type_name true; result = CVoidType.new } # void が宣言されたとする 280 | TYPE_NAME { set_no_type_name true; result = CDefinedType.new( val[0].val ) } 281 282 | CHAR { set_no_type_name true; result = CIntType.new(-11 ) } 283 | SHORT { set_no_type_name true; result = CIntType.new( -2 ) } 284 | INT { set_no_type_name true; result = CIntType.new( -3 ) } 285 | LONG { set_no_type_name true; result = CIntType.new( -4 ) } 286 | SIGNED 304 : VOID 305 { set_no_type_name true; result = CVoidType.new } 306 | CHAR 307 { set_no_type_name true; result = CIntType.new(-11 ) } 308 | SHORT 309 { set_no_type_name true; result = CIntType.new( -2 ) } 310 | INT 311 { set_no_type_name true; result = CIntType.new( -3 ) } 312 | LONG 313 { set_no_type_name true; result = CIntType.new( -4 ) } 314 | FLOAT 315 { set_no_type_name true; result = CFloatType.new(-32) } 316 | DOUBLE 317 { set_no_type_name true; result = CFloatType.new(-64) } 318 | SIGNED 287 319 { 288 320 set_no_type_name true … … 290 322 result.set_sign :SIGNED 291 323 } 292 324 | UNSIGNED 293 325 { 294 326 set_no_type_name true … … 296 328 result.set_sign :UNSIGNED 297 329 } 330 | BOOL 331 { set_no_type_name true; result = CBoolType.new } 332 | struct_specifier 333 { set_no_type_name true; result = val[0] } # set_no_type_name true は struct_tag でも呼ばれる 334 | union_specifier 335 { set_no_type_name true; result = CVoidType.new } # void が宣言されたとする 336 | enum_specifier 337 { set_no_type_name true; result = CVoidType.new } # void が宣言されたとする 338 | TYPE_NAME 339 { set_no_type_name true; result = CDefinedType.new( val[0].val ) } 298 340 299 341 # mikan K&Rのstruct_or_union_specifierに相当するが、unionは使えない, bit field にも対応しない 300 342 struct_specifier # mikan 301 : STRUCT struct_tag '{' 343 # : STRUCT struct_tag '{' 344 : struct_term struct_tag '{' 302 345 { StructType.set_define( true ) } 303 346 struct_declaration_list '}' 304 347 { 305 348 StructType.end_of_parse 306 349 result = val[1] 307 350 } 308 | STRUCT 351 # | STRUCT 352 | struct_term 309 353 { 310 354 result = CStructType.new() 311 355 StructType.set_define( true ) 312 356 } 313 357 '{' struct_declaration_list '}' 314 358 { 315 359 StructType.end_of_parse 316 360 result = val[1] 317 361 } 318 | STRUCT struct_tag # mikan struct_tag は namespace 対応が必要 362 # | STRUCT struct_tag # mikan struct_tag は namespace 対応が必要 363 | struct_term struct_tag # mikan struct_tag は namespace 対応が必要 319 364 { 320 365 StructType.set_define( false ) … … 323 368 } 324 369 370 struct_term 371 : STRUCT { set_no_type_name true } 372 325 373 struct_declaration_list 326 327 374 : struct_declaration 375 | struct_declaration_list struct_declaration 328 376 329 377 struct_tag: 330 378 IDENTIFIER 331 379 { 332 380 result = CStructType.new( val[0].val ) … … 336 384 # ポインタ修飾子を追加 337 385 struct_declaration 338 339 # : type_specifier_qualifier_list struct_declarator_list ';'386 : declaration_specifiers struct_declarator_list ';' 387 # : specifier_qualifier_list struct_declarator_list ';' 340 388 { 341 389 val[1].each { |i| # i: Decl … … 347 395 result = val[1] 348 396 } 349 | union_specifier ';' # 無名 350 | struct_specifier ';' # 無名 397 # ビットフィールドを読み飛ばし 398 | declaration_specifiers struct_declarator_list ':' constant_expression ';' 399 { 400 val[1].each { |i| # i: Decl 401 i.set_type( val[0] ) 402 i.set_kind( :MEMBER ) 403 i.check 404 CStructType.new_member( i ) 405 } 406 result = val[1] 407 } 408 | union_specifier ';' # 無名 409 | struct_specifier ';' # 無名 351 410 352 411 … … 354 413 # K&Rのspecifier_qualifier_listと同じ 355 414 # 名前がまぎらわしかったのでtype_を付けた 356 type_specifier_qualifier_list 357 : type_specifier 358 | type_specifier type_specifier_qualifier_list 415 specifier_qualifier_list 416 : type_specifier specifier_qualifier_list 359 417 { 360 418 result = val[1].merge val[0] 361 419 } 362 | type_qualifier 420 | type_specifier 421 | type_qualifier specifier_qualifier_list 422 { 423 val[1].set_qualifier val[0] 424 result = val[1] 425 } 426 | type_qualifier 363 427 { 364 428 result = CIntType.new( -3 ) 365 429 result.set_qualifier val[0] 366 430 } 367 | type_qualifier type_specifier_qualifier_list368 {369 val[1].set_qualifier val[0]370 result = val[1]371 }372 431 373 432 struct_declarator_list 374 433 : struct_declarator 375 434 { result = [ val[0] ] } 376 435 | struct_declarator_list ',' struct_declarator 377 436 { result << val[2] } 378 437 379 438 # ビットフィールドは使えない 380 439 struct_declarator 381 382 383 440 : declarator 441 # | ':' constant_expression 442 # | declarator ':' constant_expression 384 443 385 444 union_specifier 386 : UNION union_tag '{' union_declaration_list '}' 387 | UNION '{' union_declaration_list '}' 388 | UNION union_tag # mikan struct_tag は namespace 対応が必要 445 # : UNION union_tag '{' union_declaration_list '}' 446 # | UNION '{' union_declaration_list '}' 447 # | UNION union_tag # mikan struct_tag は namespace 対応が必要 448 : union_term union_tag '{' union_declaration_list '}' 449 | union_term '{' union_declaration_list '}' 450 | union_term union_tag # mikan struct_tag は namespace 対応が必要 451 452 union_term 453 : UNION { set_no_type_name true } 389 454 390 455 union_declaration_list 391 392 456 : union_declaration 457 | union_declaration_list union_declaration 393 458 394 459 union_tag: … … 396 461 397 462 union_declaration 398 463 : declaration_specifiers union_declarator_list ';' 399 464 | union_specifier ';' # 無名 400 465 | struct_specifier ';' # 無名 401 466 402 467 union_declarator_list 403 : union_declarator 404 | union_declarator_list ',' union_declarator 405 406 # ビットフィールドは使えない 468 : union_declarator 469 | union_declarator_list ',' union_declarator 470 407 471 union_declarator 408 : declarator 409 410 411 412 # enumの種類を追加 413 enum_specifier # mikan 414 : enum_type '{' enumerator_list '}' 415 | enum_type IDENTIFIER '{' enumerator_list '}' 416 | enum_type IDENTIFIER 417 418 enum_type 419 : ENUM { result = CEnumType.new( -1 ) } 420 # | ENUM8 { result = CEnumType.new( 8 ) } 421 # | ENUM16 { result = CEnumType.new( 16 ) } 422 # | ENUM32 { result = CEnumType.new( 32 ) } 423 # | ENUM64 { result = CEnumType.new( 64 ) } 424 # | ENUM128 { result = CEnumType.new( 128 ) } 472 : declarator 473 | ':' constant_expression 474 | declarator ':' constant_expression 475 476 enum_specifier 477 : ENUM '{' enumerator_list '}' 478 | ENUM IDENTIFIER '{' enumerator_list '}' 479 | ENUM '{' enumerator_list ',' '}' 480 | ENUM IDENTIFIER '{' enumerator_list ',' '}' 481 | ENUM IDENTIFIER 482 | ENUM TYPE_NAME '{' enumerator_list '}' 483 | ENUM TYPE_NAME '{' enumerator_list ',' '}' 484 | ENUM TYPE_NAME 425 485 426 486 enumerator_list 427 428 487 : enumerator 488 | enumerator_list ',' enumerator 429 489 430 490 enumerator 431 432 491 : IDENTIFIER 492 | IDENTIFIER '=' constant_expression 433 493 434 494 type_qualifier 435 : CONST { result = :CONST } 436 | VOLATILE { result = :VOLATILE } 495 : CONST 496 { result = :CONST } 497 | RESTRICT 498 | VOLATILE 499 { result = :VOLATILE } 500 501 function_specifier 502 : __INLINE__ 503 | INLINE 504 | __INLINE 505 | CINLINE 437 506 438 507 declarator 439 508 : pointer direct_declarator 440 509 { 441 510 val[1].set_type( val[0] ) 442 511 result = val[1] 443 512 } 444 445 513 | direct_declarator 514 | pointer TYPE_NAME # 関数ポインタの typedef が二重定義の場合 446 515 { 447 516 result = Decl.new( val[1].val ) … … 450 519 451 520 direct_declarator # mikan 452 521 : IDENTIFIER 453 522 { result = Decl.new( val[0].val ) } 454 523 | '(' declarator ')' 455 524 { result = val[1] } 456 525 | direct_declarator '[' constant_expression ']' 457 526 { 458 527 val[0].set_type( CArrayType.new( val[2] ) ) 459 528 result = val[0] 460 529 } 461 530 | direct_declarator '[' ']' 462 531 { 463 532 val[0].set_type( CArrayType.new ) 464 533 result = val[0] 465 534 } 466 535 | direct_declarator '(' parameter_type_list ')' 467 536 { 468 537 # Generator.warning( "W6001 need 'void' for no parameter" ) … … 470 539 result = val[0] 471 540 } 472 473 # | direct_declarator '(' identifier_list ')' # これは何のために必要? 060211 474 | direct_declarator '(' ')' 541 | direct_declarator '(' identifier_list ')' # これは何のために必要? 060211 542 | direct_declarator '(' ')' 475 543 { 476 544 # Generator.warning( "W6002 need 'void' for no parameter" ) … … 480 548 481 549 pointer 482 550 : '*' 483 551 { result = CPtrType.new } 484 | '*' type_qualifier 552 | '*' type_qualifier_list 485 553 { 486 554 result = CPtrType.new 487 555 result.set_qualifier( val[1] ) 488 556 } 489 557 | '*' pointer 490 558 { 491 559 val[1].set_type(CPtrType.new) 492 560 result = val[1] 493 561 } 494 | '*' type_qualifierpointer562 | '*' type_qualifier_list pointer 495 563 { 496 564 ptrtype = CPtrType.new … … 500 568 } 501 569 570 type_qualifier_list 571 : type_qualifier 572 | type_qualifier_list type_qualifier 502 573 503 574 parameter_type_list 504 505 575 : parameter_list 576 | parameter_list ',' '.' '.' '.' 506 577 # mikan 可変長パラメータ, ... の間のスペースが許される(手抜き) 507 578 508 579 parameter_list 509 580 : parameter_declaration 510 581 # { result = ParamList.new( val[0] ) } 511 582 | parameter_list ',' parameter_declaration 512 583 # { 513 584 # val[0].add_param( val[2] ) … … 518 589 # パラメータ修飾子を追加 519 590 parameter_declaration 520 591 : declaration_specifiers declarator 521 592 # { 522 593 # decl = ParamDecl.new( val[1], val[0], [] ) … … 533 604 # result = nil 534 605 # } 535 536 537 538 539 #identifier_list # 060211 不用になった540 #: IDENTIFIER541 #| identifier_list ',' IDENTIFIER606 | declaration_specifiers abstract_declarator # 仮引数なし 607 | declaration_specifiers # 仮引数なし 608 609 610 identifier_list # 060211 不用になった 611 : IDENTIFIER 612 | identifier_list ',' IDENTIFIER 542 613 543 614 type_name 544 : type_specifier_qualifier_list545 | type_specifier_qualifier_list abstract_declarator615 : specifier_qualifier_list 616 | specifier_qualifier_list abstract_declarator 546 617 547 618 abstract_declarator # mikan 548 549 550 619 : pointer 620 | direct_abstract_declarator 621 | pointer direct_abstract_declarator 551 622 552 623 direct_abstract_declarator 553 554 555 | '[' constant_expression ']'556 557 | direct_abstract_declarator '[' constant_expression ']'558 624 : '(' abstract_declarator ')' 625 | '[' ']' 626 | '[' assignment_expression ']' 627 | direct_abstract_declarator '[' ']' 628 | direct_abstract_declarator '[' assignment_expression ']' 629 | '(' ')' 559 630 { 560 631 Generator.warning( "W6003 need 'void' for no parameter" ) 561 632 } 562 563 633 | '(' parameter_type_list ')' 634 | direct_abstract_declarator '(' ')' 564 635 { 565 636 Generator.warning( "W6004 need 'void' for no parameter" ) 566 637 } 567 638 | direct_abstract_declarator '(' parameter_type_list ')' 568 639 569 640 # assignment_expressionをconstant_expressionに変更 570 641 initializer # mikan 571 : constant_expression642 : assignment_expression 572 643 { result = val[0] } 573 644 | '{' initializer_list '}' 574 645 { result = val[1] } 575 646 | '{' initializer_list ',' '}' 576 647 { result = val[1] } 577 | C_EXP '(' STRING_LITERAL ')'648 | C_EXP '(' STRING_LITERAL ')' 578 649 { result = C_EXP.new( val[2] ) } 579 650 580 651 initializer_list 581 652 : initializer 582 653 { 583 654 result = [ val[0] ] 584 655 } 585 656 | initializer_list ',' initializer 586 657 { 587 658 val[0] << val[2] … … 594 665 #トップレベルの構文規則 595 666 C_parser 596 597 667 : 668 | C_parser extension_statement 598 669 599 670 extension_statement 600 :statement601 | EXTENSIONstatement602 603 statement604 605 606 607 608 609 610 671 : cdl_statement 672 | EXTENSION cdl_statement 673 674 cdl_statement 675 : typedef 676 | func_def 677 | enum_specifier ';' 678 | struct_specifier ';' 679 | declaration 680 | ';' 681 | error # エラー回復ポイント 611 682 612 683 typedef 613 : TYPEDEF type_specifier_qualifier_list declarator_list ';'684 : TYPEDEF specifier_qualifier_list declarator_list ';' 614 685 { 615 686 val[2].each{ |i| … … 621 692 622 693 declarator_list 623 694 : declarator 624 695 { result = [ val[0] ] } 625 696 | declarator_list ',' declarator 626 697 { result << val[2] } 627 698 628 699 func_def 629 : declaration_specifiers declarator compoundstatement 630 631 infunc_statement_list 632 : 633 | infunc_statement_list infunc_statement 634 635 infunc_statement 636 : declaration 637 | ifstatement 638 | whilestatement 639 | dowhilestatement 640 | forstatement 641 | switchstatement 642 | labelstatement 643 | compoundstatement 644 | gotostatement 645 | expressionstatement 646 | ';' 700 : declaration_specifiers declarator compound_statement 701 702 statement 703 : labeled_statement 704 | compound_statement 705 | expression_statement 706 | ifstatement 707 | whilestatement 708 | dowhilestatement 709 | forstatement 710 | switchstatement 711 | jump_statement 712 | asm_statement 713 714 labeled_statement 715 : IDENTIFIER ':' statement 716 | CASE constant_expression ':' statement 717 | DEFAULT ':' statement 718 719 compound_statement 720 : '{' '}' 721 | '{' block_item_list '}' 722 723 block_item_list 724 : block_item 725 | block_item_list block_item 726 727 block_item 728 : declaration 729 | statement 730 731 expression_statement 732 : ';' 733 | expression ';' 647 734 648 735 ifstatement 649 : IF '(' expression ')' infunc_statement 650 | IF '(' expression ')' infunc_statement ELSE infunc_statement 736 : IF '(' expression ')' statement 737 | IF '(' expression ')' statement ELSE statement 738 739 switchstatement 740 : SWITCH '(' expression ')' compound_statement 651 741 652 742 whilestatement 653 : WHILE '(' expression ')' infunc_statement743 : WHILE '(' expression ')' statement 654 744 655 745 dowhilestatement 656 : DO infunc_statement WHILE '(' expression ')' ';'746 : DO statement WHILE '(' expression ')' ';' 657 747 658 748 forstatement 659 : FOR '(' expression ';' expression ';' expression ')' infunc_statement 660 661 switchstatement 662 : SWITCH '(' expression ')' infunc_statment 663 664 labelstatement 665 : IDENTIFIER ':' infunc_statement 666 | CASE constant_expression ':' infunc_statement 667 | DEFAULT ':' infunc_statement 668 669 compoundstatement 670 : '{' infunc_statement_list '}' 671 672 gotostatement 673 : GOTO IDENTIFIER ';' 674 | CONTINUE ';' 675 | BREAK ';' 676 | RETURN expression ';' 677 | RETURN ';' 678 679 expressionstatement 680 : expression ';' 681 | unary_expression assignment_operator expression ';' 682 683 assignment_operator 684 : '=' 685 | '+=' 686 | '-=' 687 | '*=' 688 | '/=' 689 | '%=' 690 | '<<=' 691 | '>>=' 692 | '&=' 693 | '|=' 694 | '^=' 695 696 storage_class 697 : __INLINE__ 698 | INLINE 699 | __INLINE 700 | CINLINE 701 | EXTERN 702 | STATIC 703 | AUTO 704 | REGISTER 749 : FOR '(' expression_statement expression_statement ')' statement 750 | FOR '(' expression_statement expression_statement expression ')' statement 751 | FOR '(' declaration expression_statement ')' statement 752 | FOR '(' declaration expression_statement expression ')' statement 753 754 jump_statement 755 : GOTO IDENTIFIER ';' 756 | CONTINUE ';' 757 | BREAK ';' 758 | RETURN ';' 759 | RETURN expression ';' 705 760 706 761 namespace_identifier 707 708 709 762 : IDENTIFIER { result = NamespacePath.new( val[0].val, false ) } 763 | '::' IDENTIFIER { result = NamespacePath.new( val[1].val, true ) } 764 | namespace_identifier '::' IDENTIFIER 710 765 { result = val[0].append!( val[2].val ) } 711 766 767 asm_statement 768 : _ASM { 769 while true 770 # ';' が表れるまで、トークンを読み飛ばす。 771 # gcc の構文拡張に対応すべきだが、単純な実装として、';' まで読み飛ばす。 772 # トークン単位で読み飛ばしているので、文字列やコメント内の ';' は対象にならない。 773 token = next_token 774 if token[1].val == ";" 775 break 776 end 777 # p "skip: #{token[1].val}" 778 end 779 } 780 712 781 end 713 782 714 783 ---- inner 715 784 716 RESERVED = { 717 # keyword 718 'typedef' => :TYPEDEF, 719 'struct' => :STRUCT, 720 'union' => :UNION, 721 'sizeof' => :SIZEOF, 722 'throw' => :THROW, 723 724 # specifier 725 # types 726 'void' => :VOID, 727 'char' => :CHAR, 728 'short' => :SHORT, 729 730 'volatile'=> :VOLATILE, 731 'const' => :CONST, 732 'extern' => :EXTERN, 733 734 'long' => :LONG, 735 'float' => :FLOAT, 736 'double' => :DOUBLE, 737 'signed' => :SIGNED, 738 'unsigned'=> :UNSIGNED, 739 740 'int' => :INT, 741 'enum' => :ENUM, 742 743 'if' => :IF, 744 'else' => :ELSE, 745 'while' => :WHILE, 746 'do' => :DO, 747 'for' => :FOR, 748 'case' => :CASE, 749 'default' => :DEFAULT, 750 'goto' => :GOTO, 751 'continue' => :CONTINUE, 752 'break' => :BREAK, 753 'return' => :RETURN, 754 '__inline__' => :__INLINE__, 755 'inline' => :INLINE, 756 '__inline' => :__INLINE, 757 'Inline' => :CINLINE, # inline starting with Capital letter 758 'static' => :STATIC, 759 'register' => :REGISTER, 760 'auto' => :AUTO, 761 '__extension__' => :EXTENSION, 762 763 } 764 765 @@generator_nest = -1 766 @@generator_stack = [] 767 @@current_locale = [] 768 769 def finalize 770 771 # mikan Namespace.pop 772 Celltype.pop 773 Cell.pop 774 CompositeCelltype.pop 775 Region.pop 776 777 end 778 779 def set_plugin( plugin ) 780 @plugin = plugin 781 end 782 783 def self.get_plugin 784 @@generator_stack[@@generator_nest].get_plugin 785 end 786 787 def get_plugin 788 @plugin 789 end 790 791 def parse(files) 792 793 # mikan Namespace.push 794 Celltype.push 795 Cell.push 796 CompositeCelltype.push 797 Region.push 798 799 @@generator_nest += 1 800 @@generator_stack[@@generator_nest] = self 801 @b_no_type_name = false 802 803 begin 804 805 @q = [] 806 comment = false 807 808 # euc のコメントを utf8 として扱うと、コメントの終わりを誤る問題の対策 809 TECS_LANG::set_kcode_binary 810 811 # 800U, 0xffLL など (整数リテラルに共通の修飾子) 812 integer_qualifier = "([Uu][Ll][Ll]|[Uu][Ll]|[Uu]|[Ll][Ll]|[Ll])?" 813 814 files.each {|file| 815 lineno = 1 816 begin 817 #2.0 IO.foreach(file) {|line| 818 TECSIO.foreach(file) {|line| 819 col = 1 820 line.rstrip! 821 822 until line.empty? 823 824 if comment 825 case line 826 # コメント終了 827 when /\A\*\// 828 comment = false 829 when /\A./ 830 ; 831 end 832 else 833 case line 834 # 空白、プリプロセスディレクティブ 835 when /\A\s+/ 836 ; 837 # 識別子 838 when /\A[a-zA-Z_]\w*/ 839 word = $& 840 @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)] 841 # 16 進数定数 842 when /\A0x[0-9A-Fa-f]+#{integer_qualifier}/ 843 @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)] 844 # 8 進数定数 845 when /\A0[0-7]+#{integer_qualifier}/ 846 @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)] 847 # 浮動小数定数 848 when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/ 849 @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)] 850 # 整数定数 851 when /\A\d+#{integer_qualifier}/ 852 # when /\A\d+/ 853 @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)] 854 # 文字 855 when /\A'(?:[^'\\]|\\.)'/ 856 @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)] 857 # 文字列 858 # "#include #include #include \"../systask/logtask.cfg\" 最後の " 忘れ)で無限ループ 859 # when /\A"(?:[^"\\]+|\\.)*"/ 860 when /\A"(?:[^"\\]|\\.)*"/ # これはうまく行くようだ 861 @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)] 862 # 行コメント 863 when /\A\/\/.*$/ 864 # 読み飛ばすだけ 865 # コメント開始 866 when /\A\/\*/ 867 comment = true 868 when /\A>>=/, /\A<<=/, /\A>>/, /\A<</ 869 @q << [$&, Token.new($&, file, lineno, col)] 870 when /\A\+=/, /\A\-=/, /\A\*=/, /\A\/=/, /\A%=/, /\A&=/, /\A\|=/, /\A\^=/ 871 @q << [$&, Token.new($&, file, lineno, col)] 872 when /\A::/, /\A==/, /\A!=/, /\A>=/, /\A<=/, /\A\->/, /\A\+\+/, /\A\-\-/ 873 @q << [$&, Token.new($&, file, lineno, col)] 874 when /\A./ 875 @q << [$&, Token.new($&, file, lineno, col)] 876 else 877 raise 878 end 879 end 880 881 line = $' 882 col += $&.length 883 end 884 885 lineno += 1 886 } 887 888 rescue => evar 889 Generator.error( "B1002 while open or reading \'$1\'" , file ) 890 print_exception( evar ) 891 end 892 } 893 894 # 終了の印 895 @q << nil 896 897 @yydebug = true 898 do_parse 899 900 ensure 901 @@generator_nest -= 1 902 TECS_LANG::reset_kcode 903 end 904 905 end 906 907 908 def next_token 909 token = @q.shift 910 911 if token then 912 @@current_locale[@@generator_nest] = token[1].locale 913 914 case token[1].val 915 when ";", ":", ",", "(", ")", "{", "}" 916 set_no_type_name false 917 when ".", "->" 918 set_no_type_name true 919 end 920 921 # TYPE_NAME トークンへ置き換え 922 if @b_no_type_name == false 923 if token[0] == :IDENTIFIER && Namespace.is_typename?( token[1].val ) then 924 token[0] = :TYPE_NAME 925 end 926 end 927 928 if $debug then # 070107 token 無効時ここを通さないようした (through 対応 -d の時に例外発生) 929 locale = @@current_locale[@@generator_nest] 930 if token then 931 print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" ) 932 else 933 print( "#{locale[0]}: line #{locale[1]} : EOF\n" ) 934 end 935 end 936 end 937 938 token 939 end 940 941 def on_error(t, v, vstack) 942 if v == "$" then 943 Generator.error( "B1003 Unexpected EOF" ) 944 else 945 Generator.error( "B1004 syntax error near \'$1\'" , v.val ) 946 end 947 948 end 949 950 def self.current_locale 951 @@current_locale[ @@generator_nest ] 952 end 953 954 @@n_error = 0 955 @@n_warning = 0 956 957 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切) 958 def self.error( msg ) 959 @@n_error += 1 960 locale = @@current_locale[ @@generator_nest ] 961 962 if locale then 963 Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}" 964 else 965 Console.puts "error: #{msg}" 966 end 967 end 968 969 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でウォーニング発生は不適切) 970 def self.warning( msg ) 971 @@n_warning += 1 972 locale = @@current_locale[ @@generator_nest ] 973 Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}" 974 end 975 976 def self.get_n_error 977 @@n_error 978 end 979 980 def self.get_n_warning 981 @@n_warning 982 end 983 984 def self.get_nest 985 @@generator_nest 986 end 987 988 def set_no_type_name b_no_type_name 989 # print "b_no_type_name=#{b_no_type_name}\n" 990 @b_no_type_name = b_no_type_name 991 end 785 RESERVED = { 786 # keyword 787 'typedef' => :TYPEDEF, 788 'struct' => :STRUCT, 789 'union' => :UNION, 790 'sizeof' => :SIZEOF, 791 'throw' => :THROW, 792 793 # specifier 794 # types 795 'void' => :VOID, 796 'char' => :CHAR, 797 'short' => :SHORT, 798 799 'volatile'=> :VOLATILE, 800 'restrict'=> :RESTRICT, 801 'const' => :CONST, 802 'extern' => :EXTERN, 803 804 'long' => :LONG, 805 'float' => :FLOAT, 806 'double' => :DOUBLE, 807 'signed' => :SIGNED, 808 'unsigned'=> :UNSIGNED, 809 810 'int' => :INT, 811 'enum' => :ENUM, 812 813 'if' => :IF, 814 'else' => :ELSE, 815 'while' => :WHILE, 816 'do' => :DO, 817 'for' => :FOR, 818 'switch' => :SWITCH, 819 'case' => :CASE, 820 'default' => :DEFAULT, 821 'goto' => :GOTO, 822 'continue' => :CONTINUE, 823 'break' => :BREAK, 824 'return' => :RETURN, 825 '__inline__' => :__INLINE__, 826 'inline' => :INLINE, 827 '__inline' => :__INLINE, 828 'Inline' => :CINLINE, # inline starting with Capital letter 829 'static' => :STATIC, 830 'register' => :REGISTER, 831 'auto' => :AUTO, 832 '__extension__' => :EXTENSION, 833 '__asm__' => :_ASM, 834 'asm' => :_ASM 835 836 } 837 838 @@generator_nest = -1 839 @@generator_stack = [] 840 @@current_locale = [] 841 842 def finalize 843 844 # mikan Namespace.pop 845 Celltype.pop 846 Cell.pop 847 CompositeCelltype.pop 848 Region.pop 849 850 end 851 852 def set_plugin( plugin ) 853 @plugin = plugin 854 end 855 856 def self.get_plugin 857 @@generator_stack[@@generator_nest].get_plugin 858 end 859 860 def get_plugin 861 @plugin 862 end 863 864 def parse(files) 865 866 # mikan Namespace.push 867 Celltype.push 868 Cell.push 869 CompositeCelltype.push 870 Region.push 871 872 @@generator_nest += 1 873 @@generator_stack[@@generator_nest] = self 874 @b_no_type_name = false 875 876 begin 877 878 @q = [] 879 comment = false 880 # b_asm = false 881 882 # euc のコメントを utf8 として扱うと、コメントの終わりを誤る問題の対策 883 TECS_LANG::set_kcode_binary 884 885 # 800U, 0xffLL など (整数リテラルに共通の修飾子) 886 integer_qualifier = "([Uu][Ll][Ll]|[Uu][Ll]|[Uu]|[Ll][Ll]|[Ll])?" 887 888 files.each {|file| 889 lineno = 1 890 begin 891 #2.0 IO.foreach(file) {|line| 892 TECSIO.foreach(file) {|line| 893 col = 1 894 line.rstrip! 895 896 until line.empty? 897 898 if comment 899 case line 900 # コメント終了 901 when /\A\*\// 902 comment = false 903 when /\A./ 904 ; 905 end 906 else 907 case line 908 # 空白、プリプロセスディレクティブ 909 when /\A\s+/ 910 ; 911 # 識別子 912 when /\A[a-zA-Z_]\w*/ 913 word = $& 914 @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)] 915 # 16 進数定数 916 when /\A0x[0-9A-Fa-f]+#{integer_qualifier}/ 917 @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)] 918 # 8 進数定数 919 when /\A0[0-7]+#{integer_qualifier}/ 920 @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)] 921 # 浮動小数定数 922 when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/ 923 @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)] 924 # 整数定数 925 when /\A\d+#{integer_qualifier}/ 926 # when /\A\d+/ 927 @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)] 928 # 文字 929 when /\A'(?:[^'\\]|\\.)'/ 930 @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)] 931 # 文字列 932 # "#include #include #include \"../systask/logtask.cfg\" 最後の " 忘れ)で無限ループ 933 # when /\A"(?:[^"\\]+|\\.)*"/ 934 when /\A"(?:[^"\\]|\\.)*"/ # これはうまく行くようだ 935 @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)] 936 # 行コメント 937 when /\A\/\/.*$/ 938 # 読み飛ばすだけ 939 # コメント開始 940 when /\A\/\*/ 941 comment = true 942 when /\A>>=/, /\A<<=/, /\A>>/, /\A<</ 943 @q << [$&, Token.new($&, file, lineno, col)] 944 when /\A\+=/, /\A\-=/, /\A\*=/, /\A\/=/, /\A%=/, /\A&=/, /\A\|=/, /\A\^=/ 945 @q << [$&, Token.new($&, file, lineno, col)] 946 when /\A::/, /\A==/, /\A!=/, /\A>=/, /\A<=/, /\A\->/, /\A\+\+/, /\A\-\-/ 947 @q << [$&, Token.new($&, file, lineno, col)] 948 when /\A\|\|/, /\A\&\&/ 949 @q << [$&, Token.new($&, file, lineno, col)] 950 when /\A./ 951 @q << [$&, Token.new($&, file, lineno, col)] 952 else 953 raise 954 end 955 end 956 957 line = $' 958 col += $&.length 959 end 960 961 lineno += 1 962 } 963 964 rescue => evar 965 Generator.error( "B1002 while open or reading \'$1\'" , file ) 966 print_exception( evar ) 967 end 968 } 969 970 # 終了の印 971 @q << nil 972 973 @yydebug = true 974 do_parse 975 976 ensure 977 @@generator_nest -= 1 978 TECS_LANG::reset_kcode 979 end 980 981 end 982 983 984 def next_token 985 token = @q.shift 986 987 if token then 988 @@current_locale[@@generator_nest] = token[1].locale 989 990 case token[1].val 991 when ";", ":", ",", "(", ")", "{", "}" 992 set_no_type_name false 993 when ".", "->" 994 set_no_type_name true 995 end 996 997 # TYPE_NAME トークンへ置き換え 998 if @b_no_type_name == false 999 if token[0] == :IDENTIFIER && Namespace.is_typename?( token[1].val ) then 1000 token[0] = :TYPE_NAME 1001 locale = @@current_locale[@@generator_nest] 1002 #print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}: type_name'\n" ) 1003 end 1004 end 1005 1006 if $debug then # 070107 token 無効時ここを通さないようした (through 対応 -d の時に例外発生) 1007 locale = @@current_locale[@@generator_nest] 1008 if token then 1009 print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" ) 1010 else 1011 print( "#{locale[0]}: line #{locale[1]} : EOF\n" ) 1012 end 1013 end 1014 end 1015 1016 token 1017 end 1018 1019 def on_error(t, v, vstack) 1020 if v == "$" then 1021 Generator.error( "B1003 Unexpected EOF" ) 1022 else 1023 Generator.error( "B1004 syntax error near \'$1\'" , v.val ) 1024 end 1025 1026 end 1027 1028 def self.current_locale 1029 @@current_locale[ @@generator_nest ] 1030 end 1031 1032 @@n_error = 0 1033 @@n_warning = 0 1034 @@n_info = 0 1035 1036 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切) 1037 def self.error( msg ) 1038 @@n_error += 1 1039 locale = @@current_locale[ @@generator_nest ] 1040 1041 if locale then 1042 Console.puts "#{locale[0]}:#{locale[1]}: error: #{msg}" 1043 else 1044 Console.puts "error: #{msg}" 1045 end 1046 end 1047 1048 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でウォーニング発生は不適切) 1049 def self.warning( msg ) 1050 @@n_warning += 1 1051 locale = @@current_locale[ @@generator_nest ] 1052 Console.puts "#{locale[0]}:#{locale[1]}: warning: #{msg}" 1053 end 1054 1055 # このメソッドは構文解析、意味解析からのみ呼出し可 1056 def self.info( msg ) 1057 @@n_info += 1 1058 locale = @@current_locale[ @@generator_nest ] 1059 Console.puts "#{locale[0]}:#{locale[1]}: info: #{msg}" 1060 end 1061 1062 def self.get_n_error 1063 @@n_error 1064 end 1065 1066 def self.get_n_warning 1067 @@n_warning 1068 end 1069 1070 def self.get_nest 1071 @@generator_nest 1072 end 1073 1074 def set_no_type_name b_no_type_name 1075 locale = @@current_locale[ @@generator_nest ] 1076 #print "b_no_type_name=#{b_no_type_name} #{locale[0]}: line #{locale[1]}\n" 1077 @b_no_type_name = b_no_type_name 1078 end 992 1079 993 1080 ---- footer -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.tab.rb
r321 r429 1 1 # 2 2 # DO NOT MODIFY!!!! 3 # This file is automatically generated by Racc 1.4.1 23 # This file is automatically generated by Racc 1.4.14 4 4 # from Racc grammer file "". 5 5 # … … 8 8 class Generator < Racc::Parser 9 9 10 module_eval(<<'...end bnf.y.rb/module_eval...', 'bnf.y.rb', 15 04)10 module_eval(<<'...end bnf.y.rb/module_eval...', 'bnf.y.rb', 1534) 11 11 12 12 RESERVED = { … … 30 30 'import_C' => :IMPORT_C, 31 31 'generate' => :GENERATE, 32 '__tool_info__' => :TOOL_INFO, 32 33 33 34 # types … … 165 166 # すべての構文解析が完了した 166 167 @@b_end_all_parse = false 168 169 # tag なし struct 170 @@no_struct_tag_num = 0 167 171 168 172 def self.parse( file_name, plugin = nil, b_reuse = false ) … … 280 284 string += line 281 285 # この位置では error メソッドは使えない (token 読出し前) 282 puts " error: #{file} line #{lineno}: string literal has newline without escape"286 puts "#{file}:#{lineno}:#{col}: error: string literal has newline without escape" 283 287 @@n_error += 1 284 288 end … … 321 325 b_in_string = true 322 326 # この位置では error メソッドは使えない (token 読出し前) # mikan cdl_error ではない 323 puts " error: #{file} line #{lineno}: string literal has newline without escape"327 puts "#{file}:#{lineno}:#{col}: error: string literal has newline without escape" 324 328 @@n_error += 1 325 329 # 山括弧で囲まれた文字列 326 when /\A<[0-9A-Za-z_\. \/]+>/ # AB: angle bracke 330 # when /\A<[0-9A-Za-z_\. \/]+>/ # AB: angle bracke 331 when /\A<(?:[^>\\]|\\.)*>/ # これはうまく行くようだ 327 332 @q << [:AB_STRING_LITERAL, Token.new($&, file, lineno, col)] 328 333 # 行コメント … … 420 425 @@n_error = 0 421 426 @@n_warning = 0 427 @@n_info = 0 422 428 423 429 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切) … … 453 459 end 454 460 if locale then 455 Console.puts " error: #{locale[0]}: line #{locale[1]}#{msg}"461 Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: error: #{msg}" 456 462 else 457 463 Console.puts "error: #{msg}" … … 486 492 end 487 493 if locale then 488 Console.puts " warning: #{locale[0]}: line #{locale[1]}#{msg}"494 Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: warning: #{msg}" 489 495 else 490 496 Console.puts "warning: #{msg}" … … 493 499 end 494 500 501 # このメソッドは構文解析、意味解析からのみ呼出し可 502 def self.info( msg, *arg ) 503 locale = nil 504 self.info2( locale, msg, *arg ) 505 end 506 507 def self.info2( locale, msg, *arg ) 508 @@n_info += 1 509 510 msg = TECSMsg.get_info_message( msg ) 511 # $1, $2, ... を arg で置換 512 count = 1 513 arg.each{ |a| 514 str = TECSIO.str_code_convert( msg, a.to_s ) 515 msg.sub!( /\$#{count}/, str ) 516 count += 1 517 } 518 519 # import_C の中でのウォーニング? 520 if @@import_C then 521 C_parser.info( msg ) 522 else 523 if @@b_end_all_parse == false || locale == nil then 524 locale = @@current_locale[ @@generator_nest ] 525 end 526 if locale then 527 Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: info: #{msg}" 528 else 529 Console.puts "info: #{msg}" 530 end 531 end 532 end 533 495 534 def self.get_n_error 496 535 @@n_error … … 501 540 end 502 541 542 def self.get_n_info 543 @@n_info 544 end 545 503 546 def self.get_nest 504 547 @@generator_nest 548 end 549 550 def self.parsing_C? 551 @@import_C 505 552 end 506 553 … … 543 590 544 591 clist = [ 545 '65,566,323,779,733,806,77,346,347,323,77,77,77,160,194,195,196,197,198', 546 '199,200,202,174,203,664,133,860,133,99,207,208,209,210,211,212,213,663', 547 '244,831,551,394,512,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25', 548 '26,27,28,29,30,31,32,33,34,35,38,678,395,459,309,696,42,43,44,45,46', 549 '47,48,49,858,98,654,827,440,133,133,826,133,133,133,133,133,65,186,186', 550 '186,186,69,67,68,308,70,71,77,72,323,73,299,300,319,819,133,175,133', 551 '134,320,134,322,186,74,74,74,75,76,76,76,133,86,186,186,186,186,78,85', 552 '5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32', 553 '33,34,35,38,77,420,186,358,359,42,43,44,45,46,47,48,49,186,134,134,134', 554 '65,134,134,134,134,134,133,133,87,571,77,77,570,323,69,67,68,325,70', 555 '71,133,72,799,73,530,134,341,134,299,300,319,342,343,397,798,682,320', 556 '74,322,75,134,76,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26', 557 '27,28,29,30,31,32,33,34,35,38,444,48,49,352,353,42,43,44,45,46,47,48', 558 '49,328,329,509,510,65,299,300,301,186,302,303,305,306,683,606,77,134', 559 '134,69,67,68,856,70,71,272,72,607,73,77,177,134,643,299,300,319,77,77', 560 '636,203,780,320,74,322,75,684,76,5,6,7,10,13,14,15,16,17,18,19,20,21', 561 '22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,795,160,610,676,855,42', 562 '43,44,45,46,47,48,49,160,637,403,470,86,160,471,633,426,781,85,793,470', 563 '87,87,471,502,705,69,67,68,758,70,71,397,72,396,73,159,625,402,194,195', 564 '196,197,198,199,200,202,614,203,74,792,75,133,76,207,208,209,210,211', 565 '212,213,299,300,301,160,302,303,305,306,194,195,196,197,198,199,200', 566 '202,160,203,624,609,283,133,626,207,208,209,210,211,212,213,867,742', 567 '809,194,195,196,197,198,199,200,202,335,203,336,159,337,133,229,207', 568 '208,209,210,211,212,213,194,195,196,197,198,199,200,202,810,203,251', 569 '160,230,133,409,207,208,209,210,211,212,213,229,649,707,666,400,837', 570 '79,134,496,277,676,251,571,704,846,570,160,539,845,393,230,848,596,408', 571 '818,229,748,147,619,630,146,706,648,684,667,401,838,134,761,495,278', 572 '675,250,705,167,230,620,229,86,847,760,86,817,86,85,177,618,85,87,85', 573 '341,87,134,87,270,342,343,230,632,177,194,195,196,197,198,199,200,202', 574 '173,203,614,744,869,133,134,207,208,209,210,211,212,213,194,195,196', 575 '197,198,199,200,202,147,203,650,146,651,133,172,207,208,209,210,211', 576 '212,213,194,195,196,197,198,199,200,202,171,203,388,389,390,133,170', 577 '207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,169,203', 578 '388,389,390,133,659,207,208,209,210,211,212,213,348,349,350,351,194', 579 '195,196,197,198,199,200,202,168,203,583,330,660,133,134,207,208,209', 580 '210,211,212,213,194,195,196,197,198,199,200,202,661,203,344,345,165', 581 '133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202', 582 '164,203,282,283,665,133,134,207,208,209,210,211,212,213,194,195,196', 583 '197,198,199,200,202,668,203,352,353,670,133,134,207,208,209,210,211', 584 '212,213,348,349,350,351,194,195,196,197,198,199,200,202,431,203,346', 585 '347,671,133,134,207,208,209,210,211,212,213,672,448,673,376,377,378', 586 '430,432,433,434,435,431,346,347,134,371,372,373,374,375,379,229,450', 587 '451,452,449,348,349,350,351,674,430,432,433,434,435,134,341,142,143', 588 '677,230,342,343,194,195,196,197,198,199,200,202,163,203,346,347,203', 589 '133,134,207,208,209,210,211,212,213,346,347,344,345,194,195,196,197', 590 '198,199,200,202,680,203,344,345,162,133,134,207,208,209,210,211,212', 591 '213,194,195,196,197,198,199,200,202,161,203,398,330,689,133,160,207', 592 '208,209,210,211,212,213,194,195,196,197,198,199,200,202,691,203,719', 593 '510,692,133,693,207,208,209,210,211,212,213,194,195,196,197,198,199', 594 '200,202,160,203,376,377,378,133,134,207,208,209,210,211,212,213,371', 595 '372,373,374,375,379,102,103,104,105,106,107,108,109,110,111,112,695', 596 '134,697,698,699,700,703,708,229,20,21,22,23,24,25,26,27,28,29,30,31', 597 '32,33,134,711,562,74,714,230,715,716,194,195,196,197,198,199,200,202', 598 '717,203,157,744,720,133,134,207,208,209,210,211,212,213,194,195,196', 599 '197,198,199,200,202,721,203,722,599,724,133,134,207,208,209,210,211', 600 '212,213,194,195,196,197,198,199,200,202,725,203,726,728,614,133,731', 601 '207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,732,203', 602 '156,153,736,133,152,207,208,209,210,211,212,213,739,743,751,752,194', 603 '195,196,197,198,199,200,202,144,203,754,576,755,133,134,207,208,209', 604 '210,211,212,213,194,195,196,197,198,199,200,202,757,203,759,762,763', 605 '133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202', 606 '764,203,767,768,769,133,134,207,208,209,210,211,212,213,194,195,196', 607 '197,198,199,200,202,770,203,643,232,703,133,134,207,208,209,210,211', 608 '212,213,86,86,86,229,177,775,85,85,85,86,87,87,87,776,86,85,777,778', 609 '134,87,85,141,711,230,87,786,194,195,196,197,198,199,200,202,140,203', 610 '788,138,132,133,134,207,208,209,210,211,212,213,194,195,196,197,198', 611 '199,200,202,791,203,130,796,128,133,134,207,208,209,210,211,212,213', 612 '194,195,196,197,198,199,200,202,800,203,801,-383,802,133,134,207,208', 613 '209,210,211,212,213,194,195,196,197,198,199,200,202,803,203,804,124', 614 '123,133,807,207,208,209,210,211,212,213,767,203,813,816,194,195,196', 615 '197,198,199,200,202,821,203,822,94,824,133,134,207,208,209,210,211,212', 616 '213,194,195,196,197,198,199,200,202,828,203,829,830,90,133,134,207,208', 617 '209,210,211,212,213,194,195,196,197,198,199,200,202,833,203,834,89,836', 618 '133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202', 619 '798,203,839,840,323,133,134,207,208,209,210,211,212,213,842,843,844', 620 '849,194,195,196,197,198,199,200,202,850,203,851,88,857,133,134,207,208', 621 '209,210,211,212,213,194,195,196,197,198,199,200,202,357,203,356,362', 622 '363,133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200', 623 '202,365,203,366,122,861,133,134,207,208,209,210,211,212,213,194,195', 624 '196,197,198,199,200,202,3,203,156,355,399,133,134,207,208,209,210,211', 625 '212,213,404,140,406,407,194,195,196,197,198,199,200,202,410,203,411', 626 '412,413,133,134,207,208,209,210,211,212,213,194,195,196,197,198,199', 627 '200,202,414,203,415,354,862,133,134,207,208,209,210,211,212,213,194', 628 '195,196,197,198,199,200,202,438,203,439,442,453,133,134,207,208,209', 629 '210,211,212,213,194,195,196,197,198,199,200,202,330,203,456,457,186', 630 '133,134,207,208,209,210,211,212,213,464,465,466,473,194,195,196,197', 631 '198,199,200,202,474,203,307,285,284,133,134,207,208,209,210,211,212', 632 '213,194,195,196,197,198,199,200,202,281,203,280,279,276,133,134,207', 633 '208,209,210,211,212,213,194,195,196,197,198,199,200,202,275,203,274', 634 '267,177,133,134,207,208,209,210,211,212,213,194,195,196,197,198,199', 635 '200,202,265,203,203,259,203,133,134,207,208,209,210,211,212,213,156', 636 '503,504,505,194,195,196,197,198,199,200,202,506,203,507,863,513,133', 637 '134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,514', 638 '203,515,259,517,133,134,207,208,209,210,211,212,213,86,86,86,86,252', 639 '265,85,85,85,85,87,87,87,87,134,299,300,301,520,302,303,305,306,521', 640 '194,195,196,197,198,199,200,202,203,203,524,203,134,133,203,207,208', 641 '209,210,211,212,213,177,528,194,195,196,197,198,199,200,202,529,203', 642 '532,533,534,133,134,207,208,209,210,211,212,213,115,116,117,118,119', 643 '120,121,115,116,117,118,119,120,121,134,536,537,540,186,5,6,7,10,13', 644 '14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38', 645 '265,865,550,554,160,42,43,44,45,46,47,48,49,134,194,195,196,197,198', 646 '199,200,202,556,203,866,186,560,133,562,207,208,209,210,211,212,213', 647 '323,134,565,87,242,190,578,579,354,355,356,357,580,189,188,186,185,184', 648 '183,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31', 649 '32,33,34,35,38,182,181,596,597,599,42,43,44,45,46,47,48,49,194,195,196', 650 '197,198,199,200,202,600,203,330,601,603,133,604,207,208,209,210,211', 651 '212,213,605,,134,194,195,196,197,198,199,200,339,,203,,,,133,,207,208', 652 '209,210,211,212,213,194,195,196,197,198,199,200,202,,203,,685,,133,', 653 '207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,,203,,,', 654 '133,,207,208,209,210,211,212,213,,194,195,196,197,198,199,200,202,,203', 655 ',576,,133,134,207,208,209,210,211,212,213,,,,194,195,196,197,198,199', 656 '200,202,,203,,655,,133,134,207,208,209,210,211,212,213,194,195,196,197', 657 '198,199,200,202,,203,,,,133,134,207,208,209,210,211,212,213,194,195', 658 '196,197,198,199,200,202,,203,,,,133,134,207,208,209,210,211,212,213', 659 ',194,195,196,197,198,199,200,202,,203,,,,133,134,207,208,209,210,211', 660 '212,213,,,,194,195,196,197,198,199,200,202,,203,,,,133,134,207,208,209', 661 '210,211,212,213,194,195,196,197,198,199,200,202,,203,,,,133,134,207', 662 '208,209,210,211,212,213,194,195,196,197,198,199,200,202,,203,,,,133', 663 '134,207,208,209,210,211,212,213,,194,195,196,197,198,199,200,202,,203', 664 ',,,133,134,207,208,209,210,211,212,213,,,,194,195,196,197,198,199,200', 665 '202,,203,,,,133,134,207,208,209,210,211,212,213,102,103,104,105,106', 666 '107,108,109,110,111,112,,,,134,,,,,,,,,,,,,,,,,,,,,,134,,115,116,117', 667 '118,119,120,121,,,229,581,,,470,574,,573,,,,,134,,87,,,,,,230,,,,,,', 668 ',,,,,,,,,,134,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27', 669 '28,29,30,31,32,33,34,35,38,236,,77,,,42,43,44,45,46,47,48,49,,,,,,,', 670 ',,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28', 671 '29,30,31,32,33,34,35,38,657,,77,,,42,43,44,45,46,47,48,49,,,,,,,,,,', 672 ',,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29', 673 '30,31,32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,', 674 ',,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31', 675 '32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,498,,,,,,,,,,,,,,,,,,5', 592 '66,575,328,559,538,815,78,330,869,328,78,78,78,409,199,200,201,202,203', 593 '204,205,207,846,208,678,135,897,135,647,212,213,214,215,216,217,218', 594 '249,679,177,872,870,408,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24', 595 '25,26,27,28,29,30,31,32,33,34,35,38,465,189,693,333,334,42,43,44,45', 596 '46,47,48,49,896,88,644,406,666,761,711,87,135,871,135,135,135,135,189', 597 '66,189,189,70,68,69,135,71,72,328,73,78,74,304,305,324,860,901,189,407', 598 '136,325,136,327,189,75,75,75,76,77,77,77,135,874,178,189,189,189,79', 599 '875,101,80,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28', 600 '29,30,31,32,33,34,35,38,78,364,365,256,899,42,43,44,45,46,47,48,49,189', 601 '189,189,136,66,136,136,136,136,878,135,135,89,100,78,78,136,328,70,68', 602 '69,399,71,72,135,73,877,74,304,305,324,135,446,135,478,868,325,479,327', 603 '867,879,75,136,76,89,77,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24', 604 '25,26,27,28,29,30,31,32,33,34,35,38,450,48,49,314,838,42,43,44,45,46', 605 '47,48,49,135,135,839,135,66,304,305,306,135,307,308,310,311,691,838', 606 '78,136,136,70,68,69,313,71,72,275,73,880,74,78,180,136,816,304,305,324', 607 '78,881,136,136,136,325,75,327,76,690,77,5,6,7,10,13,14,15,16,17,18,19', 608 '20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,835,426,403,282,697', 609 '42,43,44,45,46,47,48,49,163,817,163,620,288,277,136,136,432,136,180', 610 '504,78,150,136,654,149,720,70,68,69,283,71,72,403,73,402,74,520,636', 611 '162,199,200,201,202,203,204,205,207,328,208,75,503,76,135,77,212,213', 612 '214,215,216,217,218,304,305,306,859,307,308,310,311,199,200,201,202', 613 '203,204,205,207,889,208,635,648,883,135,637,212,213,214,215,216,217', 614 '218,884,858,681,199,200,201,202,203,204,205,207,341,208,342,888,343', 615 '135,234,212,213,214,215,216,217,218,199,200,201,202,203,204,205,207', 616 '682,208,885,668,235,135,661,212,213,214,215,216,217,218,88,789,790,691', 617 '256,400,87,136,150,890,89,149,199,200,201,202,203,204,205,207,667,208', 618 '891,660,163,135,776,212,213,214,215,216,217,218,794,255,401,136,199', 619 '200,201,202,203,204,205,207,892,208,719,415,850,135,162,212,213,214', 620 '215,216,217,218,887,898,136,902,886,582,721,903,581,833,199,200,201', 621 '202,203,204,205,207,720,208,414,851,904,135,136,212,213,214,215,216', 622 '217,218,199,200,201,202,203,204,205,207,832,208,722,698,826,135,906', 623 '212,213,214,215,216,217,218,163,163,88,478,136,907,479,582,87,908,581', 624 '607,89,163,3,163,88,910,827,699,699,81,87,352,353,234,89,797,170,770', 625 '136,199,200,201,202,203,204,205,207,796,208,547,587,564,135,235,212', 626 '213,214,215,216,217,218,90,199,200,201,202,203,204,205,207,136,208,394', 627 '395,396,135,91,212,213,214,215,216,217,218,199,200,201,202,203,204,205', 628 '207,136,208,394,395,396,135,92,212,213,214,215,216,217,218,199,200,201', 629 '202,203,204,205,207,163,208,350,351,96,135,124,212,213,214,215,216,217', 630 '218,594,336,125,199,200,201,202,203,204,205,207,126,208,130,510,132', 631 '135,136,212,213,214,215,216,217,218,134,199,200,201,202,203,204,205', 632 '207,140,208,352,353,142,135,136,212,213,214,215,216,217,218,199,200', 633 '201,202,203,204,205,207,143,208,404,336,144,135,136,212,213,214,215', 634 '216,217,218,199,200,201,202,203,204,205,207,147,208,358,359,155,135', 635 '136,212,213,214,215,216,217,218,350,351,156,199,200,201,202,203,204', 636 '205,207,159,208,350,351,160,135,136,212,213,214,215,216,217,218,164', 637 '199,200,201,202,203,204,205,207,165,208,358,359,166,135,136,212,213', 638 '214,215,216,217,218,199,200,201,202,203,204,205,207,167,208,630,437', 639 '168,135,136,212,213,214,215,216,217,218,352,353,234,747,518,171,631', 640 '287,288,436,438,439,440,441,136,347,629,172,347,173,348,349,235,348', 641 '349,199,200,201,202,203,204,205,207,174,208,352,353,175,135,136,212', 642 '213,214,215,216,217,218,176,199,200,201,202,203,204,205,207,180,208', 643 '184,772,185,135,136,212,213,214,215,216,217,218,199,200,201,202,203', 644 '204,205,207,454,208,145,146,186,135,136,212,213,214,215,216,217,218', 645 '347,187,234,517,518,348,349,456,457,458,455,199,200,201,202,203,204', 646 '205,207,454,208,188,235,189,135,191,212,213,214,215,216,217,218,354', 647 '355,356,357,787,788,136,456,457,458,455,354,355,356,357,199,200,201', 648 '202,203,204,205,207,437,208,382,383,384,135,136,212,213,214,215,216', 649 '217,218,377,378,379,380,381,385,436,438,439,440,441,304,305,306,136', 650 '307,308,310,311,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27', 651 '28,29,30,31,32,33,34,35,38,136,354,355,356,357,42,43,44,45,46,47,48', 652 '49,199,200,201,202,203,204,205,207,192,208,352,353,193,135,196,212,213', 653 '214,215,216,217,218,247,89,136,199,200,201,202,203,204,205,207,257,208', 654 '159,264,208,135,270,212,213,214,215,216,217,218,199,200,201,202,203', 655 '204,205,207,180,208,272,279,280,135,281,212,213,214,215,216,217,218', 656 '234,284,285,286,289,290,199,200,201,202,203,204,205,207,312,208,335', 657 '189,336,135,235,212,213,214,215,216,217,218,360,199,200,201,202,203', 658 '204,205,207,136,208,361,670,362,135,363,212,213,214,215,216,217,218', 659 '199,200,201,202,203,204,205,207,368,208,369,136,371,135,372,212,213', 660 '214,215,216,217,218,159,199,200,201,202,203,204,205,207,405,208,136', 661 '587,410,135,142,212,213,214,215,216,217,218,412,413,199,200,201,202', 662 '203,204,205,207,416,208,417,418,419,135,136,212,213,214,215,216,217', 663 '218,420,199,200,201,202,203,204,205,207,421,208,444,445,448,135,136', 664 '212,213,214,215,216,217,218,199,200,201,202,203,204,205,207,459,208', 665 '462,772,463,135,136,212,213,214,215,216,217,218,470,88,234,88,382,383', 666 '384,87,472,87,473,89,474,89,481,136,377,378,379,380,381,385,235,482', 667 '208,199,200,201,202,203,204,205,207,511,208,512,513,514,135,136,212', 668 '213,214,215,216,217,218,515,199,200,201,202,203,204,205,207,521,208', 669 '522,523,264,135,136,212,213,214,215,216,217,218,199,200,201,202,203', 670 '204,205,207,525,208,270,528,529,135,136,212,213,214,215,216,217,218', 671 '199,200,201,202,203,204,205,207,208,208,532,208,208,135,180,212,213', 672 '214,215,216,217,218,536,537,540,199,200,201,202,203,204,205,207,541', 673 '208,542,544,545,135,136,212,213,214,215,216,217,218,737,738,740,741', 674 '548,189,270,558,562,196,739,737,738,740,741,136,565,189,743,742,196', 675 '739,234,592,569,88,88,571,88,743,742,87,87,88,87,89,89,136,89,87,328', 676 '574,235,89,196,199,200,201,202,203,204,205,207,589,208,590,700,360,135', 677 '136,212,213,214,215,216,217,218,361,362,472,199,200,201,202,203,204', 678 '205,207,363,208,472,591,607,135,136,212,213,214,215,216,217,218,199', 679 '200,201,202,203,204,205,207,608,208,611,336,612,135,614,212,213,214', 680 '215,216,217,218,199,200,201,202,203,204,205,207,615,208,616,617,618', 681 '135,208,212,213,214,215,216,217,218,621,737,738,740,741,163,625,88,88', 682 '641,196,739,785,87,87,136,643,89,89,743,742,625,662,663,669,674,199', 683 '200,201,202,203,204,205,207,675,208,676,680,683,135,136,212,213,214', 684 '215,216,217,218,199,200,201,202,203,204,205,207,685,208,686,687,688', 685 '135,136,212,213,214,215,216,217,218,472,104,105,106,107,108,109,110', 686 '111,112,113,114,689,189,136,692,208,695,704,5,6,7,10,13,14,15,16,17', 687 '18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,163,706,707', 688 '708,163,42,43,44,45,46,47,48,49,710,712,136,117,118,119,120,121,122', 689 '123,199,200,201,202,203,204,205,207,713,208,714,715,718,135,136,212', 690 '213,214,215,216,217,218,199,200,201,202,203,204,205,207,723,208,726', 691 '571,75,135,729,212,213,214,215,216,217,218,199,200,201,202,203,204,205', 692 '207,730,208,196,744,745,135,748,212,213,214,215,216,217,218,199,200', 693 '201,202,203,204,205,207,749,208,752,753,754,135,756,212,213,214,215', 694 '216,217,218,625,759,760,764,199,200,201,202,203,204,205,207,767,208', 695 '771,779,780,135,136,212,213,214,215,216,217,218,199,200,201,202,203', 696 '204,205,207,782,208,783,791,793,135,136,212,213,214,215,216,217,218', 697 '199,200,201,202,203,204,205,207,189,208,795,798,799,135,136,212,213', 698 '214,215,216,217,218,199,200,201,202,203,204,205,207,800,208,803,804', 699 '805,135,136,212,213,214,215,216,217,218,806,654,718,180,199,200,201', 700 '202,203,204,205,207,811,208,812,813,814,135,136,212,213,214,215,216', 701 '217,218,199,200,201,202,203,204,205,207,726,208,823,828,831,135,136', 702 '212,213,214,215,216,217,218,199,200,201,202,203,204,205,207,836,208', 703 '840,841,-386,135,136,212,213,214,215,216,217,218,199,200,201,202,203', 704 '204,205,207,842,208,843,237,844,135,136,212,213,214,215,216,217,218', 705 '848,803,208,854,199,200,201,202,203,204,205,207,857,208,862,863,865', 706 '135,136,212,213,214,215,216,217,218,199,200,201,202,203,204,205,207', 707 ',208,,,,135,136,212,213,214,215,216,217,218,199,200,201,202,203,204', 708 '205,207,,208,,,,135,136,212,213,214,215,216,217,218,199,200,201,202', 709 '203,204,205,207,,208,,,,135,136,212,213,214,215,216,217,218,88,,,,,', 710 '87,,,88,89,737,738,740,741,87,,,136,89,196,739,,,,234,,,,743,742,117', 711 '118,119,120,121,122,123,,,136,,,,,235,,,199,200,201,202,203,204,205', 712 '207,,208,,,,135,136,212,213,214,215,216,217,218,199,200,201,202,203', 713 '204,205,207,,208,472,,,135,136,212,213,214,215,216,217,218,199,200,201', 714 '202,203,204,205,345,,208,,,,135,,212,213,214,215,216,217,218,199,200', 715 '201,202,203,204,205,207,,208,,,,135,,212,213,214,215,216,217,218,,,', 716 '104,105,106,107,108,109,110,111,112,113,114,,,,,136,,,,,,,104,105,106', 717 '107,108,109,110,111,112,113,114,,,,,136,117,118,119,120,121,122,123', 718 ',,,478,585,,584,,,,,,,89,136,117,118,119,120,121,122,123,20,21,22,23', 719 '24,25,26,27,28,29,30,31,32,33,136,5,6,7,10,13,14,15,16,17,18,19,20,21', 720 '22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,672,,78,,,42,43,44,45,46', 721 '47,48,49,,,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22', 722 '23,24,25,26,27,28,29,30,31,32,33,34,35,38,241,,78,,,42,43,44,45,46,47', 723 '48,49,,,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23', 724 '24,25,26,27,28,29,30,31,32,33,34,35,38,78,,,,,42,43,44,45,46,47,48,49', 725 ',,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26', 726 '27,28,29,30,31,32,33,34,35,38,78,,,,,42,43,44,45,46,47,48,49,506,,,', 727 ',,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27', 728 '28,29,30,31,32,33,34,35,38,78,428,,,,42,43,44,45,46,47,48,49,,,,,,,', 729 ',,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28', 730 '29,30,31,32,33,34,35,38,78,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,', 731 ',,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30', 732 '31,32,33,34,35,38,78,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5', 676 733 '6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33', 677 '34,35,38, 126,381,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7',678 '1 0,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34',679 '3 5,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14',680 '15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38, 77',681 ' ,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17',682 '1 8,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,,,,,42,43',683 '4 4,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20',684 '2 1,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,422,,,,42,43,44,45',685 '4 6,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22',686 '2 3,24,25,26,27,28,29,30,31,32,33,34,35,38,77,508,,,,42,43,44,45,46,47',734 '34,35,38,78,632,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10', 735 '13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35', 736 '38,78,638,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14', 737 '15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,128', 738 '658,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16', 739 '17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,78,,,,,42', 740 '43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19', 741 '20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,78,516,,,,42,43,44', 742 '45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21', 743 '22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,78,,,,,42,43,44,45,46,47', 687 744 '48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24', 688 '25,26,27,28,29,30,31,32,33,34,35,38,7 7,,,,,42,43,44,45,46,47,48,49,',689 ',,,,,,,,,,,,,,,,, 5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26',690 '27,28,29,30,31,32,33,34,35,38,7 7,,,,,42,43,44,45,46,47,48,49,,,,,,,',745 '25,26,27,28,29,30,31,32,33,34,35,38,78,387,,,,42,43,44,45,46,47,48,49', 746 ',,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26', 747 '27,28,29,30,31,32,33,34,35,38,78,,,,,42,43,44,45,46,47,48,49,,,,,,,', 691 748 ',,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28', 692 '29,30,31,32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,', 693 ',,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30', 694 '31,32,33,34,35,38,77,621,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,', 695 ',,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31', 696 '32,33,34,35,38,77,627,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5', 697 '6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33', 698 '34,35,38,,646,,,,42,43,44,45,46,47,48,49,102,103,104,105,106,107,108', 699 '109,110,111,112,,,,,,,,,,,,,,,,,,,,,,,,,,,,115,116,117,118,119,120,121', 749 '29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14', 750 '15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,,', 751 ',,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23', 752 '24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47,48,49', 700 753 '5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32', 701 754 '33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18', … … 707 760 '23,24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47,48', 708 761 '49,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31', 709 '32,33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17', 710 '18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43', 711 '44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26', 712 '27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47' ] 713 racc_action_table = arr = ::Array.new(3597, nil) 762 '32,33,34,35,38,,,,,,42,43,44,45,46,47' ] 763 racc_action_table = arr = ::Array.new(3593, nil) 714 764 idx = 0 715 765 clist.each do |str| … … 721 771 722 772 clist = [ 723 '2,463,803,749,688,787,189,218,218,189,602,2,324,386,714,714,714,714', 724 '714,714,714,714,123,714,586,754,854,714,41,714,714,714,714,714,714,714', 725 '585,151,815,441,257,386,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2', 726 '2,2,2,2,2,2,602,257,324,187,631,2,2,2,2,2,2,2,2,854,41,567,810,303,298', 727 '550,810,90,620,328,74,320,286,749,688,787,463,2,2,2,187,2,2,286,2,555', 728 '2,189,189,189,803,799,123,504,754,189,714,189,586,602,2,324,2,602,2', 729 '324,503,83,815,441,585,151,2,83,286,286,286,286,286,286,286,286,286', 730 '286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286', 731 '286,286,184,286,631,225,225,286,286,286,286,286,286,286,286,567,303', 732 '298,550,158,90,620,328,74,320,281,706,87,469,310,158,469,310,286,286', 733 '286,191,286,286,464,286,776,286,416,799,480,504,555,555,555,480,480', 734 '614,776,614,555,286,555,286,503,286,158,158,158,158,158,158,158,158', 735 '158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158', 736 '158,158,158,310,87,87,220,220,158,158,158,158,158,158,158,158,191,191', 737 '383,383,182,184,184,184,416,184,184,184,184,615,528,182,281,706,158', 738 '158,158,852,158,158,169,158,529,158,553,169,464,553,310,310,310,289', 739 '750,552,530,750,310,158,310,158,615,158,182,182,182,182,182,182,182', 740 '182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182', 741 '182,182,182,182,772,369,535,723,852,182,182,182,182,182,182,182,182', 742 '100,553,264,334,125,536,334,552,289,750,125,765,468,334,125,468,369', 743 '772,182,182,182,723,182,182,259,182,259,182,100,545,264,705,705,705', 744 '705,705,705,705,705,540,705,182,765,182,705,182,705,705,705,705,705', 745 '705,705,289,289,289,701,289,289,289,289,761,761,761,761,761,761,761', 746 '761,564,761,545,531,531,761,545,761,761,761,761,761,761,761,865,701', 747 '794,760,760,760,760,760,760,760,760,205,760,205,564,205,760,705,760', 748 '760,760,760,760,760,760,720,720,720,720,720,720,720,720,794,720,253', 749 '428,705,720,273,720,720,720,720,720,720,720,761,559,645,588,262,825', 750 '3,705,360,173,598,154,569,642,838,569,113,428,838,253,761,839,728,273', 751 '801,760,705,145,541,549,145,642,559,645,588,262,825,761,728,360,173', 752 '598,154,642,113,760,541,720,681,839,728,510,801,283,681,124,541,510', 753 '681,283,479,510,760,283,168,479,479,720,551,168,704,704,704,704,704', 754 '704,704,704,122,704,556,704,868,704,720,704,704,704,704,704,704,704', 755 '699,699,699,699,699,699,699,699,84,699,561,84,563,699,121,699,699,699', 756 '699,699,699,699,695,695,695,695,695,695,695,695,120,695,512,512,512', 757 '695,117,695,695,695,695,695,695,695,691,691,691,691,691,691,691,691', 758 '116,691,249,249,249,691,572,691,691,691,691,691,691,691,219,219,219', 759 '219,667,667,667,667,667,667,667,667,115,667,497,497,575,667,704,667', 760 '667,667,667,667,667,667,285,285,285,285,285,285,285,285,577,285,217', 761 '217,112,285,699,285,285,285,285,285,285,285,252,252,252,252,252,252', 762 '252,252,108,252,178,178,587,252,695,252,252,252,252,252,252,252,229', 763 '229,229,229,229,229,229,229,589,229,489,489,593,229,691,229,229,229', 764 '229,229,229,229,488,488,488,488,861,861,861,861,861,861,861,861,539', 765 '861,486,486,594,861,667,861,861,861,861,861,861,861,595,313,596,241', 766 '241,241,539,539,539,539,539,292,485,485,285,241,241,241,241,241,241', 767 '229,313,313,313,313,487,487,487,487,597,292,292,292,292,292,252,216', 768 '80,80,600,229,216,216,848,848,848,848,848,848,848,848,106,848,484,484', 769 '605,848,229,848,848,848,848,848,848,848,483,483,482,482,821,821,821', 770 '821,821,821,821,821,608,821,481,481,104,821,861,821,821,821,821,821', 771 '821,821,818,818,818,818,818,818,818,818,102,818,260,260,621,818,623', 772 '818,818,818,818,818,818,818,807,807,807,807,807,807,807,807,625,807', 773 '669,669,626,807,627,807,807,807,807,807,807,807,798,798,798,798,798', 774 '798,798,798,629,798,502,502,502,798,848,798,798,798,798,798,798,798', 775 '502,502,502,502,502,502,159,159,159,159,159,159,159,159,159,159,159', 776 '630,821,632,633,635,637,640,646,807,36,36,36,36,36,36,36,36,36,36,36', 777 '36,36,36,818,650,651,652,653,807,654,656,795,795,795,795,795,795,795', 778 '795,658,795,99,795,673,795,807,795,795,795,795,795,795,795,786,786,786', 779 '786,786,786,786,786,674,786,676,677,678,786,798,786,786,786,786,786', 780 '786,786,775,775,775,775,775,775,775,775,679,775,680,682,684,775,685', 781 '775,775,775,775,775,775,775,770,770,770,770,770,770,770,770,686,770', 782 '98,93,692,770,92,770,770,770,770,770,770,770,696,703,710,712,471,471', 783 '471,471,471,471,471,471,82,471,715,471,718,471,795,471,471,471,471,471', 784 '471,471,144,144,144,144,144,144,144,144,721,144,727,732,733,144,786', 785 '144,144,144,144,144,144,144,466,466,466,466,466,466,466,466,735,466', 786 '736,738,739,466,775,466,466,466,466,466,466,466,146,146,146,146,146', 787 '146,146,146,740,146,741,146,742,146,770,146,146,146,146,146,146,146', 788 '240,86,4,144,743,744,240,86,4,591,240,86,4,745,418,591,747,748,471,591', 789 '418,78,752,144,418,753,867,867,867,867,867,867,867,867,76,867,757,75', 790 '73,867,144,867,867,867,867,867,867,867,397,397,397,397,397,397,397,397', 791 '763,397,72,774,71,397,466,397,397,397,397,397,397,397,359,359,359,359', 792 '359,359,359,359,778,359,779,780,781,359,146,359,359,359,359,359,359', 793 '359,358,358,358,358,358,358,358,358,784,358,785,69,68,358,788,358,358', 794 '358,358,358,358,358,793,796,797,800,357,357,357,357,357,357,357,357', 795 '805,357,806,38,809,357,867,357,357,357,357,357,357,357,163,163,163,163', 796 '163,163,163,163,811,163,812,814,16,163,397,163,163,163,163,163,163,163', 797 '356,356,356,356,356,356,356,356,819,356,820,9,822,356,359,356,356,356', 798 '356,356,356,356,355,355,355,355,355,355,355,355,828,355,831,832,833', 799 '355,358,355,355,355,355,355,355,355,835,836,837,840,354,354,354,354', 800 '354,354,354,354,841,354,842,8,853,354,357,354,354,354,354,354,354,354', 801 '353,353,353,353,353,353,353,353,224,353,223,230,231,353,163,353,353', 802 '353,353,353,353,353,352,352,352,352,352,352,352,352,235,352,237,67,856', 803 '352,356,352,352,352,352,352,352,352,351,351,351,351,351,351,351,351', 804 '1,351,251,222,261,351,355,351,351,351,351,351,351,351,266,267,269,271', 805 '350,350,350,350,350,350,350,350,275,350,276,277,278,350,354,350,350', 806 '350,350,350,350,350,349,349,349,349,349,349,349,349,279,349,280,221', 807 '857,349,353,349,349,349,349,349,349,349,348,348,348,348,348,348,348', 808 '348,301,348,302,304,319,348,352,348,348,348,348,348,348,348,347,347', 809 '347,347,347,347,347,347,201,347,321,322,193,347,351,347,347,347,347', 810 '347,347,347,329,331,332,336,346,346,346,346,346,346,346,346,337,346', 811 '186,181,180,346,350,346,346,346,346,346,346,346,345,345,345,345,345', 812 '345,345,345,176,345,175,174,172,345,349,345,345,345,345,345,345,345', 813 '344,344,344,344,344,344,344,344,171,344,170,166,165,344,348,344,344', 814 '344,344,344,344,344,343,343,343,343,343,343,343,343,164,343,162,161', 815 '362,343,347,343,343,343,343,343,343,343,157,374,375,376,342,342,342', 816 '342,342,342,342,342,377,342,378,860,388,342,346,342,342,342,342,342', 817 '342,342,341,341,341,341,341,341,341,341,389,341,390,395,396,341,345', 818 '341,341,341,341,341,341,341,424,367,248,143,156,401,424,367,248,143', 819 '424,367,248,143,344,538,538,538,402,538,538,538,538,403,335,335,335', 820 '335,335,335,335,335,404,335,405,406,343,335,407,335,335,335,335,335', 821 '335,335,408,410,339,339,339,339,339,339,339,339,413,339,419,420,422', 822 '339,342,339,339,339,339,339,339,339,255,255,255,255,255,255,255,167', 823 '167,167,167,167,167,167,341,425,426,431,436,339,339,339,339,339,339', 824 '339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339', 825 '339,339,339,339,339,437,863,440,444,446,339,339,339,339,339,339,339', 826 '339,335,202,202,202,202,202,202,202,202,448,202,864,454,455,202,456', 827 '202,202,202,202,202,202,202,457,339,459,149,148,139,472,475,490,491', 828 '492,493,494,137,136,135,134,131,129,202,202,202,202,202,202,202,202', 829 '202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202', 830 '202,202,202,127,126,517,518,520,202,202,202,202,202,202,202,202,206', 831 '206,206,206,206,206,206,206,521,206,522,523,525,206,526,206,206,206', 832 '206,206,206,206,527,,202,207,207,207,207,207,207,207,207,,207,,,,207', 833 ',207,207,207,207,207,207,207,619,619,619,619,619,619,619,619,,619,,619', 834 ',619,,619,619,619,619,619,619,619,580,580,580,580,580,580,580,580,,580', 835 ',,,580,,580,580,580,580,580,580,580,,573,573,573,573,573,573,573,573', 836 ',573,,573,,573,206,573,573,573,573,573,573,573,,,,570,570,570,570,570', 837 '570,570,570,,570,,570,,570,207,570,570,570,570,570,570,570,566,566,566', 838 '566,566,566,566,566,,566,,,,566,619,566,566,566,566,566,566,566,515', 839 '515,515,515,515,515,515,515,,515,,,,515,580,515,515,515,515,515,515', 840 '515,,514,514,514,514,514,514,514,514,,514,,,,514,573,514,514,514,514', 841 '514,514,514,,,,513,513,513,513,513,513,513,513,,513,,,,513,570,513,513', 842 '513,513,513,513,513,507,507,507,507,507,507,507,507,,507,,,,507,566', 843 '507,507,507,507,507,507,507,506,506,506,506,506,506,506,506,,506,,,', 844 '506,515,506,506,506,506,506,506,506,,505,505,505,505,505,505,505,505', 845 ',505,,,,505,514,505,505,505,505,505,505,505,,,,496,496,496,496,496,496', 846 '496,496,,496,,,,496,513,496,496,496,496,496,496,496,458,458,458,458', 847 '458,458,458,458,458,458,458,,,,507,,,,,,,,,,,,,,,,,,,,,,506,,458,458', 848 '458,458,458,458,458,,,496,496,,,470,470,,470,,,,,505,,470,,,,,,496,', 849 ',,,,,,,,,,,,,,,496,470,470,470,470,470,470,470,470,470,470,470,470,470', 850 '470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,147,,147', 851 ',,470,470,470,470,470,470,470,470,,,,,,,,,,,,,,,,,,,,,147,147,147,147', 852 '147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147', 853 '147,147,147,147,147,147,147,571,,571,,,147,147,147,147,147,147,147,147', 854 ',,,,,,,,,,,,,,,,,,,,571,571,571,571,571,571,571,571,571,571,571,571', 855 '571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,366', 856 ',,,,571,571,571,571,571,571,571,571,,,,,,,,,,,,,,,,,,,366,366,366,366', 857 '366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366', 858 '366,366,366,366,366,366,366,246,,,,,366,366,366,366,366,366,366,366', 859 '366,,,,,,,,,,,,,,,,,,246,246,246,246,246,246,246,246,246,246,246,246', 860 '246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,70,246', 861 ',,,246,246,246,246,246,246,246,246,,,,,,,,,,,,,,,,,,,70,70,70,70,70', 862 '70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70', 863 '153,,,,,70,70,70,70,70,70,70,70,,,,,,,,,,,,,,,,,,,153,153,153,153,153', 864 '153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153', 865 '153,153,153,153,153,153,245,,,,,153,153,153,153,153,153,153,153,,,,', 866 ',,,,,,,,,,,,,,245,245,245,245,245,245,245,245,245,245,245,245,245,245', 867 '245,245,245,245,245,245,245,245,245,245,245,245,245,245,288,,,,,245', 868 '245,245,245,245,245,245,245,,,,,,,,,,,,,,,,,,,288,288,288,288,288,288', 869 '288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288', 870 '288,288,288,288,288,380,288,,,,288,288,288,288,288,288,288,288,,,,,', 871 ',,,,,,,,,,,,,380,380,380,380,380,380,380,380,380,380,380,380,380,380', 872 '380,380,380,380,380,380,380,380,380,380,380,380,380,380,438,380,,,,380', 873 '380,380,380,380,380,380,380,,,,,,,,,,,,,,,,,,,438,438,438,438,438,438', 874 '438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438', 875 '438,438,438,438,438,439,,,,,438,438,438,438,438,438,438,438,,,,,,,,', 876 ',,,,,,,,,,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439', 877 '439,439,439,439,439,439,439,439,439,439,439,439,439,453,,,,,439,439', 878 '439,439,439,439,439,439,,,,,,,,,,,,,,,,,,,453,453,453,453,453,453,453', 879 '453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453', 880 '453,453,453,453,542,,,,,453,453,453,453,453,453,453,453,,,,,,,,,,,,', 881 ',,,,,,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542', 882 '542,542,542,542,542,542,542,542,542,542,542,542,546,542,,,,542,542,542', 883 '542,542,542,542,542,,,,,,,,,,,,,,,,,,,546,546,546,546,546,546,546,546', 884 '546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546', 885 '546,546,546,557,546,,,,546,546,546,546,546,546,546,546,,,,,,,,,,,,,', 886 ',,,,,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557', 887 '557,557,557,557,557,557,557,557,557,557,557,557,,557,,,,557,557,557', 888 '557,557,557,557,557,53,53,53,53,53,53,53,53,53,53,53,,,,,,,,,,,,,,,', 889 ',,,,,,,,,,,,53,53,53,53,53,53,53,694,694,694,694,694,694,694,694,694', 890 '694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694', 891 '694,694,,,,,,694,694,694,694,694,694,694,694,690,690,690,690,690,690', 892 '690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690', 893 '690,690,690,690,690,,,,,,690,690,690,690,690,690,690,690,239,239,239', 894 '239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239', 895 '239,239,239,239,239,239,239,239,,,,,,239,239,239,239,239,239,239,239', 896 '40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40', 897 '40,40,40,40,40,,,,,,40,40,40,40,40,40,40,40,284,284,284,284,284,284', 898 '284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284', 899 '284,284,284,284,284,,,,,,284,284,284,284,284,284,284,284,511,511,511', 900 '511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511', 901 '511,511,511,511,511,511,511,511,,,,,,511,511,511,511,511,511,511,511', 902 '611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611', 903 '611,611,611,611,611,611,611,611,611,611,611,,,,,,611,611,611,611,611', 904 '611,611,611,234,234,234,234,234,234,234,234,234,234,234,234,234,234', 905 '234,234,234,234,234,234,234,234,234,234,234,234,234,234,,,,,,234,234', 906 '234,234,234,234' ] 907 racc_action_check = arr = ::Array.new(3597, nil) 773 '2,469,843,447,422,777,192,194,852,192,329,2,613,269,515,515,515,515', 774 '515,515,515,515,824,515,596,325,893,515,560,515,515,515,515,515,515', 775 '515,154,597,125,856,853,269,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2', 776 '2,2,2,2,2,2,2,2,329,422,613,194,194,2,2,2,2,2,2,2,2,893,85,560,267,576', 777 '703,642,85,721,855,631,558,528,511,447,161,777,469,2,2,2,92,2,2,563', 778 '2,161,2,192,192,192,843,895,824,267,325,192,515,192,596,329,2,613,2', 779 '329,2,613,75,860,125,856,154,597,2,861,41,2,161,161,161,161,161,161', 780 '161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161', 781 '161,161,161,161,161,187,230,230,258,895,161,161,161,161,161,161,161', 782 '161,576,703,642,721,185,631,558,528,511,866,691,303,89,41,315,185,92', 783 '315,161,161,161,258,161,161,333,161,863,161,563,563,563,286,308,782', 784 '340,851,563,340,563,851,866,161,75,161,340,161,185,185,185,185,185,185', 785 '185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185', 786 '185,185,185,185,185,315,89,89,190,869,185,185,185,185,185,185,185,185', 787 '839,470,812,692,291,187,187,187,512,187,187,187,187,609,812,291,691', 788 '303,185,185,185,190,185,185,171,185,872,185,778,171,333,778,315,315', 789 '315,294,873,286,308,782,315,185,315,185,609,185,291,291,291,291,291', 790 '291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291', 791 '291,291,291,291,291,291,808,291,625,176,625,291,291,291,291,291,291', 792 '291,291,392,778,573,539,539,172,839,470,294,692,172,366,561,86,512,561', 793 '86,808,291,291,291,176,291,291,264,291,264,291,392,553,573,720,720,720', 794 '720,720,720,720,720,874,720,291,366,291,720,291,720,720,720,720,720', 795 '720,720,294,294,294,841,294,294,294,294,902,902,902,902,902,902,902', 796 '902,880,902,553,561,876,902,553,902,902,902,902,902,902,902,877,841', 797 '599,889,889,889,889,889,889,889,889,210,889,210,880,210,889,720,889', 798 '889,889,889,889,889,889,521,521,521,521,521,521,521,521,599,521,878', 799 '577,720,521,568,521,521,521,521,521,521,521,430,743,743,751,157,262', 800 '430,720,148,881,430,148,522,522,522,522,522,522,522,522,577,522,882', 801 '568,102,522,720,522,522,522,522,522,522,522,751,157,262,902,523,523', 802 '523,523,523,523,523,523,883,523,653,278,834,523,102,523,523,523,523', 803 '523,523,523,879,894,889,897,879,580,653,898,580,801,234,234,234,234', 804 '234,234,234,234,653,234,278,834,901,234,521,234,234,234,234,234,234', 805 '234,166,166,166,166,166,166,166,166,801,166,657,626,784,166,904,166', 806 '166,166,166,166,166,166,115,716,518,476,522,905,476,477,518,906,477', 807 '756,518,434,1,452,127,909,784,657,626,3,127,494,494,234,127,756,115', 808 '716,523,479,479,479,479,479,479,479,479,756,479,434,479,452,479,234', 809 '479,479,479,479,479,479,479,8,358,358,358,358,358,358,358,358,234,358', 810 '520,520,520,358,9,358,358,358,358,358,358,358,363,363,363,363,363,363', 811 '363,363,166,363,254,254,254,363,16,363,363,363,363,363,363,363,360,360', 812 '360,360,360,360,360,360,375,360,222,222,38,360,68,360,360,360,360,360', 813 '360,360,505,505,69,361,361,361,361,361,361,361,361,70,361,72,375,73', 814 '361,479,361,361,361,361,361,361,361,74,682,682,682,682,682,682,682,682', 815 '76,682,223,223,77,682,358,682,682,682,682,682,682,682,862,862,862,862', 816 '862,862,862,862,79,862,265,265,80,862,363,862,862,862,862,862,862,862', 817 '362,362,362,362,362,362,362,362,84,362,225,225,94,362,360,362,362,362', 818 '362,362,362,362,489,489,95,797,797,797,797,797,797,797,797,100,797,490', 819 '490,101,797,361,797,797,797,797,797,797,797,104,811,811,811,811,811', 820 '811,811,811,106,811,497,497,108,811,682,811,811,811,811,811,811,811', 821 '838,838,838,838,838,838,838,838,110,838,549,297,114,838,862,838,838', 822 '838,838,838,838,838,491,491,797,684,684,117,549,181,181,297,297,297', 823 '297,297,362,487,549,118,221,119,487,487,797,221,221,796,796,796,796', 824 '796,796,796,796,122,796,492,492,123,796,797,796,796,796,796,796,796', 825 '796,124,835,835,835,835,835,835,835,835,126,835,128,835,129,835,811', 826 '835,835,835,835,835,835,835,514,514,514,514,514,514,514,514,318,514', 827 '82,82,131,514,838,514,514,514,514,514,514,514,488,133,796,389,389,488', 828 '488,318,318,318,318,823,823,823,823,823,823,823,823,564,823,136,796', 829 '137,823,138,823,823,823,823,823,823,823,495,495,495,495,742,742,796', 830 '564,564,564,564,224,224,224,224,207,207,207,207,207,207,207,207,547', 831 '207,510,510,510,207,835,207,207,207,207,207,207,207,510,510,510,510', 832 '510,510,547,547,547,547,547,546,546,546,514,546,546,546,546,207,207', 833 '207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207', 834 '207,207,207,207,207,207,207,207,207,823,496,496,496,496,207,207,207', 835 '207,207,207,207,207,748,748,748,748,748,748,748,748,139,748,493,493', 836 '141,748,144,748,748,748,748,748,748,748,151,152,207,859,859,859,859', 837 '859,859,859,859,159,859,160,164,165,859,167,859,859,859,859,859,859', 838 '859,575,575,575,575,575,575,575,575,168,575,169,173,174,575,175,575', 839 '575,575,575,575,575,575,748,177,178,179,183,184,257,257,257,257,257', 840 '257,257,257,189,257,195,198,206,257,748,257,257,257,257,257,257,257', 841 '226,581,581,581,581,581,581,581,581,748,581,227,581,228,581,229,581', 842 '581,581,581,581,581,581,729,729,729,729,729,729,729,729,235,729,236', 843 '859,240,729,242,729,729,729,729,729,729,729,256,584,584,584,584,584', 844 '584,584,584,266,584,575,584,271,584,272,584,584,584,584,584,584,584', 845 '274,276,147,147,147,147,147,147,147,147,280,147,281,282,283,147,257', 846 '147,147,147,147,147,147,147,284,591,591,591,591,591,591,591,591,285', 847 '591,306,307,309,591,581,591,591,591,591,591,591,591,719,719,719,719', 848 '719,719,719,719,324,719,326,719,327,719,729,719,719,719,719,719,719', 849 '719,334,288,147,602,246,246,246,288,335,602,337,288,338,602,342,584', 850 '246,246,246,246,246,246,147,343,368,714,714,714,714,714,714,714,714', 851 '380,714,381,382,383,714,147,714,714,714,714,714,714,714,384,710,710', 852 '710,710,710,710,710,710,394,710,395,396,401,710,591,710,710,710,710', 853 '710,710,710,706,706,706,706,706,706,706,706,402,706,407,408,409,706', 854 '719,706,706,706,706,706,706,706,504,504,504,504,504,504,504,504,410', 855 '504,411,412,413,504,414,504,504,504,504,504,504,504,416,419,425,365', 856 '365,365,365,365,365,365,365,426,365,428,431,432,365,714,365,365,365', 857 '365,365,365,365,827,827,827,827,437,442,443,446,450,827,827,783,783', 858 '783,783,710,454,460,827,827,783,783,504,504,461,4,696,462,373,783,783', 859 '4,696,146,373,4,696,706,373,146,463,465,504,146,472,630,630,630,630', 860 '630,630,630,630,480,630,483,630,498,630,504,630,630,630,630,630,630', 861 '630,499,500,827,364,364,364,364,364,364,364,364,501,364,783,502,525', 862 '364,365,364,364,364,364,364,364,364,908,908,908,908,908,908,908,908', 863 '526,908,529,530,531,908,533,908,908,908,908,908,908,908,341,341,341', 864 '341,341,341,341,341,534,341,535,536,537,341,538,341,341,341,341,341', 865 '341,341,543,739,739,739,739,544,548,88,424,557,739,739,739,88,424,630', 866 '559,88,424,739,739,565,570,572,578,583,347,347,347,347,347,347,347,347', 867 '586,347,588,598,600,347,364,347,347,347,347,347,347,347,345,345,345', 868 '345,345,345,345,345,604,345,605,606,607,345,908,345,345,345,345,345', 869 '345,345,739,162,162,162,162,162,162,162,162,162,162,162,608,610,341', 870 '611,616,619,632,345,345,345,345,345,345,345,345,345,345,345,345,345', 871 '345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,634,636', 872 '637,638,640,345,345,345,345,345,345,345,345,641,643,347,260,260,260', 873 '260,260,260,260,348,348,348,348,348,348,348,348,644,348,646,648,651', 874 '348,345,348,348,348,348,348,348,348,349,349,349,349,349,349,349,349', 875 '658,349,662,663,664,349,665,349,349,349,349,349,349,349,350,350,350', 876 '350,350,350,350,350,666,350,668,671,673,350,688,350,350,350,350,350', 877 '350,350,351,351,351,351,351,351,351,351,689,351,693,694,695,351,697', 878 '351,351,351,351,351,351,351,699,700,701,707,352,352,352,352,352,352', 879 '352,352,711,352,718,725,727,352,348,352,352,352,352,352,352,352,353', 880 '353,353,353,353,353,353,353,730,353,731,746,749,353,349,353,353,353', 881 '353,353,353,353,354,354,354,354,354,354,354,354,750,354,755,760,761', 882 '354,350,354,354,354,354,354,354,354,355,355,355,355,355,355,355,355', 883 '763,355,764,766,767,355,351,355,355,355,355,355,355,355,768,769,770', 884 '771,356,356,356,356,356,356,356,356,772,356,773,775,776,356,352,356', 885 '356,356,356,356,356,356,357,357,357,357,357,357,357,357,780,357,781', 886 '793,799,357,353,357,357,357,357,357,357,357,359,359,359,359,359,359', 887 '359,359,810,359,814,815,816,359,354,359,359,359,359,359,359,359,149', 888 '149,149,149,149,149,149,149,817,149,821,149,822,149,355,149,149,149', 889 '149,149,149,149,828,833,836,837,474,474,474,474,474,474,474,474,840', 890 '474,845,846,850,474,356,474,474,474,474,474,474,474,290,290,290,290', 891 '290,290,290,290,,290,,,,290,357,290,290,290,290,290,290,290,848,848', 892 '848,848,848,848,848,848,,848,,,,848,359,848,848,848,848,848,848,848', 893 '806,806,806,806,806,806,806,806,,806,,,,806,149,806,806,806,806,806', 894 '806,806,245,,,,,,245,,,253,245,669,669,669,669,253,,,474,253,669,669', 895 ',,,848,,,,669,669,170,170,170,170,170,170,170,,,290,,,,,848,,,403,403', 896 '403,403,403,403,403,403,,403,,,,403,848,403,403,403,403,403,403,403', 897 '513,513,513,513,513,513,513,513,,513,669,,,513,806,513,513,513,513,513', 898 '513,513,212,212,212,212,212,212,212,212,,212,,,,212,,212,212,212,212', 899 '212,212,212,211,211,211,211,211,211,211,211,,211,,,,211,,211,211,211', 900 '211,211,211,211,,,,464,464,464,464,464,464,464,464,464,464,464,,,,,403', 901 ',,,,,,54,54,54,54,54,54,54,54,54,54,54,,,,,513,464,464,464,464,464,464', 902 '464,,,,478,478,,478,,,,,,,478,212,54,54,54,54,54,54,54,36,36,36,36,36', 903 '36,36,36,36,36,36,36,36,36,211,478,478,478,478,478,478,478,478,478,478', 904 '478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478', 905 '478,582,,582,,,478,478,478,478,478,478,478,478,,,,,,,,,,,,,,,,,,,,,582', 906 '582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582', 907 '582,582,582,582,582,582,582,582,582,582,150,,150,,,582,582,582,582,582', 908 '582,582,582,,,,,,,,,,,,,,,,,,,,,150,150,150,150,150,150,150,150,150', 909 '150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150', 910 '150,150,372,,,,,150,150,150,150,150,150,150,150,,,,,,,,,,,,,,,,,,,372', 911 '372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372', 912 '372,372,372,372,372,372,372,372,372,372,293,,,,,372,372,372,372,372', 913 '372,372,372,372,,,,,,,,,,,,,,,,,,293,293,293,293,293,293,293,293,293', 914 '293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293', 915 '293,293,444,293,,,,293,293,293,293,293,293,293,293,,,,,,,,,,,,,,,,,', 916 ',444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444', 917 '444,444,444,444,444,444,444,444,444,444,444,445,,,,,444,444,444,444', 918 '444,444,444,444,,,,,,,,,,,,,,,,,,,445,445,445,445,445,445,445,445,445', 919 '445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445', 920 '445,445,550,,,,,445,445,445,445,445,445,445,445,,,,,,,,,,,,,,,,,,,550', 921 '550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550', 922 '550,550,550,550,550,550,550,550,550,550,554,550,,,,550,550,550,550,550', 923 '550,550,550,,,,,,,,,,,,,,,,,,,554,554,554,554,554,554,554,554,554,554', 924 '554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554', 925 '554,566,554,,,,554,554,554,554,554,554,554,554,,,,,,,,,,,,,,,,,,,566', 926 '566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566', 927 '566,566,566,566,566,566,566,566,566,566,71,566,,,,566,566,566,566,566', 928 '566,566,566,,,,,,,,,,,,,,,,,,,71,71,71,71,71,71,71,71,71,71,71,71,71', 929 '71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,386,,,,,71,71,71,71,71', 930 '71,71,71,,,,,,,,,,,,,,,,,,,386,386,386,386,386,386,386,386,386,386,386', 931 '386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386', 932 '459,386,,,,386,386,386,386,386,386,386,386,,,,,,,,,,,,,,,,,,,459,459', 933 '459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459', 934 '459,459,459,459,459,459,459,459,459,251,,,,,459,459,459,459,459,459', 935 '459,459,,,,,,,,,,,,,,,,,,,251,251,251,251,251,251,251,251,251,251,251', 936 '251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251', 937 '250,251,,,,251,251,251,251,251,251,251,251,,,,,,,,,,,,,,,,,,,250,250', 938 '250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250', 939 '250,250,250,250,250,250,250,250,250,156,,,,,250,250,250,250,250,250', 940 '250,250,,,,,,,,,,,,,,,,,,,156,156,156,156,156,156,156,156,156,156,156', 941 '156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156', 942 ',,,,,156,156,156,156,156,156,156,156,622,622,622,622,622,622,622,622', 943 '622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622', 944 '622,622,622,,,,,,622,622,622,622,622,622,622,622,40,40,40,40,40,40,40', 945 '40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,,,,,', 946 '40,40,40,40,40,40,40,40,705,705,705,705,705,705,705,705,705,705,705', 947 '705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705', 948 ',,,,,705,705,705,705,705,705,705,705,244,244,244,244,244,244,244,244', 949 '244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244', 950 '244,244,244,,,,,,244,244,244,244,244,244,244,244,519,519,519,519,519', 951 '519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519', 952 '519,519,519,519,519,519,,,,,,519,519,519,519,519,519,519,519,709,709', 953 '709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709', 954 '709,709,709,709,709,709,709,709,709,,,,,,709,709,709,709,709,709,709', 955 '709,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289', 956 '289,289,289,289,289,289,289,289,289,289,289,289,,,,,,289,289,289,289', 957 '289,289,289,289,239,239,239,239,239,239,239,239,239,239,239,239,239', 958 '239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,,,,,,239', 959 '239,239,239,239,239' ] 960 racc_action_check = arr = ::Array.new(3593, nil) 908 961 idx = 0 909 962 clist.each do |str| … … 915 968 916 969 racc_action_pointer = [ 917 nil, 1429, -1, 489, 1138, nil, nil, nil, 1326, 1278,918 nil, nil, nil, nil, nil, nil, 1288, nil, nil, nil,970 nil, 613, -1, 620, 1492, nil, nil, nil, 612, 627, 971 nil, nil, nil, nil, nil, nil, 680, nil, nil, nil, 919 972 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 920 nil, nil, nil, nil, nil, nil, 889, nil, 1259, nil, 921 3351, 13, nil, nil, nil, nil, nil, nil, nil, nil, 922 nil, nil, nil, 3134, nil, nil, nil, nil, nil, nil, 923 nil, nil, nil, nil, nil, nil, nil, 1401, 1240, 1239, 924 2552, 1190, 1188, 1168, 79, 1167, 1164, nil, 1095, nil, 925 757, nil, 1023, 122, 574, nil, 1137, 172, nil, nil, 926 76, nil, 974, 971, nil, nil, nil, nil, 1026, 904, 927 340, nil, 850, nil, 832, nil, 802, nil, 688, nil, 928 nil, nil, 670, 486, nil, 644, 618, 602, nil, nil, 929 596, 580, 550, 11, 523, 348, 1803, 1804, nil, 1775, 930 nil, 1774, nil, nil, 1829, 1735, 1827, 1770, nil, 1762, 931 nil, nil, nil, 1669, 1077, 501, 1121, 2314, 1822, 1812, 932 nil, 27, nil, 2611, 453, nil, 1637, 1612, 182, 831, 933 nil, 1601, 1604, 1283, 1598, 1580, 1465, 1622, 537, 280, 934 1578, 1576, 1558, 482, 1562, 1561, 1528, nil, 659, nil, 935 1538, 1541, 269, nil, 154, nil, 1534, 33, nil, -6, 936 nil, 128, nil, 1417, nil, nil, nil, nil, nil, nil, 937 nil, 1510, 1804, nil, nil, 435, 1886, 1911, nil, nil, 938 nil, nil, nil, nil, nil, nil, 777, 657, -19, 613, 939 224, 1462, 1398, 1352, 1349, 132, nil, nil, nil, 709, 940 1379, 1376, nil, nil, 3515, 1397, nil, 1368, nil, 3310, 941 1136, 689, nil, nil, nil, 2670, 2493, nil, 1668, 556, 942 nil, 1416, 687, 430, nil, 1615, nil, 30, nil, 365, 943 851, 1423, 477, nil, 341, nil, 1402, 1429, nil, 1404, 944 nil, 1405, nil, 465, nil, 1414, 1447, 1418, 1448, 1437, 945 1439, 174, nil, 527, 3392, 665, 95, nil, 2729, 289, 946 nil, nil, 678, nil, nil, nil, nil, nil, 73, nil, 947 nil, 1428, 1430, 72, 1431, nil, nil, nil, nil, nil, 948 181, nil, nil, 668, nil, nil, nil, nil, nil, 1432, 949 80, 1395, 1510, nil, 0, nil, nil, nil, 78, 1526, 950 nil, 1526, 1527, nil, 347, 1697, 1523, 1532, nil, 1721, 951 nil, 1651, 1629, 1603, 1581, 1559, 1537, 1511, 1489, 1467, 952 1445, 1419, 1397, 1375, 1353, 1327, 1305, 1261, 1235, 1213, 953 450, nil, 1606, nil, nil, nil, 2434, 1667, nil, 328, 954 nil, nil, nil, nil, 1619, 1620, 1621, 1630, 1632, nil, 955 2788, nil, nil, 228, nil, nil, 0, nil, 1634, 1652, 956 1654, nil, nil, nil, nil, 1649, 1650, 1191, nil, nil, 957 nil, 1665, 1622, 1683, 1696, 1638, 1699, 1702, 1706, nil, 958 1711, nil, nil, 1721, nil, nil, 166, nil, 1150, 1723, 959 1694, nil, 1695, nil, 1666, 1650, 1721, nil, 459, nil, 960 nil, 1753, nil, nil, nil, nil, 1655, 1777, 2847, 2906, 961 1752, 25, nil, nil, 1755, nil, 1783, nil, 1805, nil, 962 nil, nil, nil, 2965, 1709, 1803, 1805, 1813, 2119, 1790, 963 nil, nil, nil, -8, 188, nil, 1099, nil, 356, 183, 964 2253, 1055, 1821, nil, nil, 1825, nil, nil, nil, 524, 965 190, 819, 807, 799, 787, 745, 721, 757, 705, 689, 966 1818, 1803, 1803, 1803, 1801, nil, 2187, 645, nil, nil, 967 nil, nil, 832, 115, 102, 2162, 2139, 2117, nil, nil, 968 525, 3433, 534, 2095, 2070, 2047, nil, 1863, 1865, nil, 969 1864, 1854, 1887, 1889, nil, 1890, 1892, 1869, 270, 252, 970 293, 385, nil, nil, nil, 302, 345, nil, 1573, 653, 971 377, 499, 3024, nil, nil, 308, 3083, nil, nil, 438, 972 74, 536, 288, 282, nil, 94, 548, 3142, nil, 444, 973 nil, 571, nil, 459, 409, nil, 2025, 71, nil, 486, 974 2003, 2375, 623, 1978, nil, 647, nil, 662, nil, nil, 975 1955, nil, nil, nil, nil, 26, 14, 691, 476, 709, 976 nil, 1145, nil, 713, 739, 749, 746, 775, 452, nil, 977 728, nil, -2, nil, nil, 804, nil, nil, 827, nil, 978 nil, 3474, nil, nil, 204, 269, nil, nil, nil, 1933, 979 77, 823, nil, 852, nil, 872, 843, 847, nil, 890, 980 925, 60, 896, 897, nil, 929, nil, 899, nil, nil, 981 814, nil, 484, nil, nil, 475, 901, nil, nil, nil, 982 943, 944, 835, 920, 948, nil, 951, nil, 963, nil, 983 nil, nil, nil, nil, nil, nil, nil, 643, nil, 843, 984 nil, nil, nil, 935, 980, nil, 982, 983, 959, 1007, 985 979, 522, 1005, nil, 1006, 983, 1026, nil, -10, nil, 986 3269, 617, 972, nil, 3228, 595, 1038, nil, nil, 573, 987 nil, 396, nil, 1045, 551, 382, 175, nil, nil, nil, 988 1015, nil, 1042, nil, 12, 939, nil, nil, 1059, nil, 989 459, 1073, nil, 302, nil, nil, nil, 1049, 491, nil, 990 nil, nil, 1050, 1076, nil, 1099, 1100, nil, 1102, 1073, 991 1090, 1118, 1009, 1134, 1108, 1145, nil, 1121, 1148, -11, 992 290, nil, 1152, 1129, 10, nil, nil, 1166, nil, nil, 993 437, 412, nil, 1161, nil, 323, nil, nil, nil, nil, 994 1029, nil, 328, nil, 1163, 1007, 175, nil, 1208, 1210, 995 1098, 1187, nil, nil, 1117, 1207, 985, -9, 1209, nil, 996 nil, nil, nil, 1248, 428, 963, 1249, 1221, 893, 100, 997 1222, 495, nil, -13, nil, 1230, 1258, 871, nil, 1235, 998 75, 1280, 1285, nil, 1256, 24, nil, nil, 849, 1301, 999 1277, 827, 1309, nil, nil, 478, nil, nil, 1295, nil, 1000 nil, 1324, 1327, 1326, nil, 1341, 1281, 1313, 486, 492, 1001 1314, 1323, 1294, nil, nil, nil, nil, nil, 801, nil, 1002 nil, nil, 272, 1354, 11, nil, 1402, 1441, nil, nil, 1003 1633, 735, nil, 1778, 1806, 395, nil, 1169, 555, nil ] 973 nil, nil, nil, nil, nil, nil, 2268, nil, 694, nil, 974 3265, 123, nil, nil, nil, nil, nil, nil, nil, nil, 975 nil, nil, nil, nil, 2185, nil, nil, nil, nil, nil, 976 nil, nil, nil, nil, nil, nil, nil, nil, 702, 712, 977 721, 2888, 717, 719, 729, 115, 738, 742, nil, 704, 978 770, nil, 921, nil, 755, 75, 359, nil, 1610, 174, 979 nil, nil, 89, nil, 730, 742, nil, nil, nil, nil, 980 807, 755, 496, nil, 827, nil, 836, nil, 840, nil, 981 858, nil, nil, nil, 862, 586, nil, 877, 889, 891, 982 nil, nil, 905, 909, 917, 27, 922, 606, 866, 870, 983 nil, 892, nil, 903, nil, nil, 979, 888, 983, 1040, 984 nil, 1044, nil, nil, 1106, nil, 1500, 1268, 484, 2000, 985 2416, 1115, 1107, nil, 26, nil, 3183, 448, nil, 1094, 986 1123, 97, 1591, nil, 1124, 1129, 575, 1127, 1143, 1031, 987 2017, 282, 350, 1146, 1147, 1149, 335, 1163, 1164, 1134, 988 nil, 848, nil, 1163, 1168, 184, nil, 156, nil, 1171, 989 218, nil, -6, nil, -65, 1178, nil, nil, 1081, nil, 990 nil, nil, nil, nil, nil, nil, 1179, 1019, nil, nil, 991 437, 2228, 2206, nil, nil, nil, nil, nil, nil, nil, 992 nil, 880, 687, 729, 989, 767, 1182, 1177, 1178, 1179, 993 132, nil, nil, nil, 553, 1222, 1220, nil, nil, 3511, 994 1225, nil, 1196, nil, 3347, 2107, 1268, nil, nil, nil, 995 3124, 3065, nil, 2116, 612, nil, 1230, 1176, 130, nil, 996 1615, nil, 480, nil, 367, 767, 1244, 76, nil, -1, 997 nil, 1217, 1245, nil, 1227, nil, 1228, nil, 524, nil, 998 1237, 1270, 1241, 1271, 1252, 1261, 197, nil, 1329, 3470, 999 2048, 271, nil, 2534, 291, nil, nil, 778, nil, nil, 1000 nil, nil, nil, 177, nil, nil, 1232, 1233, 198, 1234, 1001 nil, nil, nil, nil, nil, 183, nil, nil, 867, nil, 1002 nil, nil, nil, nil, 1252, 10, 1197, 1313, nil, -2, 1003 nil, nil, nil, 190, 1328, 1274, nil, 1337, 1339, nil, 1004 206, 1588, 1336, 1345, nil, 1658, nil, 1636, 1750, 1772, 1005 1794, 1816, 1842, 1864, 1886, 1908, 1934, 1956, 651, 1978, 1006 695, 720, 787, 673, 1544, 1452, 325, nil, 1350, nil, 1007 nil, nil, 2475, 1495, nil, 692, nil, nil, nil, nil, 1008 1361, 1363, 1364, 1365, 1375, nil, 2947, nil, nil, 936, 1009 nil, nil, 342, nil, 1384, 1386, 1387, nil, nil, nil, 1010 nil, 1382, 1400, 2162, nil, nil, nil, 1402, 1347, 1404, 1011 1426, 1368, 1429, 1430, 1428, nil, 1440, nil, nil, 1442, 1012 nil, nil, -37, nil, 1611, 1443, 1422, nil, 1424, nil, 1013 476, 1355, 1426, nil, 599, nil, nil, 1471, nil, nil, 1014 nil, nil, 1373, 1467, 2593, 2652, 1441, -11, nil, nil, 1015 1444, nil, 601, nil, 1483, nil, nil, nil, nil, 3006, 1016 1385, 1485, 1488, 1501, 2163, 1477, nil, nil, nil, -8, 1017 254, nil, 1509, nil, 2026, nil, 593, 597, 2294, 628, 1018 1516, nil, nil, 1521, nil, nil, nil, 877, 954, 791, 1019 804, 855, 890, 1087, 596, 978, 1063, 815, 1515, 1509, 1020 1509, 1518, 1518, nil, 1427, 709, nil, nil, nil, nil, 1021 958, 81, 261, 2184, 949, 12, nil, nil, 592, 3388, 1022 590, 461, 495, 521, nil, 1544, 1563, nil, 80, 1536, 1023 1568, 1570, nil, 1572, 1588, 1559, 1591, 1562, 1593, 318, 1024 nil, nil, nil, 1572, 1604, nil, 937, 937, 1603, 857, 1025 2711, nil, nil, 310, 2770, nil, nil, 1547, 79, 1613, 1026 13, 355, nil, 92, 900, 1618, 2829, nil, 437, nil, 1027 1620, nil, 1507, 344, nil, 1148, 73, 433, 1597, nil, 1028 541, 1199, 2355, 1627, 1244, nil, 1636, nil, 1635, nil, 1029 nil, 1291, nil, nil, nil, nil, 14, 27, 1639, 430, 1030 1640, nil, 1331, nil, 1658, 1660, 1661, 1657, 1680, 240, 1031 1587, 1626, nil, 0, nil, nil, 1687, nil, nil, 1689, 1032 nil, nil, 3224, nil, nil, 332, 578, nil, nil, nil, 1033 1519, 78, 1660, nil, 1716, nil, 1721, 1689, 1692, nil, 1034 1720, 1733, 75, 1703, 1720, nil, 1753, nil, 1723, nil, 1035 nil, 1638, nil, 521, nil, nil, nil, 577, 1742, nil, 1036 nil, nil, 1769, 1770, 1661, 1747, 1789, nil, 1795, 2125, 1037 nil, 1794, nil, 1798, nil, nil, nil, nil, nil, nil, 1038 nil, nil, 743, nil, 844, nil, nil, nil, 1768, 1811, 1039 nil, 176, 256, 1788, 1819, 1790, 1493, 1817, nil, 1825, 1040 1801, 1829, nil, 74, nil, 3306, 1405, 1772, nil, 3429, 1041 1383, 1837, nil, nil, 1360, nil, 587, nil, 1845, 1313, 1042 384, 76, nil, nil, nil, 1815, nil, 1842, nil, 1221, 1043 1746, 1837, nil, nil, nil, nil, nil, nil, nil, 1611, 1044 nil, nil, 1006, 482, nil, nil, 1867, nil, 1101, 1864, 1045 1788, 447, nil, nil, nil, 1858, 596, nil, nil, nil, 1046 1859, 1885, nil, 1908, 1909, nil, 1911, 1882, 1891, 1918, 1047 1808, 1920, 1902, 1933, nil, 1907, 1934, -9, 284, nil, 1048 1951, 1927, 199, 1485, 576, nil, nil, nil, nil, nil, 1049 nil, nil, nil, 1954, nil, nil, 904, 812, nil, 1930, 1050 nil, 513, nil, nil, nil, nil, 2092, nil, 330, nil, 1051 1947, 835, 240, nil, 1975, 1976, 1864, 1970, nil, nil, 1052 nil, 1884, 1974, 982, 8, nil, nil, 1474, 1982, nil, 1053 nil, nil, nil, 2014, 525, 927, 2015, 1987, 857, 253, 1054 1996, 399, nil, -13, nil, 1997, 2024, nil, 2070, nil, 1055 2000, 205, -5, 30, nil, 52, 25, nil, nil, 1126, 1056 117, 97, 765, 197, nil, nil, 180, nil, nil, 217, 1057 nil, nil, 279, 291, 379, nil, 418, 367, 433, 534, 1058 412, 454, 467, 460, nil, nil, nil, nil, nil, 439, 1059 nil, nil, nil, 11, 533, 100, nil, 539, 512, nil, 1060 nil, 558, 414, nil, 576, 594, 567, nil, 1566, 606, 1061 nil ] 1004 1062 1005 1063 racc_action_default = [ 1006 -19 4, -418, -1, -418, -418, -69, -70, -71, -72, -73,1007 -74, -75, -76, -77, -78, -79, -4 18, -81, -82, -83,1064 -195, -442, -1, -442, -442, -69, -70, -71, -72, -73, 1065 -74, -75, -76, -77, -78, -79, -442, -81, -82, -83, 1008 1066 -84, -85, -86, -87, -88, -89, -90, -91, -92, -93, 1009 -94, -95, -96, -97, -98, -99, -418, -101, -104, -118, 1010 -418, -418, -126, -127, -128, -129, -130, -131, -136, -137, 1011 -192, -193, -195, -418, -197, -198, -199, -200, -201, -202, 1012 -203, -206, -207, -208, -209, -210, -234, -418, -418, -418, 1013 -418, -418, -418, -418, -418, -418, -418, -405, -418, 870, 1014 -418, -65, -67, -418, -139, -140, -418, -146, -205, -204, 1015 -418, -100, -106, -418, -109, -72, -73, -119, -418, -125, 1016 -418, -211, -418, -214, -418, -216, -418, -218, -418, -220, 1017 -221, -222, -418, -418, -386, -418, -418, -418, -394, -395, 1018 -418, -418, -418, -418, -418, -418, -418, -418, -247, -418, 1019 -254, -418, -260, -250, -418, -327, -418, -418, -350, -418, 1020 -398, -410, -62, -418, -418, -138, -418, -418, -418, -147, 1021 -148, -418, -102, -418, -418, -132, -134, -418, -418, -418, 1022 -406, -418, -418, -418, -418, -418, -418, -418, -418, -418, 1023 -418, -418, -418, -418, -418, -418, -418, -337, -418, -244, 1024 -418, -242, -418, -255, -418, -251, -418, -418, -328, -418, 1025 -399, -418, -66, -2, -3, -4, -5, -6, -7, -8, 1026 -9, -10, -418, -12, -14, -18, -418, -418, -22, -23, 1027 -24, -25, -26, -27, -28, -30, -34, -37, -40, -45, 1028 -48, -50, -52, -54, -56, -58, -61, -68, -186, -418, 1029 -418, -418, -143, -63, -418, -418, -145, -150, -152, -418, 1030 -156, -418, -141, -149, -80, -418, -418, -107, -418, -418, 1031 -123, -418, -418, -418, -196, -418, -212, -418, -224, -418, 1032 -418, -418, -418, -228, -418, -291, -418, -418, -387, -418, 1033 -389, -418, -391, -418, -404, -418, -418, -418, -418, -418, 1034 -418, -418, -240, -418, -418, -418, -418, -248, -418, -418, 1035 -261, -263, -418, -265, -266, -267, -268, -269, -418, -288, 1036 -289, -418, -418, -418, -418, -313, -314, -252, -324, -326, 1037 -418, -351, -353, -418, -355, -356, -357, -358, -365, -418, 1038 -418, -418, -418, -381, -418, -407, -408, -409, -418, -418, 1039 -13, -418, -418, -60, -172, -418, -418, -418, -19, -418, 1040 -20, -418, -418, -418, -418, -418, -418, -418, -418, -418, 1041 -418, -418, -418, -418, -418, -418, -418, -418, -418, -418, 1042 -418, -190, -418, -142, -64, -144, -418, -157, -155, -418, 1043 -159, -161, -162, -163, -418, -418, -166, -418, -418, -171, 1044 -418, -105, -108, -418, -120, -122, -418, -112, -114, -418, 1045 -418, -133, -135, -124, -213, -418, -418, -418, -215, -217, 1046 -219, -418, -418, -418, -418, -418, -418, -418, -418, -393, 1047 -418, -397, -235, -418, -237, -238, -418, -245, -418, -418, 1048 -418, -249, -418, -256, -418, -418, -418, -262, -418, -270, 1049 -272, -418, -274, -275, -276, -277, -290, -418, -418, -418, 1050 -250, -418, -315, -329, -418, -352, -418, -359, -418, -361, 1051 -362, -363, -364, -418, -372, -418, -418, -418, -418, -418, 1052 -400, -401, -402, -418, -418, -11, -418, -173, -174, -175, 1053 -418, -418, -418, -16, -17, -418, -31, -32, -33, -35, 1054 -36, -38, -39, -41, -42, -43, -44, -46, -47, -49, 1055 -51, -53, -55, -57, -418, -187, -418, -418, -151, -153, 1056 -154, -158, -418, -418, -418, -418, -418, -418, -103, -110, 1057 -418, -418, -418, -418, -418, -418, -225, -418, -418, -229, 1058 -418, -418, -338, -418, -399, -418, -418, -418, -418, -418, 1059 -418, -418, -243, -246, -253, -418, -418, -259, -418, -418, 1060 -418, -418, -418, -294, -296, -418, -418, -305, -307, -418, 1061 -418, -418, -418, -418, -349, -418, -418, -418, -367, -418, 1062 -373, -418, -382, -418, -418, -385, -418, -418, -29, -176, 1063 -418, -418, -418, -405, -182, -418, -178, -418, -15, -21, 1064 -418, -188, -191, -189, -160, -418, -418, -418, -418, -418, 1065 -121, -418, -113, -418, -418, -418, -418, -418, -418, -232, 1066 -418, -223, -418, -388, -390, -418, -396, -236, -418, -241, 1067 -257, -418, -264, -271, -418, -418, -278, -279, -284, -418, 1068 -418, -418, -295, -418, -298, -418, -418, -418, -306, -418, 1069 -418, -418, -418, -418, -316, -418, -319, -418, -330, -331, 1070 -418, -333, -418, -343, -354, -418, -418, -368, -369, -371, 1071 -418, -418, -418, -418, -418, -180, -418, -184, -418, -177, 1072 -183, -179, -59, -164, -165, -167, -168, -418, -170, -418, 1073 -115, -116, -117, -418, -418, -230, -418, -418, -418, -418, 1074 -418, -418, -418, -273, -418, -418, -418, -292, -418, -293, 1075 -418, -418, -418, -304, -418, -418, -418, -310, -312, -418, 1076 -325, -418, -335, -418, -418, -418, -418, -360, -366, -374, 1077 -418, -383, -418, -403, -418, -418, -181, -185, -418, -111, 1078 -418, -418, -233, -418, -384, -392, -239, -418, -418, -280, 1079 -281, -285, -418, -418, -297, -418, -418, -308, -418, -418, 1080 -418, -418, -418, -418, -418, -418, -348, -418, -418, -418, 1081 -418, -379, -418, -418, -418, -169, -226, -418, -231, -258, 1082 -418, -418, -286, -418, -299, -418, -302, -303, -309, -311, 1083 -418, -332, -418, -334, -418, -418, -418, -341, -418, -418, 1084 -343, -418, -375, -376, -418, -418, -418, -418, -418, -282, 1085 -283, -287, -300, -418, -418, -418, -418, -418, -418, -418, 1086 -418, -418, -370, -418, -380, -418, -418, -418, -301, -418, 1087 -418, -418, -418, -339, -418, -418, -342, -344, -418, -418, 1088 -418, -418, -418, -227, -317, -418, -320, -322, -418, -336, 1089 -340, -418, -418, -418, -378, -418, -418, -418, -418, -418, 1090 -418, -418, -418, -417, -318, -321, -323, -346, -418, -345, 1091 -377, -413, -418, -418, -418, -415, -418, -418, -411, -412, 1092 -418, -418, -347, -418, -418, -418, -416, -418, -418, -414 ] 1067 -94, -95, -96, -97, -98, -99, -442, -101, -104, -118, 1068 -442, -442, -126, -127, -128, -129, -130, -131, -136, -137, 1069 -192, -193, -194, -196, -442, -198, -199, -200, -201, -202, 1070 -203, -204, -207, -208, -209, -210, -211, -235, -442, -442, 1071 -442, -442, -442, -442, -442, -442, -442, -442, -408, -442, 1072 -442, 911, -442, -65, -67, -442, -139, -140, -442, -146, 1073 -206, -205, -442, -100, -106, -442, -109, -72, -73, -119, 1074 -442, -125, -442, -212, -442, -215, -442, -217, -442, -219, 1075 -442, -221, -222, -223, -442, -442, -389, -442, -442, -442, 1076 -397, -398, -442, -442, -442, -442, -442, -442, -442, -442, 1077 -248, -442, -255, -442, -261, -251, -442, -328, -442, -442, 1078 -351, -442, -401, -413, -442, -62, -442, -442, -138, -442, 1079 -442, -442, -147, -148, -442, -102, -442, -442, -132, -134, 1080 -442, -442, -442, -409, -442, -442, -442, -442, -442, -442, 1081 -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, 1082 -338, -442, -245, -442, -243, -442, -256, -442, -252, -442, 1083 -442, -329, -442, -402, -442, -442, -435, -66, -2, -3, 1084 -4, -5, -6, -7, -8, -9, -10, -442, -12, -14, 1085 -18, -442, -442, -22, -23, -24, -25, -26, -27, -28, 1086 -30, -34, -37, -40, -45, -48, -50, -52, -54, -56, 1087 -58, -61, -68, -186, -442, -442, -442, -143, -63, -442, 1088 -442, -145, -150, -152, -442, -156, -442, -141, -149, -80, 1089 -442, -442, -107, -442, -442, -123, -442, -442, -442, -197, 1090 -442, -213, -442, -225, -442, -442, -442, -442, -229, -442, 1091 -292, -442, -442, -390, -442, -392, -442, -394, -442, -407, 1092 -442, -442, -442, -442, -442, -442, -442, -241, -442, -442, 1093 -442, -442, -249, -442, -442, -262, -264, -442, -266, -267, 1094 -268, -269, -270, -442, -289, -290, -442, -442, -442, -442, 1095 -314, -315, -253, -325, -327, -442, -352, -354, -442, -356, 1096 -357, -358, -359, -367, -442, -442, -442, -442, -384, -442, 1097 -410, -411, -412, -442, -442, -442, -13, -442, -442, -60, 1098 -172, -442, -442, -442, -19, -442, -20, -442, -442, -442, 1099 -442, -442, -442, -442, -442, -442, -442, -442, -442, -442, 1100 -442, -442, -442, -442, -442, -442, -442, -190, -442, -142, 1101 -64, -144, -442, -157, -155, -442, -159, -161, -162, -163, 1102 -442, -442, -166, -442, -442, -171, -442, -105, -108, -442, 1103 -120, -122, -442, -112, -114, -442, -442, -133, -135, -124, 1104 -214, -442, -442, -442, -216, -218, -220, -442, -442, -442, 1105 -442, -442, -442, -442, -442, -396, -442, -400, -236, -442, 1106 -238, -239, -442, -246, -442, -442, -442, -250, -442, -257, 1107 -442, -442, -442, -263, -442, -271, -273, -442, -275, -276, 1108 -277, -278, -291, -442, -442, -442, -251, -442, -316, -330, 1109 -442, -353, -442, -360, -442, -363, -364, -365, -366, -442, 1110 -374, -442, -442, -442, -442, -442, -403, -404, -405, -442, 1111 -442, -421, -442, -11, -442, -173, -174, -175, -442, -442, 1112 -442, -16, -17, -442, -31, -32, -33, -35, -36, -38, 1113 -39, -41, -42, -43, -44, -46, -47, -49, -51, -53, 1114 -55, -57, -442, -187, -442, -442, -151, -153, -154, -158, 1115 -442, -442, -442, -442, -442, -442, -103, -110, -442, -442, 1116 -442, -442, -442, -442, -226, -442, -442, -230, -442, -442, 1117 -339, -442, -402, -442, -442, -442, -442, -442, -442, -442, 1118 -244, -247, -254, -442, -442, -260, -442, -442, -442, -442, 1119 -442, -295, -297, -442, -442, -306, -308, -442, -442, -442, 1120 -442, -442, -350, -442, -442, -442, -442, -369, -442, -375, 1121 -442, -385, -442, -442, -388, -442, -442, -442, -442, -29, 1122 -176, -442, -442, -442, -408, -182, -442, -178, -442, -15, 1123 -21, -442, -188, -191, -189, -160, -442, -442, -442, -442, 1124 -442, -121, -442, -113, -442, -442, -442, -442, -442, -442, 1125 -233, -442, -224, -442, -391, -393, -442, -399, -237, -442, 1126 -242, -258, -442, -265, -272, -442, -442, -279, -280, -285, 1127 -442, -442, -442, -296, -442, -299, -442, -442, -442, -307, 1128 -442, -442, -442, -442, -442, -317, -442, -320, -442, -331, 1129 -332, -442, -334, -442, -344, -355, -361, -442, -442, -370, 1130 -371, -373, -442, -442, -442, -442, -442, -422, -442, -442, 1131 -180, -442, -184, -442, -177, -183, -179, -59, -164, -165, 1132 -167, -168, -442, -170, -442, -115, -116, -117, -442, -442, 1133 -231, -442, -442, -442, -442, -442, -442, -442, -274, -442, 1134 -442, -442, -293, -442, -294, -442, -442, -442, -305, -442, 1135 -442, -442, -311, -313, -442, -326, -442, -336, -442, -442, 1136 -442, -442, -362, -368, -376, -442, -386, -442, -406, -442, 1137 -442, -442, -423, -425, -426, -427, -428, -429, -430, -442, 1138 -436, -437, -442, -442, -181, -185, -442, -111, -442, -442, 1139 -234, -442, -387, -395, -240, -442, -442, -281, -282, -286, 1140 -442, -442, -298, -442, -442, -309, -442, -442, -442, -442, 1141 -442, -442, -442, -442, -349, -442, -442, -442, -442, -382, 1142 -442, -442, -442, -442, -442, -432, -433, -438, -439, -440, 1143 -441, -169, -227, -442, -232, -259, -442, -442, -287, -442, 1144 -300, -442, -303, -304, -310, -312, -442, -333, -442, -335, 1145 -442, -442, -442, -342, -442, -442, -344, -442, -377, -378, 1146 -379, -442, -442, -442, -442, -424, -431, -442, -442, -283, 1147 -284, -288, -301, -442, -442, -442, -442, -442, -442, -442, 1148 -442, -442, -372, -442, -383, -442, -442, -434, -442, -302, 1149 -442, -442, -442, -442, -340, -442, -442, -343, -345, -442, 1150 -442, -442, -442, -442, -228, -318, -442, -321, -323, -442, 1151 -337, -341, -442, -442, -442, -381, -442, -442, -442, -442, 1152 -442, -442, -442, -442, -420, -319, -322, -324, -347, -442, 1153 -346, -380, -416, -442, -442, -442, -418, -442, -442, -414, 1154 -415, -442, -442, -348, -442, -442, -442, -419, -442, -442, 1155 -417 ] 1093 1156 1094 1157 racc_goto_table = [ 1095 53, 135, 82, 227, 260, 176, 149, 333, 231, 233, 1096 158, 258, 100, 150, 97, 318, 235, 151, 563, 383, 1097 462, 178, 50, 166, 324, 261, 523, 461, 525, 526, 1098 387, 370, 9, 8, 338, 429, 263, 638, 561, 81, 1099 139, 598, 311, 382, 125, 467, 266, 332, 547, 269, 1100 271, 702, 290, 246, 154, 543, 745, 615, 766, 642, 1101 710, 483, 484, 485, 486, 137, 234, 487, 488, 310, 1102 558, 544, 548, 645, 644, 243, 479, 480, 481, 482, 1103 446, 447, 557, 455, 148, 559, 544, 750, 361, 709, 1104 333, 783, 268, 273, 191, 326, 364, 327, 854, 859, 1105 1, 233, 852, 2, 340, 489, 490, 491, 492, 493, 1106 80, 367, 91, 253, 392, 808, 92, 245, 93, 386, 1107 590, 391, 419, 179, 145, 499, 369, 248, 569, 360, 1108 51, 254, 256, 257, 262, 541, 318, 180, 127, 286, 1109 333, 82, 129, 288, 333, 380, 423, 811, 131, 289, 1110 612, 249, 608, 773, 428, 628, 255, 427, 234, 622, 1111 784, 729, 785, 445, 333, 437, 686, 542, 623, 476, 1112 477, 478, 472, 765, 647, 544, 334, 382, 192, 548, 1113 53, 572, 292, 546, 475, 629, 552, 313, 9, 8, 1114 544, 634, 635, 825, 136, 187, 494, 553, 723, 443, 1115 639, 701, 287, 771, 497, nil, nil, nil, 416, nil, 1116 nil, nil, 9, 8, nil, nil, nil, nil, nil, 248, 1117 248, nil, nil, nil, nil, 436, nil, 679, 233, nil, 1118 441, 405, nil, 712, 782, nil, nil, nil, 368, nil, 1119 nil, nil, nil, 249, 249, 516, 522, 454, 522, 522, 1120 nil, nil, nil, nil, nil, 463, nil, nil, 418, 518, 1121 468, nil, 424, nil, nil, nil, nil, nil, nil, nil, 1122 nil, nil, nil, 519, nil, nil, nil, nil, nil, 501, 1123 nil, 417, 613, nil, 53, 234, 425, 292, nil, 527, 1124 nil, nil, 584, 592, 568, nil, 511, nil, 462, nil, 1125 nil, nil, nil, nil, nil, 461, 421, nil, 313, nil, 1126 333, 333, 333, 334, 531, nil, 9, 8, 333, 333, 1127 333, nil, 458, 734, nil, nil, nil, 737, nil, nil, 1128 nil, nil, 233, 577, nil, nil, nil, nil, 538, 575, 1129 nil, nil, 587, 588, 589, nil, nil, nil, 713, nil, 1130 593, 594, 595, nil, 248, 582, 555, nil, 602, nil, 1131 nil, nil, 669, nil, 820, 500, nil, nil, nil, nil, 1132 nil, nil, 522, nil, nil, nil, nil, nil, 249, nil, 1133 nil, 318, nil, nil, nil, 662, nil, nil, nil, 234, 1134 nil, 567, nil, nil, 841, nil, 468, nil, nil, nil, 1158 54, 137, 232, 84, 236, 265, 263, 161, 179, 195, 1159 339, 152, 240, 572, 238, 102, 153, 99, 154, 323, 1160 169, 266, 389, 329, 531, 468, 533, 534, 467, 393, 1161 9, 181, 425, 435, 50, 376, 453, 344, 268, 570, 1162 8, 552, 556, 649, 650, 609, 141, 732, 127, 83, 1163 271, 388, 251, 274, 276, 338, 552, 475, 316, 717, 1164 773, 725, 295, 555, 157, 551, 802, 626, 491, 492, 1165 493, 494, 239, 487, 488, 495, 496, 489, 490, 248, 1166 567, 452, 566, 480, 657, 461, 568, 151, 778, 367, 1167 724, 819, 273, 339, 278, 194, 331, 332, 895, 900, 1168 893, 471, 577, 370, 1, 784, 2, 502, 238, 346, 1169 497, 498, 398, 499, 500, 501, 82, 786, 373, 93, 1170 94, 250, 95, 392, 258, 601, 182, 397, 148, 507, 1171 375, 580, 366, 253, 51, 849, 52, 259, 261, 262, 1172 267, 549, 323, 183, 339, 84, 386, 552, 339, 129, 1173 291, 556, 619, 131, 254, 293, 429, 133, 294, 260, 1174 623, 825, 434, 552, 757, 443, 239, 701, 339, 433, 1175 550, 633, 639, 484, 485, 486, 852, 821, 809, 822, 1176 634, 451, 801, 54, 340, 297, 388, 659, 554, 9, 1177 318, 197, 640, 483, 560, 583, 645, 646, 866, 8, 1178 138, 190, 561, 449, 716, 847, 807, 808, 505, 751, 1179 139, 315, 422, 9, 655, nil, nil, 292, nil, nil, 1180 nil, nil, nil, 8, nil, nil, nil, 253, 253, 442, 1181 694, nil, nil, nil, 447, nil, 238, nil, nil, nil, 1182 727, 411, nil, 524, 374, nil, nil, nil, 254, 254, 1183 530, 460, 530, 530, nil, 598, 599, 600, 526, 469, 1184 818, 820, nil, 604, 605, 606, 424, 476, nil, nil, 1185 430, nil, nil, nil, nil, nil, nil, nil, 527, nil, 1186 509, nil, 656, 624, nil, nil, nil, 423, nil, 54, 1187 nil, 431, 297, nil, 239, 603, 535, 519, nil, 595, 1188 579, nil, 762, nil, nil, nil, 765, nil, nil, 468, 1189 nil, nil, 467, 318, nil, nil, 339, 339, 339, 9, 1190 nil, nil, 340, 427, 339, 339, 339, 464, 539, 8, 1191 nil, nil, nil, nil, 588, nil, nil, 578, nil, 546, 1192 586, nil, 238, nil, nil, nil, nil, nil, nil, nil, 1193 nil, nil, nil, nil, nil, nil, nil, 563, nil, 593, 1194 728, nil, 613, 253, nil, nil, nil, nil, nil, nil, 1195 nil, 684, 508, nil, nil, nil, nil, nil, 530, nil, 1196 nil, nil, nil, nil, 254, nil, nil, nil, nil, nil, 1197 323, nil, nil, 861, 677, nil, 576, nil, nil, nil, 1198 239, nil, nil, nil, nil, 476, nil, nil, nil, nil, 1135 1199 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1136 nil, nil, nil, nil, nil, nil, 179, 564, 812, nil, 1137 nil, nil, 535, nil, nil, nil, nil, nil, 653, nil, 1138 585, 586, 656, 233, nil, 577, 545, 549, nil, nil, 1139 658, nil, nil, nil, nil, nil, 611, 522, nil, nil, 1140 nil, 545, nil, nil, nil, nil, nil, nil, nil, nil, 1200 nil, nil, nil, 182, 882, 573, nil, nil, nil, 543, 1201 665, nil, nil, nil, nil, nil, 671, 596, 597, 588, 1202 nil, nil, 553, 557, 673, nil, 238, nil, 763, 622, 1203 853, nil, 766, nil, 610, nil, 530, 553, nil, nil, 1141 1204 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1142 nil, nil, nil, nil, 652, nil, nil, 631, nil, nil, 1143 nil, 687, nil, nil, nil, 591, nil, nil, nil, nil, 1144 234, nil, nil, nil, nil, nil, 333, nil, nil, nil, 1145 333, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1205 nil, nil, nil, nil, nil, nil, nil, nil, 664, nil, 1206 nil, nil, nil, nil, 642, 702, nil, nil, nil, nil, 1207 nil, nil, nil, nil, nil, nil, 602, nil, nil, nil, 1208 nil, nil, nil, nil, 239, nil, nil, nil, nil, 339, 1209 nil, nil, nil, 339, nil, nil, nil, nil, nil, nil, 1146 1210 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1147 nil, nil, nil, nil, nil, nil, nil, nil, 735, 718, 1148 nil, nil, 738, 690, 730, nil, nil, nil, nil, 694, 1149 545, nil, nil, nil, 549, nil, nil, 688, nil, nil, 1150 nil, 640, nil, nil, nil, 545, nil, nil, nil, nil, 1151 nil, 740, nil, nil, 747, nil, 746, nil, nil, nil, 1152 nil, nil, nil, nil, nil, nil, 753, nil, nil, 756, 1153 333, nil, nil, nil, nil, 681, nil, nil, nil, nil, 1211 nil, nil, nil, 731, nil, nil, nil, 746, nil, 705, 1212 nil, 758, nil, nil, nil, 709, nil, nil, 553, nil, 1213 nil, nil, 557, 837, nil, nil, nil, 703, nil, 651, 1214 nil, nil, nil, nil, 553, nil, nil, nil, nil, 768, 1215 nil, nil, nil, nil, 774, 775, nil, nil, nil, nil, 1216 855, nil, nil, nil, 781, nil, nil, nil, nil, nil, 1217 nil, nil, nil, nil, nil, nil, nil, nil, nil, 696, 1218 nil, 873, nil, 792, nil, nil, nil, nil, nil, nil, 1219 nil, 464, nil, nil, 339, nil, nil, 750, 610, nil, 1220 nil, 769, nil, nil, nil, nil, nil, nil, nil, nil, 1221 nil, 894, nil, nil, nil, nil, nil, nil, nil, nil, 1222 nil, 339, nil, nil, nil, nil, nil, 777, nil, nil, 1223 nil, 829, 830, 810, nil, nil, nil, nil, nil, nil, 1224 nil, 834, 339, nil, nil, nil, nil, nil, nil, nil, 1225 nil, nil, nil, nil, nil, nil, 530, nil, 845, nil, 1154 1226 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1155 458, nil, nil, 333, nil, nil, nil, nil, nil, nil, 1156 nil, 741, 797, nil, nil, nil, nil, nil, nil, 789, 1157 790, nil, nil, 333, 774, nil, nil, nil, nil, nil, 1158 nil, nil, 794, 749, nil, 814, nil, nil, 522, nil, 1159 nil, nil, nil, nil, nil, nil, nil, nil, 805, nil, 1160 nil, nil, nil, 333, nil, 832, nil, 746, nil, nil, 1161 nil, nil, nil, nil, nil, nil, 823, nil, nil, nil, 1162 nil, nil, nil, nil, nil, nil, nil, nil, nil, 727, 1163 nil, 787, nil, 835, nil, 853, nil, nil, nil, nil, 1227 774, nil, 339, nil, nil, 755, nil, nil, nil, nil, 1228 nil, nil, nil, 864, nil, nil, nil, nil, 824, nil, 1229 nil, nil, nil, nil, nil, nil, nil, 876, nil, nil, 1164 1230 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1165 1231 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1166 1232 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1167 nil, nil, nil, 864, nil, nil, 815, nil, nil, 868, 1233 nil, nil, nil, nil, nil, nil, nil, 905, nil, nil, 1234 nil, nil, nil, 909, nil, 856, nil, nil, nil, nil, 1235 nil, nil, nil, nil, nil, nil, 651 ] 1236 1237 racc_goto_check = [ 1238 45, 4, 32, 31, 23, 5, 85, 47, 83, 167, 1239 22, 29, 55, 153, 28, 68, 53, 25, 4, 101, 1240 47, 23, 44, 157, 84, 74, 84, 84, 76, 48, 1241 34, 89, 6, 106, 64, 60, 145, 10, 86, 154, 1242 33, 24, 24, 129, 130, 88, 156, 170, 25, 30, 1243 83, 43, 40, 83, 83, 11, 24, 61, 138, 133, 1244 135, 152, 98, 118, 51, 113, 116, 107, 14, 14, 1245 14, 14, 29, 12, 12, 15, 15, 13, 13, 53, 1246 113, 140, 146, 6, 107, 147, 148, 31, 149, 32, 1247 150, 151, 158, 22, 159, 161, 162, 163, 164, 165, 1248 166, 168, 169, 28, 1, 173, 2, 6, 28, 8, 1249 16, 17, 23, 18, 19, 20, 26, 170, 27, 37, 1250 39, 41, 42, 46, 51, 49, 31, 52, 54, 57, 1251 59, 62, 63, 25, 65, 116, 66, 67, 80, 81, 1252 82, 87, 101, 90, 22, 31, 40, 24, 22, 91, 1253 92, 24, 84, 93, 45, 94, 95, 96, 97, 45, 1254 99, 170, 100, 24, 108, 110, 29, 111, 22, 98, 1255 112, 113, 118, 10, 10, 10, 135, 152, 133, 152, 1256 114, 138, 115, 45, 25, 45, 43, 113, 117, 34, 1257 45, 30, 119, 11, 121, 61, 122, 123, 124, 33, 1258 125, 126, 127, 128, 131, 170, 132, 134, 5, 88, 1259 136, 137, 4, 34, 139, nil, nil, 64, nil, nil, 1260 nil, nil, nil, 33, nil, nil, nil, 25, 25, 4, 1261 84, nil, nil, nil, 4, nil, 28, nil, nil, nil, 1262 154, 156, nil, 85, 31, nil, nil, nil, 45, 45, 1263 5, 4, 5, 5, nil, 6, 6, 6, 23, 4, 1264 129, 130, nil, 6, 6, 6, 25, 53, nil, nil, 1265 25, nil, nil, nil, nil, nil, nil, nil, 86, nil, 1266 47, nil, 145, 106, nil, nil, nil, 31, nil, 45, 1267 nil, 45, 45, nil, 29, 48, 83, 47, nil, 60, 1268 10, nil, 24, nil, nil, nil, 24, nil, nil, 74, 1269 nil, nil, 76, 45, nil, nil, 22, 22, 22, 34, 1270 nil, nil, 25, 64, 22, 22, 22, 45, 89, 33, 1271 nil, nil, nil, nil, 23, nil, nil, 167, nil, 47, 1272 55, nil, 28, nil, nil, nil, nil, nil, nil, nil, 1273 nil, nil, nil, nil, nil, nil, nil, 47, nil, 32, 1274 74, nil, 157, 25, nil, nil, nil, nil, nil, nil, 1275 nil, 44, 31, nil, nil, nil, nil, nil, 5, nil, 1276 nil, nil, nil, nil, 45, nil, nil, nil, nil, nil, 1277 101, nil, nil, 153, 22, nil, 4, nil, nil, nil, 1278 29, nil, nil, nil, nil, 53, nil, nil, nil, nil, 1168 1279 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1169 nil, nil, nil, nil, nil, nil, nil, nil, 640 ] 1170 1171 racc_goto_check = [ 1172 45, 4, 31, 32, 5, 82, 29, 22, 23, 28, 1173 47, 84, 67, 53, 25, 100, 55, 4, 152, 44, 1174 73, 88, 64, 47, 156, 23, 83, 75, 83, 83, 1175 48, 60, 34, 33, 10, 105, 85, 128, 153, 30, 1176 155, 87, 137, 43, 25, 61, 82, 11, 117, 82, 1177 82, 132, 97, 40, 51, 112, 134, 106, 115, 133, 1178 151, 14, 14, 14, 14, 135, 29, 15, 15, 136, 1179 112, 24, 24, 106, 138, 53, 12, 12, 13, 13, 1180 139, 144, 145, 146, 31, 147, 24, 148, 32, 149, 1181 22, 150, 157, 158, 160, 161, 28, 162, 163, 164, 1182 1, 28, 165, 2, 8, 16, 17, 18, 19, 20, 1183 26, 27, 37, 51, 23, 115, 39, 41, 42, 46, 1184 49, 52, 6, 31, 54, 57, 59, 25, 62, 63, 1185 65, 66, 79, 80, 81, 86, 100, 89, 90, 91, 1186 22, 31, 92, 93, 22, 40, 94, 134, 95, 96, 1187 98, 45, 83, 132, 99, 117, 45, 97, 29, 112, 1188 151, 107, 151, 137, 22, 109, 110, 111, 113, 10, 1189 10, 10, 6, 114, 112, 24, 25, 43, 30, 24, 1190 45, 61, 45, 116, 11, 118, 120, 45, 34, 33, 1191 24, 121, 122, 123, 124, 125, 6, 126, 87, 127, 1192 129, 130, 64, 131, 5, nil, nil, nil, 4, nil, 1193 nil, nil, 34, 33, nil, nil, nil, nil, nil, 25, 1194 25, nil, nil, nil, nil, 4, nil, 83, 28, nil, 1195 4, 155, nil, 153, 128, nil, nil, nil, 31, nil, 1196 nil, nil, nil, 45, 45, 84, 5, 4, 5, 5, 1197 nil, nil, nil, nil, nil, 4, nil, nil, 25, 23, 1198 53, nil, 25, nil, nil, nil, nil, nil, nil, nil, 1199 nil, nil, nil, 85, nil, nil, nil, nil, nil, 47, 1200 nil, 31, 105, nil, 45, 29, 45, 45, nil, 82, 1201 nil, nil, 60, 48, 10, nil, 47, nil, 73, nil, 1202 nil, nil, nil, nil, nil, 75, 64, nil, 45, nil, 1203 22, 22, 22, 25, 88, nil, 34, 33, 22, 22, 1204 22, nil, 45, 24, nil, nil, nil, 24, nil, nil, 1205 nil, nil, 28, 23, nil, nil, nil, nil, 47, 55, 1206 nil, nil, 6, 6, 6, nil, nil, nil, 73, nil, 1207 6, 6, 6, nil, 25, 32, 47, nil, 156, nil, 1208 nil, nil, 44, nil, 152, 31, nil, nil, nil, nil, 1209 nil, nil, 5, nil, nil, nil, nil, nil, 45, nil, 1210 nil, 100, nil, nil, nil, 22, nil, nil, nil, 29, 1211 nil, 4, nil, nil, 152, nil, 53, nil, nil, nil, 1280 nil, nil, nil, 31, 153, 68, nil, nil, nil, 31, 1281 23, nil, nil, nil, nil, nil, 23, 4, 4, 23, 1282 nil, nil, 45, 45, 55, nil, 28, nil, 6, 47, 1283 84, nil, 6, nil, 4, nil, 5, 45, nil, nil, 1212 1284 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1213 nil, nil, nil, nil, nil, nil, 31, 67, 83, nil,1214 nil, nil, 31, nil, nil, nil, nil, nil, 23, nil,1215 4, 4, 23, 28, nil, 23, 45, 45, nil, nil,1216 55, nil, nil, nil, nil, nil, 47, 5, nil, nil,1217 nil, 45, nil, nil, nil, nil, nil, nil, nil, nil,1285 nil, nil, nil, nil, nil, nil, nil, nil, 47, nil, 1286 nil, nil, nil, nil, 4, 23, nil, nil, nil, nil, 1287 nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, 1288 nil, nil, nil, nil, 29, nil, nil, nil, nil, 22, 1289 nil, nil, nil, 22, nil, nil, nil, nil, nil, nil, 1218 1290 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1219 nil, nil, nil, nil, 47, nil, nil, 4, nil, nil, 1220 nil, 23, nil, nil, nil, 25, nil, nil, nil, nil, 1221 29, nil, nil, nil, nil, nil, 22, nil, nil, nil, 1222 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1291 nil, nil, nil, 167, nil, nil, nil, 23, nil, 47, 1292 nil, 85, nil, nil, nil, 47, nil, nil, 45, nil, 1293 nil, nil, 45, 6, nil, nil, nil, 4, nil, 45, 1294 nil, nil, nil, nil, 45, nil, nil, nil, nil, 23, 1295 nil, nil, nil, nil, 23, 32, nil, nil, nil, nil, 1296 6, nil, nil, nil, 23, nil, nil, nil, nil, nil, 1297 nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, 1298 nil, 6, nil, 32, nil, nil, nil, nil, nil, nil, 1299 nil, 45, nil, nil, 22, nil, nil, 4, 4, nil, 1300 nil, 47, nil, nil, nil, nil, nil, nil, nil, nil, 1301 nil, 6, nil, nil, nil, nil, nil, nil, nil, nil, 1302 nil, 22, nil, nil, nil, nil, nil, 4, nil, nil, 1303 nil, 32, 32, 83, nil, nil, nil, nil, nil, nil, 1304 nil, 23, 22, nil, nil, nil, nil, nil, nil, nil, 1305 nil, nil, nil, nil, nil, nil, 5, nil, 23, nil, 1223 1306 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1224 nil, nil, nil, nil, nil, nil, nil, nil, 6, 23, 1225 nil, nil, 6, 47, 84, nil, nil, nil, nil, 47, 1226 45, nil, nil, nil, 45, nil, nil, 4, nil, nil, 1227 nil, 45, nil, nil, nil, 45, nil, nil, nil, nil, 1228 nil, 23, nil, nil, 32, nil, 23, nil, nil, nil, 1229 nil, nil, nil, nil, nil, nil, 23, nil, nil, 32, 1230 22, nil, nil, nil, nil, 25, nil, nil, nil, nil, 1231 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1232 45, nil, nil, 22, nil, nil, nil, nil, nil, nil, 1233 nil, 47, 6, nil, nil, nil, nil, nil, nil, 32, 1234 32, nil, nil, 22, 82, nil, nil, nil, nil, nil, 1235 nil, nil, 23, 4, nil, 6, nil, nil, 5, nil, 1236 nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, 1237 nil, nil, nil, 22, nil, 6, nil, 23, nil, nil, 1238 nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, 1239 nil, nil, nil, nil, nil, nil, nil, nil, nil, 31, 1240 nil, 4, nil, 23, nil, 6, nil, nil, nil, nil, 1307 23, nil, 22, nil, nil, 31, nil, nil, nil, nil, 1308 nil, nil, nil, 32, nil, nil, nil, nil, 4, nil, 1309 nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, 1241 1310 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1242 1311 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1243 1312 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1244 nil, nil, nil, 23, nil, nil, 4, nil, nil, 23, 1313 nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, 1314 nil, nil, nil, 23, nil, 4, nil, nil, nil, nil, 1315 nil, nil, nil, nil, nil, nil, 45 ] 1316 1317 racc_goto_pointer = [ 1318 nil, 104, 106, nil, -74, -160, -258, nil, -103, nil, 1319 -174, -152, -277, -275, -286, -283, -250, -250, -249, -249, 1320 -249, nil, -197, -145, -403, -23, 112, -126, -136, -78, 1321 45, -1, -145, 38, 28, nil, nil, 83, nil, 82, 1322 -104, -34, 84, -200, -231, -2, -131, -95, -225, -393, 1323 nil, -36, -129, -73, 43, -138, nil, -243, nil, -116, 1324 -211, -283, -345, -102, 32, 132, 134, -24, -39, nil, 1325 nil, nil, nil, nil, -304, nil, -301, nil, nil, nil, 1326 -24, -25, -27, -118, -386, -158, -129, -302, -483, -96, 1327 15, 77, -35, 80, -31, -137, 83, -29, -125, -386, 1328 -135, -173, nil, nil, nil, nil, -264, -481, -535, nil, 1329 -138, -463, -274, -379, -373, -582, -698, -257, -382, -365, 1330 nil, -254, -364, -363, -653, 125, 63, -247, -110, -518, 1331 -517, -447, -563, -592, -562, -659, 134, 19, -134, -349, 1332 -237, nil, nil, nil, nil, -282, -377, -240, -375, -636, 1333 -570, -687, -601, -450, -423, nil, -31, -170, -78, -79, 1334 nil, -48, -98, -97, -794, -796, -784, -135, -234, -370, 1335 -622, nil, nil, -634 ] 1336 1337 racc_goto_default = [ 1338 nil, nil, nil, 209, 198, 206, 337, 210, 219, 211, 1339 220, nil, 221, 222, 223, 224, 225, 226, 227, 228, 1340 229, 230, 231, 233, 67, 4, nil, 245, 39, 40, 1341 nil, 391, nil, 97, 98, 11, 12, 37, 36, nil, 1342 nil, nil, nil, 252, nil, 246, nil, nil, nil, 390, 1343 41, nil, 158, 85, 86, nil, 242, 243, 244, nil, 1344 nil, nil, 477, nil, nil, nil, nil, 53, nil, 55, 1345 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 1346 103, nil, nil, nil, nil, 628, nil, 269, nil, nil, 1347 nil, nil, nil, nil, nil, nil, nil, nil, nil, 296, 1348 nil, 298, 299, 300, 301, 302, nil, nil, 627, 303, 1245 1349 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1246 nil, nil, nil, nil, nil, nil, nil, nil, 45 ] 1247 1248 racc_goto_pointer = [ 1249 nil, 100, 103, nil, -73, -158, -163, nil, -103, nil, 1250 -172, -155, -268, -268, -287, -285, -249, -249, -249, -249, 1251 -249, nil, -195, -138, -367, -26, 106, -128, -138, -81, 1252 35, -2, -141, 31, 30, nil, nil, 76, nil, 78, 1253 -100, -35, 80, -203, -229, -2, -130, -90, -219, -390, 1254 nil, -44, -130, -74, 41, -131, nil, -241, nil, -115, 1255 -210, -289, -340, -100, 20, 128, -27, -41, nil, nil, 1256 nil, nil, nil, -304, nil, -297, nil, nil, nil, -27, 1257 -28, -30, -119, -378, -150, -128, -302, -479, -104, 11, 1258 67, -43, 70, -40, -142, 75, -35, -132, -388, -138, 1259 -174, nil, nil, nil, nil, -257, -483, -523, nil, -133, 1260 -453, -271, -383, -377, -563, -678, -256, -391, -364, nil, 1261 -256, -361, -360, -617, 120, 59, -246, -109, -516, -353, 1262 -439, -538, -589, -494, -648, -10, -120, -147, -481, -233, 1263 nil, nil, nil, nil, -232, -371, -237, -370, -622, -559, 1264 -659, -590, -439, -418, nil, -36, -166, -75, -77, nil, 1265 -47, -96, -94, -753, -755, -741 ] 1266 1267 racc_goto_default = [ 1268 nil, nil, nil, 204, 193, 201, 331, 205, 214, 206, 1269 215, nil, 216, 217, 218, 219, 220, 221, 222, 223, 1270 224, 225, 226, 228, 66, 4, nil, 240, 39, 40, 1271 nil, 385, nil, 95, 96, 11, 12, 37, 36, nil, 1272 nil, nil, nil, 247, nil, 241, nil, nil, nil, 384, 1273 41, nil, 155, 83, 84, nil, 237, 238, 239, nil, 1274 nil, nil, 469, nil, nil, nil, 52, nil, 54, 55, 1275 56, 57, 58, 59, 60, 61, 62, 63, 64, 101, 1276 nil, nil, nil, nil, 617, nil, 264, nil, nil, nil, 1277 nil, nil, nil, nil, nil, nil, nil, nil, 291, nil, 1278 293, 294, 295, 296, 297, nil, nil, 616, 298, nil, 1279 nil, nil, nil, nil, nil, nil, nil, nil, nil, 304, 1280 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1281 nil, 641, nil, 772, nil, nil, nil, nil, 312, nil, 1282 314, 315, 316, 317, nil, nil, nil, nil, nil, nil, 1283 nil, nil, 321, nil, 113, nil, nil, 114, nil, 460, 1284 nil, nil, nil, nil, nil, nil ] 1350 309, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1351 nil, nil, 652, nil, 653, nil, nil, nil, nil, 317, 1352 nil, 319, 320, 321, 322, nil, nil, nil, nil, nil, 1353 nil, nil, nil, 326, nil, 115, nil, nil, 116, nil, 1354 466, nil, nil, nil, nil, nil, nil, 733, 735, nil, 1355 nil, 734, 736, nil ] 1285 1356 1286 1357 racc_reduce_table = [ 1287 1358 0, 0, :racc_error, 1288 1, 141, :_reduce_none, 1289 1, 143, :_reduce_2, 1290 1, 143, :_reduce_3, 1291 1, 143, :_reduce_4, 1292 1, 143, :_reduce_5, 1293 1, 143, :_reduce_6, 1294 1, 143, :_reduce_7, 1295 1, 143, :_reduce_8, 1296 1, 143, :_reduce_9, 1297 1, 143, :_reduce_10, 1298 3, 143, :_reduce_11, 1299 1, 145, :_reduce_none, 1300 2, 145, :_reduce_13, 1301 1, 147, :_reduce_none, 1302 4, 147, :_reduce_15, 1303 3, 147, :_reduce_16, 1304 3, 147, :_reduce_17, 1359 1, 142, :_reduce_none, 1360 1, 144, :_reduce_2, 1361 1, 144, :_reduce_3, 1362 1, 144, :_reduce_4, 1363 1, 144, :_reduce_5, 1364 1, 144, :_reduce_6, 1365 1, 144, :_reduce_7, 1366 1, 144, :_reduce_8, 1367 1, 144, :_reduce_9, 1368 1, 144, :_reduce_10, 1369 3, 144, :_reduce_11, 1370 1, 146, :_reduce_none, 1371 2, 146, :_reduce_13, 1305 1372 1, 148, :_reduce_none, 1306 2, 148, :_reduce_19,1307 2, 148, :_reduce_20,1308 4, 148, :_reduce_21,1309 1, 149, :_reduce_ 22,1310 1, 149, :_reduce_23,1311 1, 149, :_reduce_24,1312 1, 149, :_reduce_25,1313 1, 1 49, :_reduce_26,1314 1, 1 49, :_reduce_27,1315 1, 150, :_reduce_ none,1316 4, 150, :_reduce_29,1317 1, 15 2, :_reduce_none,1318 3, 152, :_reduce_31,1319 3, 152, :_reduce_32,1320 3, 152, :_reduce_33,1373 4, 148, :_reduce_15, 1374 3, 148, :_reduce_16, 1375 3, 148, :_reduce_17, 1376 1, 149, :_reduce_none, 1377 2, 149, :_reduce_19, 1378 2, 149, :_reduce_20, 1379 4, 149, :_reduce_21, 1380 1, 150, :_reduce_22, 1381 1, 150, :_reduce_23, 1382 1, 150, :_reduce_24, 1383 1, 150, :_reduce_25, 1384 1, 150, :_reduce_26, 1385 1, 150, :_reduce_27, 1386 1, 151, :_reduce_none, 1387 4, 151, :_reduce_29, 1321 1388 1, 153, :_reduce_none, 1322 3, 153, :_reduce_35, 1323 3, 153, :_reduce_36, 1389 3, 153, :_reduce_31, 1390 3, 153, :_reduce_32, 1391 3, 153, :_reduce_33, 1324 1392 1, 154, :_reduce_none, 1325 3, 154, :_reduce_3 8,1326 3, 154, :_reduce_3 9,1393 3, 154, :_reduce_35, 1394 3, 154, :_reduce_36, 1327 1395 1, 155, :_reduce_none, 1328 3, 155, :_reduce_41, 1329 3, 155, :_reduce_42, 1330 3, 155, :_reduce_43, 1331 3, 155, :_reduce_44, 1396 3, 155, :_reduce_38, 1397 3, 155, :_reduce_39, 1332 1398 1, 156, :_reduce_none, 1333 3, 156, :_reduce_46, 1334 3, 156, :_reduce_47, 1399 3, 156, :_reduce_41, 1400 3, 156, :_reduce_42, 1401 3, 156, :_reduce_43, 1402 3, 156, :_reduce_44, 1335 1403 1, 157, :_reduce_none, 1336 3, 157, :_reduce_49, 1404 3, 157, :_reduce_46, 1405 3, 157, :_reduce_47, 1337 1406 1, 158, :_reduce_none, 1338 3, 158, :_reduce_ 51,1407 3, 158, :_reduce_49, 1339 1408 1, 159, :_reduce_none, 1340 3, 159, :_reduce_5 3,1409 3, 159, :_reduce_51, 1341 1410 1, 160, :_reduce_none, 1342 3, 160, :_reduce_5 5,1411 3, 160, :_reduce_53, 1343 1412 1, 161, :_reduce_none, 1344 3, 161, :_reduce_5 7,1413 3, 161, :_reduce_55, 1345 1414 1, 162, :_reduce_none, 1346 5, 162, :_reduce_59, 1347 1, 146, :_reduce_60, 1348 1, 163, :_reduce_61, 1349 3, 164, :_reduce_62, 1350 1, 167, :_reduce_none, 1351 2, 167, :_reduce_64, 1352 1, 166, :_reduce_65, 1353 3, 166, :_reduce_66, 1354 1, 170, :_reduce_none, 1355 3, 170, :_reduce_68, 1356 1, 168, :_reduce_69, 1357 1, 168, :_reduce_70, 1358 1, 168, :_reduce_71, 1415 3, 162, :_reduce_57, 1416 1, 163, :_reduce_none, 1417 5, 163, :_reduce_59, 1418 1, 147, :_reduce_60, 1419 1, 164, :_reduce_61, 1420 3, 165, :_reduce_62, 1359 1421 1, 168, :_reduce_none, 1360 1, 168, :_reduce_none, 1361 1, 168, :_reduce_74, 1362 1, 168, :_reduce_none, 1363 1, 168, :_reduce_none, 1364 1, 168, :_reduce_77, 1365 1, 168, :_reduce_78, 1366 1, 168, :_reduce_79, 1367 4, 168, :_reduce_80, 1368 1, 176, :_reduce_81, 1369 1, 176, :_reduce_82, 1370 1, 176, :_reduce_83, 1371 1, 177, :_reduce_84, 1372 1, 177, :_reduce_85, 1373 1, 177, :_reduce_86, 1374 1, 177, :_reduce_87, 1375 1, 177, :_reduce_88, 1376 1, 177, :_reduce_89, 1377 1, 177, :_reduce_90, 1378 1, 177, :_reduce_91, 1379 1, 177, :_reduce_92, 1380 1, 177, :_reduce_93, 1381 1, 177, :_reduce_94, 1382 1, 177, :_reduce_95, 1383 1, 177, :_reduce_96, 1384 1, 177, :_reduce_97, 1385 1, 178, :_reduce_98, 1386 1, 178, :_reduce_99, 1387 2, 175, :_reduce_100, 1388 1, 175, :_reduce_none, 1389 0, 181, :_reduce_102, 1390 6, 173, :_reduce_103, 1391 0, 182, :_reduce_104, 1392 5, 173, :_reduce_105, 1393 2, 173, :_reduce_106, 1394 1, 180, :_reduce_none, 1395 2, 180, :_reduce_none, 1396 1, 179, :_reduce_109, 1397 3, 183, :_reduce_110, 1398 6, 183, :_reduce_111, 1399 1, 186, :_reduce_112, 1400 3, 186, :_reduce_113, 1401 1, 188, :_reduce_114, 1402 4, 188, :_reduce_115, 1403 4, 188, :_reduce_116, 1404 4, 188, :_reduce_117, 1405 1, 165, :_reduce_none, 1406 2, 165, :_reduce_119, 1407 1, 184, :_reduce_120, 1408 3, 184, :_reduce_121, 1409 1, 189, :_reduce_none, 1410 4, 174, :_reduce_none, 1411 5, 174, :_reduce_none, 1412 2, 174, :_reduce_none, 1413 1, 190, :_reduce_126, 1414 1, 190, :_reduce_127, 1415 1, 190, :_reduce_128, 1416 1, 190, :_reduce_129, 1417 1, 190, :_reduce_130, 1418 1, 190, :_reduce_131, 1419 1, 191, :_reduce_none, 1420 3, 191, :_reduce_none, 1422 2, 168, :_reduce_64, 1423 1, 167, :_reduce_65, 1424 3, 167, :_reduce_66, 1425 1, 171, :_reduce_none, 1426 3, 171, :_reduce_68, 1427 1, 169, :_reduce_69, 1428 1, 169, :_reduce_70, 1429 1, 169, :_reduce_71, 1430 1, 169, :_reduce_none, 1431 1, 169, :_reduce_none, 1432 1, 169, :_reduce_74, 1433 1, 169, :_reduce_none, 1434 1, 169, :_reduce_none, 1435 1, 169, :_reduce_77, 1436 1, 169, :_reduce_78, 1437 1, 169, :_reduce_79, 1438 4, 169, :_reduce_80, 1439 1, 177, :_reduce_81, 1440 1, 177, :_reduce_82, 1441 1, 177, :_reduce_83, 1442 1, 178, :_reduce_84, 1443 1, 178, :_reduce_85, 1444 1, 178, :_reduce_86, 1445 1, 178, :_reduce_87, 1446 1, 178, :_reduce_88, 1447 1, 178, :_reduce_89, 1448 1, 178, :_reduce_90, 1449 1, 178, :_reduce_91, 1450 1, 178, :_reduce_92, 1451 1, 178, :_reduce_93, 1452 1, 178, :_reduce_94, 1453 1, 178, :_reduce_95, 1454 1, 178, :_reduce_96, 1455 1, 178, :_reduce_97, 1456 1, 179, :_reduce_98, 1457 1, 179, :_reduce_99, 1458 2, 176, :_reduce_100, 1459 1, 176, :_reduce_none, 1460 0, 182, :_reduce_102, 1461 6, 174, :_reduce_103, 1462 0, 183, :_reduce_104, 1463 5, 174, :_reduce_105, 1464 2, 174, :_reduce_106, 1465 1, 181, :_reduce_none, 1466 2, 181, :_reduce_none, 1467 1, 180, :_reduce_109, 1468 3, 184, :_reduce_110, 1469 6, 184, :_reduce_111, 1470 1, 187, :_reduce_112, 1471 3, 187, :_reduce_113, 1472 1, 189, :_reduce_114, 1473 4, 189, :_reduce_115, 1474 4, 189, :_reduce_116, 1475 4, 189, :_reduce_117, 1476 1, 166, :_reduce_none, 1477 2, 166, :_reduce_119, 1478 1, 185, :_reduce_120, 1479 3, 185, :_reduce_121, 1480 1, 190, :_reduce_none, 1481 4, 175, :_reduce_none, 1482 5, 175, :_reduce_none, 1483 2, 175, :_reduce_none, 1484 1, 191, :_reduce_126, 1485 1, 191, :_reduce_127, 1486 1, 191, :_reduce_128, 1487 1, 191, :_reduce_129, 1488 1, 191, :_reduce_130, 1489 1, 191, :_reduce_131, 1421 1490 1, 192, :_reduce_none, 1422 1491 3, 192, :_reduce_none, 1423 1, 169, :_reduce_136, 1424 1, 169, :_reduce_137, 1425 2, 171, :_reduce_138, 1426 1, 171, :_reduce_none, 1427 1, 194, :_reduce_140, 1428 3, 194, :_reduce_141, 1429 4, 194, :_reduce_142, 1430 3, 194, :_reduce_143, 1431 4, 194, :_reduce_144, 1432 3, 194, :_reduce_145, 1433 1, 193, :_reduce_146, 1434 2, 193, :_reduce_147, 1435 2, 193, :_reduce_148, 1436 3, 193, :_reduce_149, 1437 1, 195, :_reduce_none, 1438 3, 195, :_reduce_none, 1439 1, 196, :_reduce_152, 1440 3, 196, :_reduce_153, 1441 3, 197, :_reduce_154, 1442 2, 197, :_reduce_155, 1443 1, 197, :_reduce_156, 1444 2, 197, :_reduce_157, 1445 3, 198, :_reduce_158, 1446 1, 199, :_reduce_159, 1447 3, 199, :_reduce_160, 1448 1, 200, :_reduce_161, 1449 1, 200, :_reduce_162, 1450 1, 200, :_reduce_163, 1451 4, 200, :_reduce_164, 1452 4, 200, :_reduce_165, 1453 1, 200, :_reduce_166, 1454 4, 200, :_reduce_167, 1455 4, 200, :_reduce_168, 1456 6, 200, :_reduce_169, 1457 4, 200, :_reduce_170, 1458 1, 200, :_reduce_171, 1459 1, 151, :_reduce_none, 1460 2, 151, :_reduce_173, 1461 1, 201, :_reduce_none, 1462 1, 201, :_reduce_none, 1463 2, 201, :_reduce_none, 1464 3, 202, :_reduce_177, 1465 2, 202, :_reduce_178, 1466 3, 202, :_reduce_179, 1467 3, 202, :_reduce_180, 1468 4, 202, :_reduce_181, 1469 2, 202, :_reduce_182, 1470 3, 202, :_reduce_none, 1471 3, 202, :_reduce_184, 1472 4, 202, :_reduce_185, 1473 1, 172, :_reduce_186, 1474 3, 172, :_reduce_187, 1475 4, 172, :_reduce_188, 1476 4, 172, :_reduce_189, 1477 1, 203, :_reduce_190, 1478 3, 203, :_reduce_191, 1479 2, 142, :_reduce_none, 1480 2, 142, :_reduce_none, 1481 0, 142, :_reduce_none, 1482 1, 204, :_reduce_none, 1483 4, 204, :_reduce_196, 1484 1, 206, :_reduce_none, 1485 1, 206, :_reduce_none, 1486 1, 206, :_reduce_none, 1487 1, 206, :_reduce_none, 1488 1, 206, :_reduce_none, 1489 1, 206, :_reduce_none, 1490 1, 206, :_reduce_none, 1491 2, 206, :_reduce_none, 1492 2, 206, :_reduce_none, 1493 1, 206, :_reduce_none, 1494 1, 206, :_reduce_none, 1495 1, 206, :_reduce_none, 1496 1, 206, :_reduce_none, 1497 1, 206, :_reduce_none, 1498 1, 207, :_reduce_211, 1499 3, 207, :_reduce_212, 1500 4, 219, :_reduce_213, 1501 1, 219, :_reduce_214, 1502 4, 219, :_reduce_215, 1503 1, 219, :_reduce_216, 1504 4, 219, :_reduce_217, 1505 1, 219, :_reduce_218, 1506 4, 219, :_reduce_219, 1507 1, 219, :_reduce_220, 1508 1, 219, :_reduce_221, 1509 1, 219, :_reduce_222, 1510 6, 219, :_reduce_223, 1511 1, 220, :_reduce_224, 1512 3, 220, :_reduce_225, 1513 7, 224, :_reduce_226, 1514 10, 224, :_reduce_227, 1515 1, 221, :_reduce_228, 1516 3, 221, :_reduce_229, 1517 5, 225, :_reduce_230, 1518 7, 225, :_reduce_231, 1519 1, 227, :_reduce_232, 1520 3, 227, :_reduce_233, 1521 1, 209, :_reduce_234, 1522 5, 217, :_reduce_235, 1523 7, 217, :_reduce_236, 1524 5, 216, :_reduce_237, 1525 5, 216, :_reduce_238, 1526 9, 218, :_reduce_239, 1527 4, 208, :_reduce_240, 1528 7, 208, :_reduce_241, 1529 1, 229, :_reduce_none, 1530 4, 229, :_reduce_none, 1531 1, 228, :_reduce_244, 1532 3, 228, :_reduce_245, 1533 6, 210, :_reduce_246, 1534 1, 230, :_reduce_247, 1492 1, 193, :_reduce_none, 1493 3, 193, :_reduce_none, 1494 1, 170, :_reduce_136, 1495 1, 170, :_reduce_137, 1496 2, 172, :_reduce_138, 1497 1, 172, :_reduce_none, 1498 1, 195, :_reduce_140, 1499 3, 195, :_reduce_141, 1500 4, 195, :_reduce_142, 1501 3, 195, :_reduce_143, 1502 4, 195, :_reduce_144, 1503 3, 195, :_reduce_145, 1504 1, 194, :_reduce_146, 1505 2, 194, :_reduce_147, 1506 2, 194, :_reduce_148, 1507 3, 194, :_reduce_149, 1508 1, 196, :_reduce_none, 1509 3, 196, :_reduce_none, 1510 1, 197, :_reduce_152, 1511 3, 197, :_reduce_153, 1512 3, 198, :_reduce_154, 1513 2, 198, :_reduce_155, 1514 1, 198, :_reduce_156, 1515 2, 198, :_reduce_157, 1516 3, 199, :_reduce_158, 1517 1, 200, :_reduce_159, 1518 3, 200, :_reduce_160, 1519 1, 201, :_reduce_161, 1520 1, 201, :_reduce_162, 1521 1, 201, :_reduce_163, 1522 4, 201, :_reduce_164, 1523 4, 201, :_reduce_165, 1524 1, 201, :_reduce_166, 1525 4, 201, :_reduce_167, 1526 4, 201, :_reduce_168, 1527 6, 201, :_reduce_169, 1528 4, 201, :_reduce_170, 1529 1, 201, :_reduce_171, 1530 1, 152, :_reduce_none, 1531 2, 152, :_reduce_173, 1532 1, 202, :_reduce_none, 1533 1, 202, :_reduce_none, 1534 2, 202, :_reduce_none, 1535 3, 203, :_reduce_177, 1536 2, 203, :_reduce_178, 1537 3, 203, :_reduce_179, 1538 3, 203, :_reduce_180, 1539 4, 203, :_reduce_181, 1540 2, 203, :_reduce_182, 1541 3, 203, :_reduce_none, 1542 3, 203, :_reduce_184, 1543 4, 203, :_reduce_185, 1544 1, 173, :_reduce_186, 1545 3, 173, :_reduce_187, 1546 4, 173, :_reduce_188, 1547 4, 173, :_reduce_189, 1548 1, 204, :_reduce_190, 1549 3, 204, :_reduce_191, 1550 2, 143, :_reduce_none, 1551 2, 143, :_reduce_none, 1552 2, 143, :_reduce_none, 1553 0, 143, :_reduce_none, 1554 1, 205, :_reduce_none, 1555 4, 205, :_reduce_197, 1556 1, 208, :_reduce_none, 1557 1, 208, :_reduce_none, 1558 1, 208, :_reduce_none, 1559 1, 208, :_reduce_none, 1560 1, 208, :_reduce_none, 1561 1, 208, :_reduce_none, 1562 1, 208, :_reduce_none, 1563 2, 208, :_reduce_none, 1564 2, 208, :_reduce_none, 1565 1, 208, :_reduce_none, 1566 1, 208, :_reduce_none, 1567 1, 208, :_reduce_none, 1568 1, 208, :_reduce_none, 1569 1, 208, :_reduce_none, 1570 1, 209, :_reduce_212, 1571 3, 209, :_reduce_213, 1572 4, 221, :_reduce_214, 1573 1, 221, :_reduce_215, 1574 4, 221, :_reduce_216, 1575 1, 221, :_reduce_217, 1576 4, 221, :_reduce_218, 1577 1, 221, :_reduce_219, 1578 4, 221, :_reduce_220, 1579 1, 221, :_reduce_221, 1580 1, 221, :_reduce_222, 1581 1, 221, :_reduce_223, 1582 6, 221, :_reduce_224, 1583 1, 222, :_reduce_225, 1584 3, 222, :_reduce_226, 1585 7, 226, :_reduce_227, 1586 10, 226, :_reduce_228, 1587 1, 223, :_reduce_229, 1588 3, 223, :_reduce_230, 1589 5, 227, :_reduce_231, 1590 7, 227, :_reduce_232, 1591 1, 229, :_reduce_233, 1592 3, 229, :_reduce_234, 1593 1, 211, :_reduce_235, 1594 5, 219, :_reduce_236, 1595 7, 219, :_reduce_237, 1596 5, 218, :_reduce_238, 1597 5, 218, :_reduce_239, 1598 9, 220, :_reduce_240, 1599 4, 210, :_reduce_241, 1600 7, 210, :_reduce_242, 1535 1601 1, 231, :_reduce_none, 1536 2, 231, :_reduce_none, 1537 1, 144, :_reduce_250, 1538 2, 144, :_reduce_251, 1539 3, 144, :_reduce_252, 1540 6, 211, :_reduce_253, 1541 1, 232, :_reduce_254, 1542 0, 233, :_reduce_255, 1543 2, 233, :_reduce_256, 1544 3, 234, :_reduce_257, 1545 6, 234, :_reduce_258, 1546 6, 212, :_reduce_259, 1547 1, 235, :_reduce_260, 1548 1, 236, :_reduce_none, 1549 2, 236, :_reduce_none, 1550 1, 237, :_reduce_263, 1551 4, 237, :_reduce_264, 1602 4, 231, :_reduce_none, 1603 1, 230, :_reduce_245, 1604 3, 230, :_reduce_246, 1605 6, 212, :_reduce_247, 1606 1, 232, :_reduce_248, 1607 1, 233, :_reduce_none, 1608 2, 233, :_reduce_none, 1609 1, 145, :_reduce_251, 1610 2, 145, :_reduce_252, 1611 3, 145, :_reduce_253, 1612 6, 213, :_reduce_254, 1613 1, 234, :_reduce_255, 1614 0, 235, :_reduce_256, 1615 2, 235, :_reduce_257, 1616 3, 236, :_reduce_258, 1617 6, 236, :_reduce_259, 1618 6, 214, :_reduce_260, 1619 1, 237, :_reduce_261, 1552 1620 1, 238, :_reduce_none, 1553 1, 238, :_reduce_none, 1554 1, 238, :_reduce_none, 1555 1, 238, :_reduce_none, 1556 1, 238, :_reduce_none, 1557 1, 239, :_reduce_270, 1558 3, 239, :_reduce_271, 1559 1, 245, :_reduce_272, 1560 4, 245, :_reduce_273, 1561 1, 245, :_reduce_274, 1562 1, 245, :_reduce_275, 1563 1, 245, :_reduce_276, 1564 1, 245, :_reduce_277, 1565 1, 246, :_reduce_278, 1566 1, 246, :_reduce_279, 1567 3, 246, :_reduce_280, 1568 3, 246, :_reduce_281, 1569 5, 247, :_reduce_282, 1570 5, 247, :_reduce_283, 1571 4, 240, :_reduce_284, 1572 6, 240, :_reduce_285, 1573 7, 240, :_reduce_286, 1574 8, 240, :_reduce_287, 1575 1, 248, :_reduce_288, 1576 1, 248, :_reduce_289, 1577 1, 249, :_reduce_290, 1578 1, 226, :_reduce_none, 1579 1, 250, :_reduce_none, 1580 5, 241, :_reduce_293, 1581 1, 251, :_reduce_294, 1582 2, 251, :_reduce_295, 1583 1, 252, :_reduce_296, 1584 4, 252, :_reduce_297, 1585 1, 253, :_reduce_298, 1586 4, 253, :_reduce_299, 1587 5, 253, :_reduce_300, 1588 3, 254, :_reduce_301, 1589 1, 254, :_reduce_302, 1590 1, 255, :_reduce_none, 1591 5, 242, :_reduce_304, 1592 1, 256, :_reduce_305, 1593 2, 256, :_reduce_306, 1594 1, 257, :_reduce_307, 1595 4, 257, :_reduce_308, 1596 4, 258, :_reduce_309, 1597 5, 243, :_reduce_310, 1598 7, 243, :_reduce_311, 1599 5, 244, :_reduce_none, 1600 1, 259, :_reduce_313, 1601 1, 259, :_reduce_314, 1602 0, 260, :_reduce_none, 1603 2, 260, :_reduce_none, 1604 7, 261, :_reduce_317, 1605 9, 261, :_reduce_318, 1606 1, 262, :_reduce_none, 1607 1, 263, :_reduce_320, 1608 3, 263, :_reduce_321, 1609 1, 263, :_reduce_322, 1610 3, 263, :_reduce_323, 1611 0, 267, :_reduce_324, 1612 8, 213, :_reduce_325, 1613 4, 213, :_reduce_326, 1614 1, 264, :_reduce_327, 1615 1, 265, :_reduce_328, 1616 0, 266, :_reduce_none, 1617 2, 266, :_reduce_none, 1618 2, 266, :_reduce_none, 1619 4, 268, :_reduce_332, 1620 1, 268, :_reduce_333, 1621 3, 270, :_reduce_334, 1622 1, 270, :_reduce_335, 1623 6, 272, :_reduce_336, 1624 1, 222, :_reduce_337, 1625 1, 223, :_reduce_none, 1626 6, 271, :_reduce_339, 1627 7, 271, :_reduce_340, 1628 4, 271, :_reduce_341, 1629 6, 271, :_reduce_342, 1630 1, 273, :_reduce_none, 1631 6, 269, :_reduce_344, 1632 9, 269, :_reduce_345, 1633 9, 269, :_reduce_346, 1634 12, 269, :_reduce_347, 1635 1, 274, :_reduce_none, 1636 6, 214, :_reduce_349, 1637 1, 275, :_reduce_350, 1621 2, 238, :_reduce_none, 1622 1, 239, :_reduce_264, 1623 4, 239, :_reduce_265, 1624 1, 240, :_reduce_none, 1625 1, 240, :_reduce_none, 1626 1, 240, :_reduce_none, 1627 1, 240, :_reduce_none, 1628 1, 240, :_reduce_none, 1629 1, 241, :_reduce_271, 1630 3, 241, :_reduce_272, 1631 1, 247, :_reduce_273, 1632 4, 247, :_reduce_274, 1633 1, 247, :_reduce_275, 1634 1, 247, :_reduce_276, 1635 1, 247, :_reduce_277, 1636 1, 247, :_reduce_278, 1637 1, 248, :_reduce_279, 1638 1, 248, :_reduce_280, 1639 3, 248, :_reduce_281, 1640 3, 248, :_reduce_282, 1641 5, 249, :_reduce_283, 1642 5, 249, :_reduce_284, 1643 4, 242, :_reduce_285, 1644 6, 242, :_reduce_286, 1645 7, 242, :_reduce_287, 1646 8, 242, :_reduce_288, 1647 1, 250, :_reduce_289, 1648 1, 250, :_reduce_290, 1649 1, 251, :_reduce_291, 1650 1, 228, :_reduce_none, 1651 1, 252, :_reduce_none, 1652 5, 243, :_reduce_294, 1653 1, 253, :_reduce_295, 1654 2, 253, :_reduce_296, 1655 1, 254, :_reduce_297, 1656 4, 254, :_reduce_298, 1657 1, 255, :_reduce_299, 1658 4, 255, :_reduce_300, 1659 5, 255, :_reduce_301, 1660 3, 256, :_reduce_302, 1661 1, 256, :_reduce_303, 1662 1, 257, :_reduce_none, 1663 5, 244, :_reduce_305, 1664 1, 258, :_reduce_306, 1665 2, 258, :_reduce_307, 1666 1, 259, :_reduce_308, 1667 4, 259, :_reduce_309, 1668 4, 260, :_reduce_310, 1669 5, 245, :_reduce_311, 1670 7, 245, :_reduce_312, 1671 5, 246, :_reduce_none, 1672 1, 261, :_reduce_314, 1673 1, 261, :_reduce_315, 1674 0, 262, :_reduce_none, 1675 2, 262, :_reduce_none, 1676 7, 263, :_reduce_318, 1677 9, 263, :_reduce_319, 1678 1, 264, :_reduce_none, 1679 1, 265, :_reduce_321, 1680 3, 265, :_reduce_322, 1681 1, 265, :_reduce_323, 1682 3, 265, :_reduce_324, 1683 0, 269, :_reduce_325, 1684 8, 215, :_reduce_326, 1685 4, 215, :_reduce_327, 1686 1, 266, :_reduce_328, 1687 1, 267, :_reduce_329, 1688 0, 268, :_reduce_none, 1689 2, 268, :_reduce_none, 1690 2, 268, :_reduce_none, 1691 4, 270, :_reduce_333, 1692 1, 270, :_reduce_334, 1693 3, 272, :_reduce_335, 1694 1, 272, :_reduce_336, 1695 6, 274, :_reduce_337, 1696 1, 224, :_reduce_338, 1697 1, 225, :_reduce_none, 1698 6, 273, :_reduce_340, 1699 7, 273, :_reduce_341, 1700 4, 273, :_reduce_342, 1701 6, 273, :_reduce_343, 1702 1, 275, :_reduce_none, 1703 6, 271, :_reduce_345, 1704 9, 271, :_reduce_346, 1705 9, 271, :_reduce_347, 1706 12, 271, :_reduce_348, 1638 1707 1, 276, :_reduce_none, 1639 2, 276, :_reduce_none, 1640 1, 277, :_reduce_353, 1641 4, 277, :_reduce_354, 1708 6, 216, :_reduce_350, 1709 1, 277, :_reduce_351, 1642 1710 1, 278, :_reduce_none, 1643 1, 278, :_reduce_none, 1644 1, 278, :_reduce_none, 1645 1, 278, :_reduce_none, 1646 1, 279, :_reduce_359, 1647 4, 284, :_reduce_360, 1648 1, 284, :_reduce_361, 1649 1, 284, :_reduce_362, 1650 1, 284, :_reduce_363, 1651 1, 284, :_reduce_364, 1652 1, 280, :_reduce_365, 1653 5, 281, :_reduce_366, 1654 1, 285, :_reduce_367, 1655 2, 285, :_reduce_368, 1656 0, 289, :_reduce_369, 1657 8, 282, :_reduce_370, 1658 4, 282, :_reduce_371, 1659 1, 286, :_reduce_372, 1660 1, 287, :_reduce_373, 1661 0, 288, :_reduce_none, 1662 2, 288, :_reduce_none, 1663 2, 288, :_reduce_none, 1664 6, 290, :_reduce_377, 1665 4, 290, :_reduce_378, 1666 6, 283, :_reduce_379, 1667 8, 283, :_reduce_380, 1668 1, 292, :_reduce_none, 1711 2, 278, :_reduce_none, 1712 1, 279, :_reduce_354, 1713 4, 279, :_reduce_355, 1714 1, 280, :_reduce_none, 1715 1, 280, :_reduce_none, 1716 1, 280, :_reduce_none, 1717 1, 280, :_reduce_none, 1718 1, 281, :_reduce_360, 1719 3, 281, :_reduce_361, 1720 4, 286, :_reduce_362, 1721 1, 286, :_reduce_363, 1722 1, 286, :_reduce_364, 1723 1, 286, :_reduce_365, 1724 1, 286, :_reduce_366, 1725 1, 282, :_reduce_367, 1726 5, 283, :_reduce_368, 1727 1, 287, :_reduce_369, 1728 2, 287, :_reduce_370, 1729 0, 291, :_reduce_371, 1730 8, 284, :_reduce_372, 1731 4, 284, :_reduce_373, 1732 1, 288, :_reduce_374, 1733 1, 289, :_reduce_375, 1734 0, 290, :_reduce_none, 1735 2, 290, :_reduce_none, 1736 2, 290, :_reduce_none, 1737 2, 290, :_reduce_none, 1738 6, 292, :_reduce_380, 1739 4, 292, :_reduce_381, 1740 6, 285, :_reduce_382, 1741 8, 285, :_reduce_383, 1742 1, 294, :_reduce_none, 1743 1, 295, :_reduce_none, 1669 1744 1, 293, :_reduce_none, 1670 1, 291, :_reduce_none, 1671 9, 215, :_reduce_384, 1672 6, 215, :_reduce_385, 1673 1, 294, :_reduce_none, 1674 3, 294, :_reduce_none, 1675 6, 297, :_reduce_388, 1676 3, 297, :_reduce_389, 1677 6, 297, :_reduce_390, 1678 3, 297, :_reduce_391, 1679 8, 297, :_reduce_392, 1680 4, 297, :_reduce_393, 1681 1, 297, :_reduce_394, 1682 1, 297, :_reduce_395, 1683 6, 297, :_reduce_396, 1684 4, 297, :_reduce_397, 1685 1, 295, :_reduce_398, 1686 0, 296, :_reduce_none, 1687 2, 296, :_reduce_none, 1688 2, 296, :_reduce_none, 1689 1, 299, :_reduce_none, 1690 4, 299, :_reduce_403, 1691 1, 298, :_reduce_404, 1692 1, 185, :_reduce_405, 1693 1, 187, :_reduce_406, 1694 4, 205, :_reduce_none, 1695 2, 300, :_reduce_none, 1696 2, 300, :_reduce_none, 1697 0, 300, :_reduce_none, 1698 14, 301, :_reduce_411, 1699 2, 303, :_reduce_412, 1700 0, 303, :_reduce_413, 1701 6, 304, :_reduce_414, 1702 13, 302, :_reduce_415, 1703 5, 305, :_reduce_416, 1704 0, 305, :_reduce_417 ] 1705 1706 racc_reduce_n = 418 1707 1708 racc_shift_n = 870 1745 9, 217, :_reduce_387, 1746 6, 217, :_reduce_388, 1747 1, 296, :_reduce_none, 1748 3, 296, :_reduce_none, 1749 6, 299, :_reduce_391, 1750 3, 299, :_reduce_392, 1751 6, 299, :_reduce_393, 1752 3, 299, :_reduce_394, 1753 8, 299, :_reduce_395, 1754 4, 299, :_reduce_396, 1755 1, 299, :_reduce_397, 1756 1, 299, :_reduce_398, 1757 6, 299, :_reduce_399, 1758 4, 299, :_reduce_400, 1759 1, 297, :_reduce_401, 1760 0, 298, :_reduce_none, 1761 2, 298, :_reduce_none, 1762 2, 298, :_reduce_none, 1763 1, 301, :_reduce_none, 1764 4, 301, :_reduce_406, 1765 1, 300, :_reduce_407, 1766 1, 186, :_reduce_408, 1767 1, 188, :_reduce_409, 1768 4, 206, :_reduce_none, 1769 2, 302, :_reduce_none, 1770 2, 302, :_reduce_none, 1771 0, 302, :_reduce_none, 1772 14, 303, :_reduce_414, 1773 2, 305, :_reduce_415, 1774 0, 305, :_reduce_416, 1775 6, 306, :_reduce_417, 1776 13, 304, :_reduce_418, 1777 5, 307, :_reduce_419, 1778 0, 307, :_reduce_420, 1779 5, 207, :_reduce_421, 1780 3, 309, :_reduce_422, 1781 3, 310, :_reduce_423, 1782 5, 310, :_reduce_424, 1783 1, 311, :_reduce_none, 1784 1, 311, :_reduce_none, 1785 1, 311, :_reduce_none, 1786 1, 311, :_reduce_none, 1787 1, 311, :_reduce_429, 1788 1, 311, :_reduce_430, 1789 3, 313, :_reduce_431, 1790 2, 313, :_reduce_432, 1791 1, 314, :_reduce_433, 1792 3, 314, :_reduce_434, 1793 1, 308, :_reduce_435, 1794 1, 312, :_reduce_436, 1795 1, 312, :_reduce_437, 1796 2, 312, :_reduce_438, 1797 2, 312, :_reduce_439, 1798 2, 312, :_reduce_440, 1799 2, 312, :_reduce_441 ] 1800 1801 racc_reduce_n = 442 1802 1803 racc_shift_n = 911 1709 1804 1710 1805 racc_token_table = { … … 1848 1943 :__LOCATION_INFORMATION__ => 137, 1849 1944 :__CELL__ => 138, 1850 :__JOIN__ => 139 } 1851 1852 racc_nt_base = 140 1945 :__JOIN__ => 139, 1946 :TOOL_INFO => 140 } 1947 1948 racc_nt_base = 141 1853 1949 1854 1950 racc_use_result_var = true … … 2011 2107 "__CELL__", 2012 2108 "__JOIN__", 2109 "TOOL_INFO", 2013 2110 "$start", 2014 2111 "all", … … 2077 2174 "specified_statement", 2078 2175 "location_information", 2176 "tool_info", 2079 2177 "statement", 2080 2178 "statement_specifier_list", … … 2089 2187 "import", 2090 2188 "import_C", 2091 " signature_plugin",2189 "generate_statement", 2092 2190 "statement_specifier", 2093 2191 "alloc_list", … … 2176 2274 "port_location_list", 2177 2275 "port_location", 2178 "bar_list" ] 2276 "bar_list", 2277 "JSON_string", 2278 "JSON_object", 2279 "JSON_property_list", 2280 "JSON_value", 2281 "JSON_number", 2282 "JSON_array", 2283 "JSON_array_list" ] 2179 2284 2180 2285 Racc_debug_parser = false … … 2838 2943 module_eval(<<'.,.,', 'bnf.y.rb', 379) 2839 2944 def _reduce_104(val, _values, result) 2840 result = StructType.new() 2945 # tag が無い場合、内部名を与える 2946 result = StructType.new( :"TAG__#{@@no_struct_tag_num}__" ) 2947 @@no_struct_tag_num += 1 2841 2948 StructType.set_define( true ) 2842 2949 … … 2845 2952 .,., 2846 2953 2847 module_eval(<<'.,.,', 'bnf.y.rb', 38 4)2954 module_eval(<<'.,.,', 'bnf.y.rb', 386) 2848 2955 def _reduce_105(val, _values, result) 2849 2956 StructType.end_of_parse … … 2854 2961 .,., 2855 2962 2856 module_eval(<<'.,.,', 'bnf.y.rb', 3 89)2963 module_eval(<<'.,.,', 'bnf.y.rb', 391) 2857 2964 def _reduce_106(val, _values, result) 2858 2965 StructType.set_define( false ) … … 2868 2975 # reduce 108 omitted 2869 2976 2870 module_eval(<<'.,.,', 'bnf.y.rb', 40 0)2977 module_eval(<<'.,.,', 'bnf.y.rb', 402) 2871 2978 def _reduce_109(val, _values, result) 2872 2979 result = StructType.new( val[0].val ) … … 2875 2982 .,., 2876 2983 2877 module_eval(<<'.,.,', 'bnf.y.rb', 40 6)2984 module_eval(<<'.,.,', 'bnf.y.rb', 408) 2878 2985 def _reduce_110(val, _values, result) 2879 2986 val[1].each { |i| # i: Decl … … 2889 2996 .,., 2890 2997 2891 module_eval(<<'.,.,', 'bnf.y.rb', 41 6)2998 module_eval(<<'.,.,', 'bnf.y.rb', 418) 2892 2999 def _reduce_111(val, _values, result) 2893 3000 val[4].each { |i| # i: Decl … … 2904 3011 .,., 2905 3012 2906 module_eval(<<'.,.,', 'bnf.y.rb', 42 7)3013 module_eval(<<'.,.,', 'bnf.y.rb', 429) 2907 3014 def _reduce_112(val, _values, result) 2908 3015 result = [ val[0] ] … … 2911 3018 .,., 2912 3019 2913 module_eval(<<'.,.,', 'bnf.y.rb', 4 28)3020 module_eval(<<'.,.,', 'bnf.y.rb', 430) 2914 3021 def _reduce_113(val, _values, result) 2915 3022 result << val[2] … … 2918 3025 .,., 2919 3026 2920 module_eval(<<'.,.,', 'bnf.y.rb', 43 1)3027 module_eval(<<'.,.,', 'bnf.y.rb', 433) 2921 3028 def _reduce_114(val, _values, result) 2922 3029 result = [:STRING,-1] … … 2925 3032 .,., 2926 3033 2927 module_eval(<<'.,.,', 'bnf.y.rb', 43 2)3034 module_eval(<<'.,.,', 'bnf.y.rb', 434) 2928 3035 def _reduce_115(val, _values, result) 2929 3036 result = [:STRING,val[2]] … … 2932 3039 .,., 2933 3040 2934 module_eval(<<'.,.,', 'bnf.y.rb', 43 3)3041 module_eval(<<'.,.,', 'bnf.y.rb', 435) 2935 3042 def _reduce_116(val, _values, result) 2936 3043 result = [:SIZE_IS,val[2]] … … 2939 3046 .,., 2940 3047 2941 module_eval(<<'.,.,', 'bnf.y.rb', 43 4)3048 module_eval(<<'.,.,', 'bnf.y.rb', 436) 2942 3049 def _reduce_117(val, _values, result) 2943 3050 result = [:COUNT_IS,val[2]] … … 2948 3055 # reduce 118 omitted 2949 3056 2950 module_eval(<<'.,.,', 'bnf.y.rb', 44 5)3057 module_eval(<<'.,.,', 'bnf.y.rb', 447) 2951 3058 def _reduce_119(val, _values, result) 2952 3059 val[1].set_qualifier( val[0] ) … … 2957 3064 .,., 2958 3065 2959 module_eval(<<'.,.,', 'bnf.y.rb', 45 4)3066 module_eval(<<'.,.,', 'bnf.y.rb', 456) 2960 3067 def _reduce_120(val, _values, result) 2961 3068 result = [ val[0] ] … … 2964 3071 .,., 2965 3072 2966 module_eval(<<'.,.,', 'bnf.y.rb', 45 6)3073 module_eval(<<'.,.,', 'bnf.y.rb', 458) 2967 3074 def _reduce_121(val, _values, result) 2968 3075 result << val[2] … … 2979 3086 # reduce 125 omitted 2980 3087 2981 module_eval(<<'.,.,', 'bnf.y.rb', 4 69)3088 module_eval(<<'.,.,', 'bnf.y.rb', 471) 2982 3089 def _reduce_126(val, _values, result) 2983 3090 result = EnumType.new( -1 ) … … 2986 3093 .,., 2987 3094 2988 module_eval(<<'.,.,', 'bnf.y.rb', 47 0)3095 module_eval(<<'.,.,', 'bnf.y.rb', 472) 2989 3096 def _reduce_127(val, _values, result) 2990 3097 result = EnumType.new( 8 ) … … 2993 3100 .,., 2994 3101 2995 module_eval(<<'.,.,', 'bnf.y.rb', 47 1)3102 module_eval(<<'.,.,', 'bnf.y.rb', 473) 2996 3103 def _reduce_128(val, _values, result) 2997 3104 result = EnumType.new( 16 ) … … 3000 3107 .,., 3001 3108 3002 module_eval(<<'.,.,', 'bnf.y.rb', 47 2)3109 module_eval(<<'.,.,', 'bnf.y.rb', 474) 3003 3110 def _reduce_129(val, _values, result) 3004 3111 result = EnumType.new( 32 ) … … 3007 3114 .,., 3008 3115 3009 module_eval(<<'.,.,', 'bnf.y.rb', 47 3)3116 module_eval(<<'.,.,', 'bnf.y.rb', 475) 3010 3117 def _reduce_130(val, _values, result) 3011 3118 result = EnumType.new( 64 ) … … 3014 3121 .,., 3015 3122 3016 module_eval(<<'.,.,', 'bnf.y.rb', 47 4)3123 module_eval(<<'.,.,', 'bnf.y.rb', 476) 3017 3124 def _reduce_131(val, _values, result) 3018 3125 result = EnumType.new( 128 ) … … 3029 3136 # reduce 135 omitted 3030 3137 3031 module_eval(<<'.,.,', 'bnf.y.rb', 48 5)3138 module_eval(<<'.,.,', 'bnf.y.rb', 487) 3032 3139 def _reduce_136(val, _values, result) 3033 3140 result = :CONST … … 3036 3143 .,., 3037 3144 3038 module_eval(<<'.,.,', 'bnf.y.rb', 48 6)3145 module_eval(<<'.,.,', 'bnf.y.rb', 488) 3039 3146 def _reduce_137(val, _values, result) 3040 3147 result = :VOLATILE … … 3043 3150 .,., 3044 3151 3045 module_eval(<<'.,.,', 'bnf.y.rb', 49 1)3152 module_eval(<<'.,.,', 'bnf.y.rb', 493) 3046 3153 def _reduce_138(val, _values, result) 3047 3154 val[1].set_type( val[0] ) … … 3054 3161 # reduce 139 omitted 3055 3162 3056 module_eval(<<'.,.,', 'bnf.y.rb', 498)3163 module_eval(<<'.,.,', 'bnf.y.rb', 500) 3057 3164 def _reduce_140(val, _values, result) 3058 3165 result = Decl.new( val[0].val ) … … 3061 3168 .,., 3062 3169 3063 module_eval(<<'.,.,', 'bnf.y.rb', 50 0)3170 module_eval(<<'.,.,', 'bnf.y.rb', 502) 3064 3171 def _reduce_141(val, _values, result) 3065 3172 result = val[1] … … 3068 3175 .,., 3069 3176 3070 module_eval(<<'.,.,', 'bnf.y.rb', 50 3)3177 module_eval(<<'.,.,', 'bnf.y.rb', 505) 3071 3178 def _reduce_142(val, _values, result) 3072 3179 val[0].set_type( ArrayType.new( val[2] ) ) … … 3077 3184 .,., 3078 3185 3079 module_eval(<<'.,.,', 'bnf.y.rb', 5 08)3186 module_eval(<<'.,.,', 'bnf.y.rb', 510) 3080 3187 def _reduce_143(val, _values, result) 3081 3188 val[0].set_type( ArrayType.new ) … … 3086 3193 .,., 3087 3194 3088 module_eval(<<'.,.,', 'bnf.y.rb', 51 3)3195 module_eval(<<'.,.,', 'bnf.y.rb', 515) 3089 3196 def _reduce_144(val, _values, result) 3090 3197 val[0].set_type( FuncType.new( val[2] ) ) … … 3095 3202 .,., 3096 3203 3097 module_eval(<<'.,.,', 'bnf.y.rb', 5 19)3204 module_eval(<<'.,.,', 'bnf.y.rb', 521) 3098 3205 def _reduce_145(val, _values, result) 3099 3206 Generator.warning( "W5010 need 'void' for no parameter" ) … … 3105 3212 .,., 3106 3213 3107 module_eval(<<'.,.,', 'bnf.y.rb', 52 6)3214 module_eval(<<'.,.,', 'bnf.y.rb', 528) 3108 3215 def _reduce_146(val, _values, result) 3109 3216 result = PtrType.new … … 3112 3219 .,., 3113 3220 3114 module_eval(<<'.,.,', 'bnf.y.rb', 5 29)3221 module_eval(<<'.,.,', 'bnf.y.rb', 531) 3115 3222 def _reduce_147(val, _values, result) 3116 3223 result = PtrType.new … … 3121 3228 .,., 3122 3229 3123 module_eval(<<'.,.,', 'bnf.y.rb', 53 4)3230 module_eval(<<'.,.,', 'bnf.y.rb', 536) 3124 3231 def _reduce_148(val, _values, result) 3125 3232 val[1].set_type(PtrType.new) … … 3130 3237 .,., 3131 3238 3132 module_eval(<<'.,.,', 'bnf.y.rb', 5 39)3239 module_eval(<<'.,.,', 'bnf.y.rb', 541) 3133 3240 def _reduce_149(val, _values, result) 3134 3241 ptrtype = PtrType.new … … 3145 3252 # reduce 151 omitted 3146 3253 3147 module_eval(<<'.,.,', 'bnf.y.rb', 55 3)3254 module_eval(<<'.,.,', 'bnf.y.rb', 555) 3148 3255 def _reduce_152(val, _values, result) 3149 3256 result = ParamList.new( val[0] ) … … 3152 3259 .,., 3153 3260 3154 module_eval(<<'.,.,', 'bnf.y.rb', 55 6)3261 module_eval(<<'.,.,', 'bnf.y.rb', 558) 3155 3262 def _reduce_153(val, _values, result) 3156 3263 val[0].add_param( val[2] ) … … 3161 3268 .,., 3162 3269 3163 module_eval(<<'.,.,', 'bnf.y.rb', 56 6)3270 module_eval(<<'.,.,', 'bnf.y.rb', 568) 3164 3271 def _reduce_154(val, _values, result) 3165 3272 val[2].set_kind( :PARAMETER ) … … 3172 3279 .,., 3173 3280 3174 module_eval(<<'.,.,', 'bnf.y.rb', 57 5)3281 module_eval(<<'.,.,', 'bnf.y.rb', 577) 3175 3282 def _reduce_155(val, _values, result) 3176 3283 Generator.error( "G1001 need specifier for \'$1\'" , val[1].get_name ) … … 3181 3288 .,., 3182 3289 3183 module_eval(<<'.,.,', 'bnf.y.rb', 58 0)3290 module_eval(<<'.,.,', 'bnf.y.rb', 582) 3184 3291 def _reduce_156(val, _values, result) 3185 3292 unless val[0].instance_of?( VoidType ) then … … 3192 3299 .,., 3193 3300 3194 module_eval(<<'.,.,', 'bnf.y.rb', 5 88)3301 module_eval(<<'.,.,', 'bnf.y.rb', 590) 3195 3302 def _reduce_157(val, _values, result) 3196 3303 unless val[1].instance_of?( VoidType ) then … … 3203 3310 .,., 3204 3311 3205 module_eval(<<'.,.,', 'bnf.y.rb', 59 5)3312 module_eval(<<'.,.,', 'bnf.y.rb', 597) 3206 3313 def _reduce_158(val, _values, result) 3207 3314 result = val[1] … … 3210 3317 .,., 3211 3318 3212 module_eval(<<'.,.,', 'bnf.y.rb', 599)3319 module_eval(<<'.,.,', 'bnf.y.rb', 601) 3213 3320 def _reduce_159(val, _values, result) 3214 3321 result = val[0] … … 3217 3324 .,., 3218 3325 3219 module_eval(<<'.,.,', 'bnf.y.rb', 60 1)3326 module_eval(<<'.,.,', 'bnf.y.rb', 603) 3220 3327 def _reduce_160(val, _values, result) 3221 3328 result = result + val[2] … … 3224 3331 .,., 3225 3332 3226 module_eval(<<'.,.,', 'bnf.y.rb', 60 4)3333 module_eval(<<'.,.,', 'bnf.y.rb', 606) 3227 3334 def _reduce_161(val, _values, result) 3228 3335 result = [ [:IN] ] … … 3231 3338 .,., 3232 3339 3233 module_eval(<<'.,.,', 'bnf.y.rb', 60 5)3340 module_eval(<<'.,.,', 'bnf.y.rb', 607) 3234 3341 def _reduce_162(val, _values, result) 3235 3342 result = [ [:OUT] ] … … 3238 3345 .,., 3239 3346 3240 module_eval(<<'.,.,', 'bnf.y.rb', 60 6)3347 module_eval(<<'.,.,', 'bnf.y.rb', 608) 3241 3348 def _reduce_163(val, _values, result) 3242 3349 result = [ [:INOUT] ] … … 3245 3352 .,., 3246 3353 3247 module_eval(<<'.,.,', 'bnf.y.rb', 60 7)3354 module_eval(<<'.,.,', 'bnf.y.rb', 609) 3248 3355 def _reduce_164(val, _values, result) 3249 3356 result = [ [:SEND, val[2]] ] … … 3252 3359 .,., 3253 3360 3254 module_eval(<<'.,.,', 'bnf.y.rb', 6 08)3361 module_eval(<<'.,.,', 'bnf.y.rb', 610) 3255 3362 def _reduce_165(val, _values, result) 3256 3363 result = [ [:RECEIVE,val[2]] ] … … 3259 3366 .,., 3260 3367 3261 module_eval(<<'.,.,', 'bnf.y.rb', 6 09)3368 module_eval(<<'.,.,', 'bnf.y.rb', 611) 3262 3369 def _reduce_166(val, _values, result) 3263 3370 result = [ [:STRING,nil] ] … … 3266 3373 .,., 3267 3374 3268 module_eval(<<'.,.,', 'bnf.y.rb', 61 0)3375 module_eval(<<'.,.,', 'bnf.y.rb', 612) 3269 3376 def _reduce_167(val, _values, result) 3270 3377 result = [ [:STRING, val[2]] ] … … 3273 3380 .,., 3274 3381 3275 module_eval(<<'.,.,', 'bnf.y.rb', 61 1)3382 module_eval(<<'.,.,', 'bnf.y.rb', 613) 3276 3383 def _reduce_168(val, _values, result) 3277 3384 result = [ [:SIZE_IS, val[2]] ] … … 3280 3387 .,., 3281 3388 3282 module_eval(<<'.,.,', 'bnf.y.rb', 61 4)3389 module_eval(<<'.,.,', 'bnf.y.rb', 616) 3283 3390 def _reduce_169(val, _values, result) 3284 3391 result = [ [:SIZE_IS,val[2]], [:MAX_IS, val[4]] ] … … 3288 3395 .,., 3289 3396 3290 module_eval(<<'.,.,', 'bnf.y.rb', 61 6)3397 module_eval(<<'.,.,', 'bnf.y.rb', 618) 3291 3398 def _reduce_170(val, _values, result) 3292 3399 result = [ [:COUNT_IS,val[2]] ] … … 3295 3402 .,., 3296 3403 3297 module_eval(<<'.,.,', 'bnf.y.rb', 61 7)3404 module_eval(<<'.,.,', 'bnf.y.rb', 619) 3298 3405 def _reduce_171(val, _values, result) 3299 3406 result = [ [:NULLABLE] ] … … 3304 3411 # reduce 172 omitted 3305 3412 3306 module_eval(<<'.,.,', 'bnf.y.rb', 62 3)3413 module_eval(<<'.,.,', 'bnf.y.rb', 625) 3307 3414 def _reduce_173(val, _values, result) 3308 3415 if val[1] then … … 3324 3431 # reduce 176 omitted 3325 3432 3326 module_eval(<<'.,.,', 'bnf.y.rb', 64 0)3433 module_eval(<<'.,.,', 'bnf.y.rb', 642) 3327 3434 def _reduce_177(val, _values, result) 3328 3435 result = val[1] … … 3331 3438 .,., 3332 3439 3333 module_eval(<<'.,.,', 'bnf.y.rb', 64 3)3440 module_eval(<<'.,.,', 'bnf.y.rb', 645) 3334 3441 def _reduce_178(val, _values, result) 3335 3442 Generator.error( "G1004 impossible array type" ) … … 3340 3447 .,., 3341 3448 3342 module_eval(<<'.,.,', 'bnf.y.rb', 6 48)3449 module_eval(<<'.,.,', 'bnf.y.rb', 650) 3343 3450 def _reduce_179(val, _values, result) 3344 3451 Generator.error( "G1005 impossible array type" ) … … 3349 3456 .,., 3350 3457 3351 module_eval(<<'.,.,', 'bnf.y.rb', 65 3)3458 module_eval(<<'.,.,', 'bnf.y.rb', 655) 3352 3459 def _reduce_180(val, _values, result) 3353 3460 Generator.error( "G1006 impossible array type" ) … … 3358 3465 .,., 3359 3466 3360 module_eval(<<'.,.,', 'bnf.y.rb', 6 58)3467 module_eval(<<'.,.,', 'bnf.y.rb', 660) 3361 3468 def _reduce_181(val, _values, result) 3362 3469 Generator.error( "G1007 impossible array type" ) … … 3367 3474 .,., 3368 3475 3369 module_eval(<<'.,.,', 'bnf.y.rb', 66 3)3476 module_eval(<<'.,.,', 'bnf.y.rb', 665) 3370 3477 def _reduce_182(val, _values, result) 3371 3478 Generator.error( "G1008 impossible function type" ) … … 3378 3485 # reduce 183 omitted 3379 3486 3380 module_eval(<<'.,.,', 'bnf.y.rb', 6 69)3487 module_eval(<<'.,.,', 'bnf.y.rb', 671) 3381 3488 def _reduce_184(val, _values, result) 3382 3489 Generator.warning( "W5011 need 'void' for no parameter" ) … … 3388 3495 .,., 3389 3496 3390 module_eval(<<'.,.,', 'bnf.y.rb', 67 5)3497 module_eval(<<'.,.,', 'bnf.y.rb', 677) 3391 3498 def _reduce_185(val, _values, result) 3392 3499 val[0].set_type( FuncType.new( val[2] ) ) … … 3397 3504 .,., 3398 3505 3399 module_eval(<<'.,.,', 'bnf.y.rb', 68 2)3506 module_eval(<<'.,.,', 'bnf.y.rb', 684) 3400 3507 def _reduce_186(val, _values, result) 3401 3508 result = val[0] … … 3404 3511 .,., 3405 3512 3406 module_eval(<<'.,.,', 'bnf.y.rb', 68 4)3513 module_eval(<<'.,.,', 'bnf.y.rb', 686) 3407 3514 def _reduce_187(val, _values, result) 3408 3515 result = val[1] … … 3411 3518 .,., 3412 3519 3413 module_eval(<<'.,.,', 'bnf.y.rb', 68 6)3520 module_eval(<<'.,.,', 'bnf.y.rb', 688) 3414 3521 def _reduce_188(val, _values, result) 3415 3522 result = val[1] … … 3418 3525 .,., 3419 3526 3420 module_eval(<<'.,.,', 'bnf.y.rb', 6 89)3527 module_eval(<<'.,.,', 'bnf.y.rb', 691) 3421 3528 def _reduce_189(val, _values, result) 3422 3529 result = C_EXP.new( val[2] ) … … 3425 3532 .,., 3426 3533 3427 module_eval(<<'.,.,', 'bnf.y.rb', 69 4)3534 module_eval(<<'.,.,', 'bnf.y.rb', 696) 3428 3535 def _reduce_190(val, _values, result) 3429 3536 result = [ val[0] ] … … 3433 3540 .,., 3434 3541 3435 module_eval(<<'.,.,', 'bnf.y.rb', 698)3542 module_eval(<<'.,.,', 'bnf.y.rb', 700) 3436 3543 def _reduce_191(val, _values, result) 3437 3544 val[0] << val[2] … … 3450 3557 # reduce 195 omitted 3451 3558 3452 module_eval(<<'.,.,', 'bnf.y.rb', 716) 3453 def _reduce_196(val, _values, result) 3559 # reduce 196 omitted 3560 3561 module_eval(<<'.,.,', 'bnf.y.rb', 719) 3562 def _reduce_197(val, _values, result) 3454 3563 obj = val[3] 3455 3564 if obj.kind_of?( Cell ) || obj.kind_of?( Signature ) || obj.kind_of?( Celltype ) || obj.kind_of?( CompositeCelltype )then … … 3464 3573 .,., 3465 3574 3466 # reduce 197 omitted3467 3468 3575 # reduce 198 omitted 3469 3576 … … 3492 3599 # reduce 210 omitted 3493 3600 3494 module_eval(<<'.,.,', 'bnf.y.rb', 745) 3495 def _reduce_211(val, _values, result) 3601 # reduce 211 omitted 3602 3603 module_eval(<<'.,.,', 'bnf.y.rb', 748) 3604 def _reduce_212(val, _values, result) 3496 3605 Generator.add_statement_specifier val[0] 3497 3606 result … … 3499 3608 .,., 3500 3609 3501 module_eval(<<'.,.,', 'bnf.y.rb', 7 47)3502 def _reduce_21 2(val, _values, result)3610 module_eval(<<'.,.,', 'bnf.y.rb', 750) 3611 def _reduce_213(val, _values, result) 3503 3612 Generator.add_statement_specifier val[2] 3504 3613 result … … 3506 3615 .,., 3507 3616 3508 module_eval(<<'.,.,', 'bnf.y.rb', 75 1)3509 def _reduce_21 3(val, _values, result)3617 module_eval(<<'.,.,', 'bnf.y.rb', 754) 3618 def _reduce_214(val, _values, result) 3510 3619 result = [ :ALLOCATOR, val[2] ] 3511 3620 result … … 3513 3622 .,., 3514 3623 3515 module_eval(<<'.,.,', 'bnf.y.rb', 75 3)3516 def _reduce_21 4(val, _values, result)3624 module_eval(<<'.,.,', 'bnf.y.rb', 756) 3625 def _reduce_215(val, _values, result) 3517 3626 result = [ :CALLBACK ] 3518 3627 result … … 3520 3629 .,., 3521 3630 3522 module_eval(<<'.,.,', 'bnf.y.rb', 75 5)3523 def _reduce_21 5(val, _values, result)3631 module_eval(<<'.,.,', 'bnf.y.rb', 758) 3632 def _reduce_216(val, _values, result) 3524 3633 result = [ :CONTEXT, val[2].val ] 3525 3634 result … … 3527 3636 .,., 3528 3637 3529 module_eval(<<'.,.,', 'bnf.y.rb', 7 57)3530 def _reduce_21 6(val, _values, result)3638 module_eval(<<'.,.,', 'bnf.y.rb', 760) 3639 def _reduce_217(val, _values, result) 3531 3640 result = [ :DEVIATE ] 3532 3641 result … … 3534 3643 .,., 3535 3644 3536 module_eval(<<'.,.,', 'bnf.y.rb', 7 59)3537 def _reduce_21 7(val, _values, result)3645 module_eval(<<'.,.,', 'bnf.y.rb', 762) 3646 def _reduce_218(val, _values, result) 3538 3647 result = [ :ID, val[2] ] 3539 3648 result … … 3541 3650 .,., 3542 3651 3543 module_eval(<<'.,.,', 'bnf.y.rb', 76 1)3544 def _reduce_21 8(val, _values, result)3652 module_eval(<<'.,.,', 'bnf.y.rb', 764) 3653 def _reduce_219(val, _values, result) 3545 3654 result = [ :PROTOTYPE ] 3546 3655 result … … 3548 3657 .,., 3549 3658 3550 module_eval(<<'.,.,', 'bnf.y.rb', 76 3)3551 def _reduce_2 19(val, _values, result)3659 module_eval(<<'.,.,', 'bnf.y.rb', 766) 3660 def _reduce_220(val, _values, result) 3552 3661 result = [ :RESTRICT, val[2] ] 3553 3662 result … … 3555 3664 .,., 3556 3665 3557 module_eval(<<'.,.,', 'bnf.y.rb', 76 4)3558 def _reduce_22 0(val, _values, result)3666 module_eval(<<'.,.,', 'bnf.y.rb', 767) 3667 def _reduce_221(val, _values, result) 3559 3668 result = [:SINGLETON] 3560 3669 result … … 3562 3671 .,., 3563 3672 3564 module_eval(<<'.,.,', 'bnf.y.rb', 76 5)3565 def _reduce_22 1(val, _values, result)3673 module_eval(<<'.,.,', 'bnf.y.rb', 768) 3674 def _reduce_222(val, _values, result) 3566 3675 result = [:IDX_IS_ID] 3567 3676 result … … 3569 3678 .,., 3570 3679 3571 module_eval(<<'.,.,', 'bnf.y.rb', 76 6)3572 def _reduce_22 2(val, _values, result)3680 module_eval(<<'.,.,', 'bnf.y.rb', 769) 3681 def _reduce_223(val, _values, result) 3573 3682 result = [:ACTIVE] 3574 result3575 end3576 .,.,3577 3578 module_eval(<<'.,.,', 'bnf.y.rb', 768)3579 def _reduce_223(val, _values, result)3580 result = [:GENERATE, val[2].val, val[4].val]3581 3683 result 3582 3684 end … … 3585 3687 module_eval(<<'.,.,', 'bnf.y.rb', 771) 3586 3688 def _reduce_224(val, _values, result) 3689 result = [:GENERATE, val[2].val, val[4].val] 3690 result 3691 end 3692 .,., 3693 3694 module_eval(<<'.,.,', 'bnf.y.rb', 774) 3695 def _reduce_225(val, _values, result) 3587 3696 result = [ val[0] ] 3588 3697 result … … 3590 3699 .,., 3591 3700 3592 module_eval(<<'.,.,', 'bnf.y.rb', 77 2)3593 def _reduce_22 5(val, _values, result)3701 module_eval(<<'.,.,', 'bnf.y.rb', 775) 3702 def _reduce_226(val, _values, result) 3594 3703 result << val[2] 3595 3704 result … … 3597 3706 .,., 3598 3707 3599 module_eval(<<'.,.,', 'bnf.y.rb', 77 6)3600 def _reduce_22 6(val, _values, result)3708 module_eval(<<'.,.,', 'bnf.y.rb', 779) 3709 def _reduce_227(val, _values, result) 3601 3710 result = [ :NORMAL_ALLOC, val[0], nil, val[2], val[4], val[6] ] 3602 3711 result … … 3604 3713 .,., 3605 3714 3606 module_eval(<<'.,.,', 'bnf.y.rb', 7 78)3607 def _reduce_22 7(val, _values, result)3715 module_eval(<<'.,.,', 'bnf.y.rb', 781) 3716 def _reduce_228(val, _values, result) 3608 3717 result = [ :NORMAL_ALLOC, val[0], val[2], val[5], val[7], val[9] ] 3609 3718 result … … 3611 3720 .,., 3612 3721 3613 module_eval(<<'.,.,', 'bnf.y.rb', 7 87)3614 def _reduce_22 8(val, _values, result)3722 module_eval(<<'.,.,', 'bnf.y.rb', 790) 3723 def _reduce_229(val, _values, result) 3615 3724 result = [val[0]] 3616 3725 result … … 3618 3727 .,., 3619 3728 3620 module_eval(<<'.,.,', 'bnf.y.rb', 7 89)3621 def _reduce_2 29(val, _values, result)3729 module_eval(<<'.,.,', 'bnf.y.rb', 792) 3730 def _reduce_230(val, _values, result) 3622 3731 result << val[2] 3623 3732 result … … 3625 3734 .,., 3626 3735 3627 module_eval(<<'.,.,', 'bnf.y.rb', 79 3)3628 def _reduce_23 0(val, _values, result)3736 module_eval(<<'.,.,', 'bnf.y.rb', 796) 3737 def _reduce_231(val, _values, result) 3629 3738 result = [ val[0].val, nil, val[3] ] 3630 3739 result … … 3632 3741 .,., 3633 3742 3634 module_eval(<<'.,.,', 'bnf.y.rb', 79 5)3635 def _reduce_23 1(val, _values, result)3743 module_eval(<<'.,.,', 'bnf.y.rb', 798) 3744 def _reduce_232(val, _values, result) 3636 3745 result = [ val[0].val, val[2].val, val[5] ] 3637 3746 result … … 3639 3748 .,., 3640 3749 3641 module_eval(<<'.,.,', 'bnf.y.rb', 799) 3642 def _reduce_232(val, _values, result) 3643 result = [val[0].val] 3644 result 3645 end 3646 .,., 3647 3648 module_eval(<<'.,.,', 'bnf.y.rb', 801) 3750 module_eval(<<'.,.,', 'bnf.y.rb', 802) 3649 3751 def _reduce_233(val, _values, result) 3650 result << val[2].val3651 result 3652 end 3653 .,., 3654 3655 module_eval(<<'.,.,', 'bnf.y.rb', 80 6)3752 result = [val[0]] 3753 result 3754 end 3755 .,., 3756 3757 module_eval(<<'.,.,', 'bnf.y.rb', 804) 3656 3758 def _reduce_234(val, _values, result) 3759 result << val[2] 3760 result 3761 end 3762 .,., 3763 3764 module_eval(<<'.,.,', 'bnf.y.rb', 809) 3765 def _reduce_235(val, _values, result) 3657 3766 val[0].each { |decl| 3658 3767 decl.set_kind( :CONSTANT ) … … 3665 3774 .,., 3666 3775 3667 module_eval(<<'.,.,', 'bnf.y.rb', 81 6)3668 def _reduce_23 5(val, _values, result)3776 module_eval(<<'.,.,', 'bnf.y.rb', 819) 3777 def _reduce_236(val, _values, result) 3669 3778 @@import_C = true 3670 3779 Import_C.new( val[2] ) … … 3675 3784 .,., 3676 3785 3677 module_eval(<<'.,.,', 'bnf.y.rb', 82 2)3678 def _reduce_23 6(val, _values, result)3786 module_eval(<<'.,.,', 'bnf.y.rb', 825) 3787 def _reduce_237(val, _values, result) 3679 3788 @@import_C = true 3680 3789 Import_C.new( val[2], val[4] ) … … 3685 3794 .,., 3686 3795 3687 module_eval(<<'.,.,', 'bnf.y.rb', 8 29)3688 def _reduce_23 7(val, _values, result)3796 module_eval(<<'.,.,', 'bnf.y.rb', 832) 3797 def _reduce_238(val, _values, result) 3689 3798 Import.new( val[2] ) 3690 3799 result … … 3692 3801 .,., 3693 3802 3694 module_eval(<<'.,.,', 'bnf.y.rb', 83 1)3695 def _reduce_23 8(val, _values, result)3803 module_eval(<<'.,.,', 'bnf.y.rb', 834) 3804 def _reduce_239(val, _values, result) 3696 3805 Import.new( val[2], true ) 3697 3806 result … … 3699 3808 .,., 3700 3809 3701 module_eval(<<'.,.,', 'bnf.y.rb', 83 6)3702 def _reduce_2 39(val, _values, result)3810 module_eval(<<'.,.,', 'bnf.y.rb', 839) 3811 def _reduce_240(val, _values, result) 3703 3812 Generate.new( val[2].val, val[4], val[6] ) 3704 3813 result … … 3706 3815 .,., 3707 3816 3708 module_eval(<<'.,.,', 'bnf.y.rb', 84 1)3709 def _reduce_24 0(val, _values, result)3817 module_eval(<<'.,.,', 'bnf.y.rb', 844) 3818 def _reduce_241(val, _values, result) 3710 3819 val[2].each{ |i| # i:Decl 3711 3820 i.set_kind( :TYPEDEF ) … … 3720 3829 .,., 3721 3830 3722 module_eval(<<'.,.,', 'bnf.y.rb', 85 1)3723 def _reduce_24 1(val, _values, result)3831 module_eval(<<'.,.,', 'bnf.y.rb', 854) 3832 def _reduce_242(val, _values, result) 3724 3833 val[5].each{ |i| # i:Decl 3725 3834 i.set_kind( :TYPEDEF ) … … 3734 3843 .,., 3735 3844 3736 # reduce 242 omitted3737 3738 3845 # reduce 243 omitted 3739 3846 3740 module_eval(<<'.,.,', 'bnf.y.rb', 868) 3741 def _reduce_244(val, _values, result) 3847 # reduce 244 omitted 3848 3849 module_eval(<<'.,.,', 'bnf.y.rb', 871) 3850 def _reduce_245(val, _values, result) 3742 3851 result = [ val[0] ] 3743 3852 result … … 3745 3854 .,., 3746 3855 3747 module_eval(<<'.,.,', 'bnf.y.rb', 87 0)3748 def _reduce_24 5(val, _values, result)3856 module_eval(<<'.,.,', 'bnf.y.rb', 873) 3857 def _reduce_246(val, _values, result) 3749 3858 result << val[2] 3750 3859 result … … 3752 3861 .,., 3753 3862 3754 module_eval(<<'.,.,', 'bnf.y.rb', 87 4)3755 def _reduce_24 6(val, _values, result)3863 module_eval(<<'.,.,', 'bnf.y.rb', 877) 3864 def _reduce_247(val, _values, result) 3756 3865 val[1].end_of_parse 3757 3866 result … … 3759 3868 .,., 3760 3869 3761 module_eval(<<'.,.,', 'bnf.y.rb', 8 78)3762 def _reduce_24 7(val, _values, result)3870 module_eval(<<'.,.,', 'bnf.y.rb', 881) 3871 def _reduce_248(val, _values, result) 3763 3872 result = Namespace.new(val[0].val) 3764 3873 result … … 3766 3875 .,., 3767 3876 3768 # reduce 248 omitted3769 3770 3877 # reduce 249 omitted 3771 3878 3772 module_eval(<<'.,.,', 'bnf.y.rb', 886) 3773 def _reduce_250(val, _values, result) 3879 # reduce 250 omitted 3880 3881 module_eval(<<'.,.,', 'bnf.y.rb', 889) 3882 def _reduce_251(val, _values, result) 3774 3883 result = NamespacePath.new( val[0].val, false ) 3775 3884 result … … 3777 3886 .,., 3778 3887 3779 module_eval(<<'.,.,', 'bnf.y.rb', 8 87)3780 def _reduce_25 1(val, _values, result)3888 module_eval(<<'.,.,', 'bnf.y.rb', 890) 3889 def _reduce_252(val, _values, result) 3781 3890 result = NamespacePath.new( val[1].val, true ) 3782 3891 result … … 3784 3893 .,., 3785 3894 3786 module_eval(<<'.,.,', 'bnf.y.rb', 8 89)3787 def _reduce_25 2(val, _values, result)3895 module_eval(<<'.,.,', 'bnf.y.rb', 892) 3896 def _reduce_253(val, _values, result) 3788 3897 result = val[0].append!( val[2].val ) 3789 3898 result … … 3791 3900 .,., 3792 3901 3793 module_eval(<<'.,.,', 'bnf.y.rb', 89 4)3794 def _reduce_25 3(val, _values, result)3902 module_eval(<<'.,.,', 'bnf.y.rb', 897) 3903 def _reduce_254(val, _values, result) 3795 3904 result = val[1].end_of_parse( val[3] ) 3796 3905 result … … 3798 3907 .,., 3799 3908 3800 module_eval(<<'.,.,', 'bnf.y.rb', 898)3801 def _reduce_25 4(val, _values, result)3909 module_eval(<<'.,.,', 'bnf.y.rb', 901) 3910 def _reduce_255(val, _values, result) 3802 3911 result = Signature.new( val[0].val ) 3803 3912 result … … 3805 3914 .,., 3806 3915 3807 module_eval(<<'.,.,', 'bnf.y.rb', 90 4)3808 def _reduce_25 5(val, _values, result)3916 module_eval(<<'.,.,', 'bnf.y.rb', 907) 3917 def _reduce_256(val, _values, result) 3809 3918 result = NamedList.new( nil, "function" ) 3810 3919 result … … 3812 3921 .,., 3813 3922 3814 module_eval(<<'.,.,', 'bnf.y.rb', 90 6)3815 def _reduce_25 6(val, _values, result)3923 module_eval(<<'.,.,', 'bnf.y.rb', 909) 3924 def _reduce_257(val, _values, result) 3816 3925 result = val[0].add_item( val[1] ) 3817 3926 result … … 3819 3928 .,., 3820 3929 3821 module_eval(<<'.,.,', 'bnf.y.rb', 91 1)3822 def _reduce_25 7(val, _values, result)3930 module_eval(<<'.,.,', 'bnf.y.rb', 914) 3931 def _reduce_258(val, _values, result) 3823 3932 # val[1]: Decl 3824 3933 if val[1].is_function? then … … 3836 3945 .,., 3837 3946 3838 module_eval(<<'.,.,', 'bnf.y.rb', 92 4)3839 def _reduce_25 8(val, _values, result)3947 module_eval(<<'.,.,', 'bnf.y.rb', 927) 3948 def _reduce_259(val, _values, result) 3840 3949 if val[4].is_function? then 3841 3950 result = FuncHead.new( val[4], val[3], true ) … … 3849 3958 .,., 3850 3959 3851 module_eval(<<'.,.,', 'bnf.y.rb', 9 37)3852 def _reduce_2 59(val, _values, result)3960 module_eval(<<'.,.,', 'bnf.y.rb', 940) 3961 def _reduce_260(val, _values, result) 3853 3962 val[1].end_of_parse 3854 3963 result = val[1] … … 3858 3967 .,., 3859 3968 3860 module_eval(<<'.,.,', 'bnf.y.rb', 94 3)3861 def _reduce_26 0(val, _values, result)3969 module_eval(<<'.,.,', 'bnf.y.rb', 946) 3970 def _reduce_261(val, _values, result) 3862 3971 result = Celltype.new(val[0].val) 3863 3972 result … … 3865 3974 .,., 3866 3975 3867 # reduce 261 omitted3868 3869 3976 # reduce 262 omitted 3870 3977 3871 module_eval(<<'.,.,', 'bnf.y.rb', 952) 3872 def _reduce_263(val, _values, result) 3978 # reduce 263 omitted 3979 3980 module_eval(<<'.,.,', 'bnf.y.rb', 955) 3981 def _reduce_264(val, _values, result) 3873 3982 if val[0].kind_of? Port then 3874 3983 Celltype.new_port( val[0] ) … … 3879 3988 .,., 3880 3989 3881 module_eval(<<'.,.,', 'bnf.y.rb', 9 58)3882 def _reduce_26 4(val, _values, result)3990 module_eval(<<'.,.,', 'bnf.y.rb', 961) 3991 def _reduce_265(val, _values, result) 3883 3992 if val[3].kind_of? Port then 3884 3993 val[3].set_specifier val[1] # 設定順序あり … … 3893 4002 .,., 3894 4003 3895 # reduce 265 omitted3896 3897 4004 # reduce 266 omitted 3898 4005 … … 3903 4010 # reduce 269 omitted 3904 4011 3905 module_eval(<<'.,.,', 'bnf.y.rb', 977) 3906 def _reduce_270(val, _values, result) 4012 # reduce 270 omitted 4013 4014 module_eval(<<'.,.,', 'bnf.y.rb', 980) 4015 def _reduce_271(val, _values, result) 3907 4016 result = [ val[0] ] 3908 result3909 end3910 .,.,3911 3912 module_eval(<<'.,.,', 'bnf.y.rb', 979)3913 def _reduce_271(val, _values, result)3914 result << val[2]3915 4017 result 3916 4018 end … … 3919 4021 module_eval(<<'.,.,', 'bnf.y.rb', 982) 3920 4022 def _reduce_272(val, _values, result) 4023 result << val[2] 4024 result 4025 end 4026 .,., 4027 4028 module_eval(<<'.,.,', 'bnf.y.rb', 985) 4029 def _reduce_273(val, _values, result) 3921 4030 result = [ :INLINE ] 3922 4031 result … … 3924 4033 .,., 3925 4034 3926 module_eval(<<'.,.,', 'bnf.y.rb', 98 3)3927 def _reduce_27 3(val, _values, result)4035 module_eval(<<'.,.,', 'bnf.y.rb', 986) 4036 def _reduce_274(val, _values, result) 3928 4037 result = [ :ALLOCATOR, val[2] ] 3929 4038 result … … 3931 4040 .,., 3932 4041 3933 module_eval(<<'.,.,', 'bnf.y.rb', 98 4)3934 def _reduce_27 4(val, _values, result)4042 module_eval(<<'.,.,', 'bnf.y.rb', 987) 4043 def _reduce_275(val, _values, result) 3935 4044 result = [ :OPTIONAL ] 3936 4045 result … … 3938 4047 .,., 3939 4048 3940 module_eval(<<'.,.,', 'bnf.y.rb', 98 5)3941 def _reduce_27 5(val, _values, result)4049 module_eval(<<'.,.,', 'bnf.y.rb', 988) 4050 def _reduce_276(val, _values, result) 3942 4051 result = [ :REF_DESC ] 3943 4052 result … … 3945 4054 .,., 3946 4055 3947 module_eval(<<'.,.,', 'bnf.y.rb', 98 6)3948 def _reduce_27 6(val, _values, result)4056 module_eval(<<'.,.,', 'bnf.y.rb', 989) 4057 def _reduce_277(val, _values, result) 3949 4058 result = [ :DYNAMIC ] 3950 result3951 end3952 .,.,3953 3954 module_eval(<<'.,.,', 'bnf.y.rb', 987)3955 def _reduce_277(val, _values, result)3956 result = [ :OMIT ]3957 4059 result 3958 4060 end … … 3961 4063 module_eval(<<'.,.,', 'bnf.y.rb', 990) 3962 4064 def _reduce_278(val, _values, result) 3963 result = [ val[0]]3964 result 3965 end 3966 .,., 3967 3968 module_eval(<<'.,.,', 'bnf.y.rb', 99 1)4065 result = [ :OMIT ] 4066 result 4067 end 4068 .,., 4069 4070 module_eval(<<'.,.,', 'bnf.y.rb', 993) 3969 4071 def _reduce_279(val, _values, result) 3970 4072 result = [ val[0] ] … … 3973 4075 .,., 3974 4076 3975 module_eval(<<'.,.,', 'bnf.y.rb', 99 2)4077 module_eval(<<'.,.,', 'bnf.y.rb', 994) 3976 4078 def _reduce_280(val, _values, result) 3977 result << val[2]3978 result 3979 end 3980 .,., 3981 3982 module_eval(<<'.,.,', 'bnf.y.rb', 99 3)4079 result = [ val[0] ] 4080 result 4081 end 4082 .,., 4083 4084 module_eval(<<'.,.,', 'bnf.y.rb', 995) 3983 4085 def _reduce_281(val, _values, result) 3984 4086 result << val[2] … … 3987 4089 .,., 3988 4090 3989 module_eval(<<'.,.,', 'bnf.y.rb', 99 7)4091 module_eval(<<'.,.,', 'bnf.y.rb', 996) 3990 4092 def _reduce_282(val, _values, result) 4093 result << val[2] 4094 result 4095 end 4096 .,., 4097 4098 module_eval(<<'.,.,', 'bnf.y.rb', 1000) 4099 def _reduce_283(val, _values, result) 3991 4100 result = [ :INTERNAL_ALLOC, val[0].val, val[2].val, val[4] ] 3992 4101 result … … 3994 4103 .,., 3995 4104 3996 module_eval(<<'.,.,', 'bnf.y.rb', 999)3997 def _reduce_28 3(val, _values, result)4105 module_eval(<<'.,.,', 'bnf.y.rb', 1002) 4106 def _reduce_284(val, _values, result) 3998 4107 result = [ :RELAY_ALLOC, val[0].val, val[2].val, val[4] ] 3999 4108 result … … 4001 4110 .,., 4002 4111 4003 module_eval(<<'.,.,', 'bnf.y.rb', 100 5)4004 def _reduce_28 4(val, _values, result)4112 module_eval(<<'.,.,', 'bnf.y.rb', 1008) 4113 def _reduce_285(val, _values, result) 4005 4114 result = Port.new( val[2].val, val[1], val[0] ) 4006 4115 result … … 4008 4117 .,., 4009 4118 4010 module_eval(<<'.,.,', 'bnf.y.rb', 10 07)4011 def _reduce_28 5(val, _values, result)4119 module_eval(<<'.,.,', 'bnf.y.rb', 1010) 4120 def _reduce_286(val, _values, result) 4012 4121 result = Port.new( val[2].val, val[1], val[0], "[]" ) 4013 4122 result … … 4015 4124 .,., 4016 4125 4017 module_eval(<<'.,.,', 'bnf.y.rb', 10 09)4018 def _reduce_28 6(val, _values, result)4126 module_eval(<<'.,.,', 'bnf.y.rb', 1012) 4127 def _reduce_287(val, _values, result) 4019 4128 result = Port.new(val[2].val, val[1], val[0], val[4]) 4020 result4021 end4022 .,.,4023 4024 module_eval(<<'.,.,', 'bnf.y.rb', 1011)4025 def _reduce_287(val, _values, result)4026 result = Port.new( val[2].val, val[1], val[0], nil, val[4], val[ 6 ].val )4027 4129 result 4028 4130 end … … 4031 4133 module_eval(<<'.,.,', 'bnf.y.rb', 1014) 4032 4134 def _reduce_288(val, _values, result) 4135 result = Port.new( val[2].val, val[1], val[0], nil, val[4], val[ 6 ].val ) 4136 result 4137 end 4138 .,., 4139 4140 module_eval(<<'.,.,', 'bnf.y.rb', 1017) 4141 def _reduce_289(val, _values, result) 4033 4142 result = :CALL 4034 4143 result … … 4036 4145 .,., 4037 4146 4038 module_eval(<<'.,.,', 'bnf.y.rb', 101 5)4039 def _reduce_2 89(val, _values, result)4147 module_eval(<<'.,.,', 'bnf.y.rb', 1018) 4148 def _reduce_290(val, _values, result) 4040 4149 result = :ENTRY 4041 4150 result … … 4043 4152 .,., 4044 4153 4045 module_eval(<<'.,.,', 'bnf.y.rb', 10 19)4046 def _reduce_29 0(val, _values, result)4154 module_eval(<<'.,.,', 'bnf.y.rb', 1022) 4155 def _reduce_291(val, _values, result) 4047 4156 result = val[0] 4048 4157 result … … 4050 4159 .,., 4051 4160 4052 # reduce 291 omitted4053 4054 4161 # reduce 292 omitted 4055 4162 4056 module_eval(<<'.,.,', 'bnf.y.rb', 1031) 4057 def _reduce_293(val, _values, result) 4163 # reduce 293 omitted 4164 4165 module_eval(<<'.,.,', 'bnf.y.rb', 1034) 4166 def _reduce_294(val, _values, result) 4058 4167 result = nil 4059 4168 result … … 4061 4170 .,., 4062 4171 4063 module_eval(<<'.,.,', 'bnf.y.rb', 103 5)4064 def _reduce_29 4(val, _values, result)4172 module_eval(<<'.,.,', 'bnf.y.rb', 1038) 4173 def _reduce_295(val, _values, result) 4065 4174 Celltype.new_attribute( val[0] ) 4066 4175 result … … 4068 4177 .,., 4069 4178 4070 module_eval(<<'.,.,', 'bnf.y.rb', 10 37)4071 def _reduce_29 5(val, _values, result)4179 module_eval(<<'.,.,', 'bnf.y.rb', 1040) 4180 def _reduce_296(val, _values, result) 4072 4181 Celltype.new_attribute( val[1] ) 4073 4182 result … … 4075 4184 .,., 4076 4185 4077 module_eval(<<'.,.,', 'bnf.y.rb', 104 3)4078 def _reduce_29 6(val, _values, result)4186 module_eval(<<'.,.,', 'bnf.y.rb', 1046) 4187 def _reduce_297(val, _values, result) 4079 4188 val[0].each{ |i| # i:Decl 4080 4189 i.set_kind( :ATTRIBUTE ) … … 4087 4196 .,., 4088 4197 4089 module_eval(<<'.,.,', 'bnf.y.rb', 105 1)4090 def _reduce_29 7(val, _values, result)4198 module_eval(<<'.,.,', 'bnf.y.rb', 1054) 4199 def _reduce_298(val, _values, result) 4091 4200 val[3].each{ |i| # i:Decl 4092 4201 i.set_kind( :ATTRIBUTE ) # 設定順序あり … … 4100 4209 .,., 4101 4210 4102 module_eval(<<'.,.,', 'bnf.y.rb', 106 0)4103 def _reduce_29 8(val, _values, result)4211 module_eval(<<'.,.,', 'bnf.y.rb', 1063) 4212 def _reduce_299(val, _values, result) 4104 4213 result = [:OMIT] 4105 4214 result … … 4107 4216 .,., 4108 4217 4109 module_eval(<<'.,.,', 'bnf.y.rb', 106 1)4110 def _reduce_ 299(val, _values, result)4218 module_eval(<<'.,.,', 'bnf.y.rb', 1064) 4219 def _reduce_300(val, _values, result) 4111 4220 result = [:SIZE_IS,val[2]] 4112 result4113 end4114 .,.,4115 4116 module_eval(<<'.,.,', 'bnf.y.rb', 1062)4117 def _reduce_300(val, _values, result)4118 result = [:CHOICE,val[3]]4119 4221 result 4120 4222 end … … 4123 4225 module_eval(<<'.,.,', 'bnf.y.rb', 1065) 4124 4226 def _reduce_301(val, _values, result) 4227 result = [:CHOICE,val[3]] 4228 result 4229 end 4230 .,., 4231 4232 module_eval(<<'.,.,', 'bnf.y.rb', 1068) 4233 def _reduce_302(val, _values, result) 4125 4234 result << val[2] 4126 4235 result … … 4128 4237 .,., 4129 4238 4130 module_eval(<<'.,.,', 'bnf.y.rb', 106 6)4131 def _reduce_30 2(val, _values, result)4239 module_eval(<<'.,.,', 'bnf.y.rb', 1069) 4240 def _reduce_303(val, _values, result) 4132 4241 result = [ val[0] ] 4133 4242 result … … 4135 4244 .,., 4136 4245 4137 # reduce 30 3omitted4138 4139 module_eval(<<'.,.,', 'bnf.y.rb', 107 4)4140 def _reduce_30 4(val, _values, result)4246 # reduce 304 omitted 4247 4248 module_eval(<<'.,.,', 'bnf.y.rb', 1077) 4249 def _reduce_305(val, _values, result) 4141 4250 result = nil 4142 4251 result … … 4144 4253 .,., 4145 4254 4146 module_eval(<<'.,.,', 'bnf.y.rb', 10 78)4147 def _reduce_30 5(val, _values, result)4255 module_eval(<<'.,.,', 'bnf.y.rb', 1081) 4256 def _reduce_306(val, _values, result) 4148 4257 Celltype.new_var( val[0] ) 4149 4258 result … … 4151 4260 .,., 4152 4261 4153 module_eval(<<'.,.,', 'bnf.y.rb', 108 0)4154 def _reduce_30 6(val, _values, result)4262 module_eval(<<'.,.,', 'bnf.y.rb', 1083) 4263 def _reduce_307(val, _values, result) 4155 4264 Celltype.new_var( val[1] ) 4156 4265 result … … 4158 4267 .,., 4159 4268 4160 module_eval(<<'.,.,', 'bnf.y.rb', 108 5)4161 def _reduce_30 7(val, _values, result)4269 module_eval(<<'.,.,', 'bnf.y.rb', 1088) 4270 def _reduce_308(val, _values, result) 4162 4271 val[0].each{ |i| # i:Decl 4163 4272 i.set_kind( :VAR ) … … 4169 4278 .,., 4170 4279 4171 module_eval(<<'.,.,', 'bnf.y.rb', 109 2)4172 def _reduce_30 8(val, _values, result)4280 module_eval(<<'.,.,', 'bnf.y.rb', 1095) 4281 def _reduce_309(val, _values, result) 4173 4282 val[3].each{ |i| # i:Decl 4174 4283 i.set_kind( :VAR ) # 設定順序あり … … 4182 4291 .,., 4183 4292 4184 module_eval(<<'.,.,', 'bnf.y.rb', 110 1)4185 def _reduce_3 09(val, _values, result)4293 module_eval(<<'.,.,', 'bnf.y.rb', 1104) 4294 def _reduce_310(val, _values, result) 4186 4295 result = [:SIZE_IS,val[2]] 4187 4296 result … … 4189 4298 .,., 4190 4299 4191 module_eval(<<'.,.,', 'bnf.y.rb', 11 07)4192 def _reduce_31 0(val, _values, result)4300 module_eval(<<'.,.,', 'bnf.y.rb', 1110) 4301 def _reduce_311(val, _values, result) 4193 4302 Celltype.new_require( val[1], val[3] ) 4194 4303 … … 4197 4306 .,., 4198 4307 4199 module_eval(<<'.,.,', 'bnf.y.rb', 111 1)4200 def _reduce_31 1(val, _values, result)4308 module_eval(<<'.,.,', 'bnf.y.rb', 1114) 4309 def _reduce_312(val, _values, result) 4201 4310 Celltype.new_require( val[3], val[5], val[1].val ) 4202 4311 … … 4205 4314 .,., 4206 4315 4207 # reduce 31 2omitted4208 4209 module_eval(<<'.,.,', 'bnf.y.rb', 11 19)4210 def _reduce_31 3(val, _values, result)4316 # reduce 313 omitted 4317 4318 module_eval(<<'.,.,', 'bnf.y.rb', 1122) 4319 def _reduce_314(val, _values, result) 4211 4320 Factory.set_f_celltype( false ) 4212 4321 result … … 4214 4323 .,., 4215 4324 4216 module_eval(<<'.,.,', 'bnf.y.rb', 112 0)4217 def _reduce_31 4(val, _values, result)4325 module_eval(<<'.,.,', 'bnf.y.rb', 1123) 4326 def _reduce_315(val, _values, result) 4218 4327 Factory.set_f_celltype( true ) 4219 4328 result … … 4221 4330 .,., 4222 4331 4223 # reduce 315 omitted4224 4225 4332 # reduce 316 omitted 4226 4333 4227 module_eval(<<'.,.,', 'bnf.y.rb', 1128) 4228 def _reduce_317(val, _values, result) 4334 # reduce 317 omitted 4335 4336 module_eval(<<'.,.,', 'bnf.y.rb', 1131) 4337 def _reduce_318(val, _values, result) 4229 4338 Factory.new( val[0].val, val[2], val[4], nil ) 4230 4339 result … … 4232 4341 .,., 4233 4342 4234 module_eval(<<'.,.,', 'bnf.y.rb', 113 0)4235 def _reduce_31 8(val, _values, result)4343 module_eval(<<'.,.,', 'bnf.y.rb', 1133) 4344 def _reduce_319(val, _values, result) 4236 4345 Factory.new( val[0].val, val[2], val[4], val[6] ) 4237 4346 result … … 4239 4348 .,., 4240 4349 4241 # reduce 3 19omitted4242 4243 module_eval(<<'.,.,', 'bnf.y.rb', 11 37)4244 def _reduce_32 0(val, _values, result)4350 # reduce 320 omitted 4351 4352 module_eval(<<'.,.,', 'bnf.y.rb', 1140) 4353 def _reduce_321(val, _values, result) 4245 4354 result = [ [ :IDENTIFIER, val[0].val ] ] 4246 4355 result … … 4248 4357 .,., 4249 4358 4250 module_eval(<<'.,.,', 'bnf.y.rb', 11 39)4251 def _reduce_32 1(val, _values, result)4359 module_eval(<<'.,.,', 'bnf.y.rb', 1142) 4360 def _reduce_322(val, _values, result) 4252 4361 result << [ :IDENTIFIER, val[2].val ] 4253 4362 result … … 4255 4364 .,., 4256 4365 4257 module_eval(<<'.,.,', 'bnf.y.rb', 114 1)4258 def _reduce_32 2(val, _values, result)4366 module_eval(<<'.,.,', 'bnf.y.rb', 1144) 4367 def _reduce_323(val, _values, result) 4259 4368 result = [ [ :STRING_LITERAL, val[0].val ] ] 4260 4369 result … … 4262 4371 .,., 4263 4372 4264 module_eval(<<'.,.,', 'bnf.y.rb', 114 3)4265 def _reduce_32 3(val, _values, result)4373 module_eval(<<'.,.,', 'bnf.y.rb', 1146) 4374 def _reduce_324(val, _values, result) 4266 4375 result << [ :STRING_LITERAL, val[2].val ] 4267 4376 result … … 4269 4378 .,., 4270 4379 4271 module_eval(<<'.,.,', 'bnf.y.rb', 11 48)4272 def _reduce_32 4(val, _values, result)4380 module_eval(<<'.,.,', 'bnf.y.rb', 1151) 4381 def _reduce_325(val, _values, result) 4273 4382 Cell.new_def 4274 4383 result … … 4276 4385 .,., 4277 4386 4278 module_eval(<<'.,.,', 'bnf.y.rb', 115 0)4279 def _reduce_32 5(val, _values, result)4387 module_eval(<<'.,.,', 'bnf.y.rb', 1153) 4388 def _reduce_326(val, _values, result) 4280 4389 result = Cell.end_of_parse true 4281 4390 result … … 4283 4392 .,., 4284 4393 4285 module_eval(<<'.,.,', 'bnf.y.rb', 115 2)4286 def _reduce_32 6(val, _values, result)4394 module_eval(<<'.,.,', 'bnf.y.rb', 1155) 4395 def _reduce_327(val, _values, result) 4287 4396 result = Cell.end_of_parse false 4288 4397 result … … 4290 4399 .,., 4291 4400 4292 module_eval(<<'.,.,', 'bnf.y.rb', 115 6)4293 def _reduce_32 7(val, _values, result)4401 module_eval(<<'.,.,', 'bnf.y.rb', 1159) 4402 def _reduce_328(val, _values, result) 4294 4403 result = Cell.new(val[0]) 4295 4404 result … … 4297 4406 .,., 4298 4407 4299 module_eval(<<'.,.,', 'bnf.y.rb', 116 0)4300 def _reduce_32 8(val, _values, result)4408 module_eval(<<'.,.,', 'bnf.y.rb', 1163) 4409 def _reduce_329(val, _values, result) 4301 4410 result = Cell.set_name(val[0].val) 4302 4411 result … … 4304 4413 .,., 4305 4414 4306 # reduce 329 omitted4307 4308 4415 # reduce 330 omitted 4309 4416 4310 4417 # reduce 331 omitted 4311 4418 4312 module_eval(<<'.,.,', 'bnf.y.rb', 1169) 4313 def _reduce_332(val, _values, result) 4419 # reduce 332 omitted 4420 4421 module_eval(<<'.,.,', 'bnf.y.rb', 1172) 4422 def _reduce_333(val, _values, result) 4314 4423 val[3].set_specifier_list( val[1] ) 4315 4424 result … … 4317 4426 .,., 4318 4427 4319 module_eval(<<'.,.,', 'bnf.y.rb', 117 1)4320 def _reduce_33 3(val, _values, result)4428 module_eval(<<'.,.,', 'bnf.y.rb', 1174) 4429 def _reduce_334(val, _values, result) 4321 4430 val[0].set_specifier_list( [] ) 4322 4431 result … … 4324 4433 .,., 4325 4434 4326 module_eval(<<'.,.,', 'bnf.y.rb', 117 5)4327 def _reduce_33 4(val, _values, result)4435 module_eval(<<'.,.,', 'bnf.y.rb', 1178) 4436 def _reduce_335(val, _values, result) 4328 4437 result << val[2] 4329 4438 result … … 4331 4440 .,., 4332 4441 4333 module_eval(<<'.,.,', 'bnf.y.rb', 11 77)4334 def _reduce_33 5(val, _values, result)4442 module_eval(<<'.,.,', 'bnf.y.rb', 1180) 4443 def _reduce_336(val, _values, result) 4335 4444 result = [val[0]] 4336 result4337 end4338 .,.,4339 4340 module_eval(<<'.,.,', 'bnf.y.rb', 1181)4341 def _reduce_336(val, _values, result)4342 result = [ :THROUGH, val[2], val[4] ]4343 4445 result 4344 4446 end … … 4347 4449 module_eval(<<'.,.,', 'bnf.y.rb', 1184) 4348 4450 def _reduce_337(val, _values, result) 4451 result = [ :THROUGH, val[2], val[4] ] 4452 result 4453 end 4454 .,., 4455 4456 module_eval(<<'.,.,', 'bnf.y.rb', 1187) 4457 def _reduce_338(val, _values, result) 4349 4458 result = val[0] 4350 4459 result … … 4352 4461 .,., 4353 4462 4354 # reduce 33 8omitted4355 4356 module_eval(<<'.,.,', 'bnf.y.rb', 1 198)4357 def _reduce_3 39(val, _values, result)4463 # reduce 339 omitted 4464 4465 module_eval(<<'.,.,', 'bnf.y.rb', 1201) 4466 def _reduce_340(val, _values, result) 4358 4467 result = Join.new( val[0].val, -1, val[4] ) 4359 4468 Cell.new_join( result, true ) … … 4363 4472 .,., 4364 4473 4365 module_eval(<<'.,.,', 'bnf.y.rb', 120 3)4366 def _reduce_34 0(val, _values, result)4474 module_eval(<<'.,.,', 'bnf.y.rb', 1206) 4475 def _reduce_341(val, _values, result) 4367 4476 result = Join.new( val[0].val, val[2], val[5] ) 4368 4477 Cell.new_join( result, true ) … … 4372 4481 .,., 4373 4482 4374 module_eval(<<'.,.,', 'bnf.y.rb', 12 08)4375 def _reduce_34 1(val, _values, result)4483 module_eval(<<'.,.,', 'bnf.y.rb', 1211) 4484 def _reduce_342(val, _values, result) 4376 4485 result = Join.new( val[0].val, nil, val[2] ) 4377 4486 Cell.new_join( result, true ) … … 4381 4490 .,., 4382 4491 4383 module_eval(<<'.,.,', 'bnf.y.rb', 121 3)4384 def _reduce_34 2(val, _values, result)4492 module_eval(<<'.,.,', 'bnf.y.rb', 1216) 4493 def _reduce_343(val, _values, result) 4385 4494 result = Join.new( val[0].val, nil, [ :COMPOSITE, val[4] ] ) 4386 4495 Cell.new_join( result, true ) … … 4390 4499 .,., 4391 4500 4392 # reduce 34 3omitted4393 4394 module_eval(<<'.,.,', 'bnf.y.rb', 122 4)4395 def _reduce_34 4(val, _values, result)4501 # reduce 344 omitted 4502 4503 module_eval(<<'.,.,', 'bnf.y.rb', 1227) 4504 def _reduce_345(val, _values, result) 4396 4505 rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val ) 4397 4506 Cell.new_reverse_join( rj ) … … 4401 4510 .,., 4402 4511 4403 module_eval(<<'.,.,', 'bnf.y.rb', 123 0)4404 def _reduce_34 5(val, _values, result)4512 module_eval(<<'.,.,', 'bnf.y.rb', 1233) 4513 def _reduce_346(val, _values, result) 4405 4514 rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val, val[6] ) 4406 4515 Cell.new_reverse_join( rj ) … … 4410 4519 .,., 4411 4520 4412 module_eval(<<'.,.,', 'bnf.y.rb', 123 6)4413 def _reduce_34 6(val, _values, result)4521 module_eval(<<'.,.,', 'bnf.y.rb', 1239) 4522 def _reduce_347(val, _values, result) 4414 4523 rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val ) 4415 4524 Cell.new_reverse_join( rj ) … … 4419 4528 .,., 4420 4529 4421 module_eval(<<'.,.,', 'bnf.y.rb', 124 2)4422 def _reduce_34 7(val, _values, result)4530 module_eval(<<'.,.,', 'bnf.y.rb', 1245) 4531 def _reduce_348(val, _values, result) 4423 4532 rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val, val[9] ) 4424 4533 Cell.new_reverse_join( rj ) … … 4428 4537 .,., 4429 4538 4430 # reduce 34 8omitted4431 4432 module_eval(<<'.,.,', 'bnf.y.rb', 125 4)4433 def _reduce_3 49(val, _values, result)4539 # reduce 349 omitted 4540 4541 module_eval(<<'.,.,', 'bnf.y.rb', 1257) 4542 def _reduce_350(val, _values, result) 4434 4543 CompositeCelltype.end_of_parse 4435 4544 result = val[1] … … 4439 4548 .,., 4440 4549 4441 module_eval(<<'.,.,', 'bnf.y.rb', 126 0)4442 def _reduce_35 0(val, _values, result)4550 module_eval(<<'.,.,', 'bnf.y.rb', 1263) 4551 def _reduce_351(val, _values, result) 4443 4552 result = CompositeCelltype.new(val[0].val) 4444 4553 result … … 4446 4555 .,., 4447 4556 4448 # reduce 351 omitted4449 4450 4557 # reduce 352 omitted 4451 4558 4452 module_eval(<<'.,.,', 'bnf.y.rb', 1269) 4453 def _reduce_353(val, _values, result) 4559 # reduce 353 omitted 4560 4561 module_eval(<<'.,.,', 'bnf.y.rb', 1272) 4562 def _reduce_354(val, _values, result) 4454 4563 if val[0].kind_of?( Port ) then 4455 4564 CompositeCelltype.new_port( val[0] ) # 遅延して登録 … … 4460 4569 .,., 4461 4570 4462 module_eval(<<'.,.,', 'bnf.y.rb', 127 5)4463 def _reduce_35 4(val, _values, result)4571 module_eval(<<'.,.,', 'bnf.y.rb', 1278) 4572 def _reduce_355(val, _values, result) 4464 4573 if val[3].kind_of?( Port ) then 4465 4574 # port 以外 val[3] に有効な値が入っていないので、以下のメソッドを適用できない … … 4479 4588 .,., 4480 4589 4481 # reduce 355 omitted4482 4483 4590 # reduce 356 omitted 4484 4591 … … 4487 4594 # reduce 358 omitted 4488 4595 4489 module_eval(<<'.,.,', 'bnf.y.rb', 1299) 4490 def _reduce_359(val, _values, result) 4596 # reduce 359 omitted 4597 4598 module_eval(<<'.,.,', 'bnf.y.rb', 1302) 4599 def _reduce_360(val, _values, result) 4491 4600 Generator.add_statement_specifier val[0] 4492 4601 result = [ val[0] ] … … 4496 4605 .,., 4497 4606 4498 module_eval(<<'.,.,', 'bnf.y.rb', 1304) 4499 def _reduce_360(val, _values, result) 4607 module_eval(<<'.,.,', 'bnf.y.rb', 1307) 4608 def _reduce_361(val, _values, result) 4609 Generator.add_statement_specifier val[2] 4610 result = val[0] << val[2] 4611 4612 result 4613 end 4614 .,., 4615 4616 module_eval(<<'.,.,', 'bnf.y.rb', 1312) 4617 def _reduce_362(val, _values, result) 4500 4618 result = [ :ALLOCATOR, val[2] ] 4501 4619 result … … 4503 4621 .,., 4504 4622 4505 module_eval(<<'.,.,', 'bnf.y.rb', 13 05)4506 def _reduce_36 1(val, _values, result)4623 module_eval(<<'.,.,', 'bnf.y.rb', 1313) 4624 def _reduce_363(val, _values, result) 4507 4625 result = [ :OMIT ] 4508 4626 result … … 4510 4628 .,., 4511 4629 4512 module_eval(<<'.,.,', 'bnf.y.rb', 13 06)4513 def _reduce_36 2(val, _values, result)4630 module_eval(<<'.,.,', 'bnf.y.rb', 1314) 4631 def _reduce_364(val, _values, result) 4514 4632 result = [ :OPTIONAL ] 4515 4633 result … … 4517 4635 .,., 4518 4636 4519 module_eval(<<'.,.,', 'bnf.y.rb', 13 07)4520 def _reduce_36 3(val, _values, result)4637 module_eval(<<'.,.,', 'bnf.y.rb', 1315) 4638 def _reduce_365(val, _values, result) 4521 4639 result = [ :REF_DESC ] 4522 4640 result … … 4524 4642 .,., 4525 4643 4526 module_eval(<<'.,.,', 'bnf.y.rb', 13 08)4527 def _reduce_36 4(val, _values, result)4644 module_eval(<<'.,.,', 'bnf.y.rb', 1316) 4645 def _reduce_366(val, _values, result) 4528 4646 result = [ :DYNAMIC ] 4529 4647 result … … 4531 4649 .,., 4532 4650 4533 module_eval(<<'.,.,', 'bnf.y.rb', 13 13)4534 def _reduce_36 5(val, _values, result)4651 module_eval(<<'.,.,', 'bnf.y.rb', 1321) 4652 def _reduce_367(val, _values, result) 4535 4653 # CompositeCelltype.new_port( val[0] ) 4536 4654 result = val[0] … … 4540 4658 .,., 4541 4659 4542 module_eval(<<'.,.,', 'bnf.y.rb', 132 0)4543 def _reduce_36 6(val, _values, result)4660 module_eval(<<'.,.,', 'bnf.y.rb', 1328) 4661 def _reduce_368(val, _values, result) 4544 4662 result = nil 4545 4663 result … … 4547 4665 .,., 4548 4666 4549 module_eval(<<'.,.,', 'bnf.y.rb', 13 24)4550 def _reduce_36 7(val, _values, result)4667 module_eval(<<'.,.,', 'bnf.y.rb', 1332) 4668 def _reduce_369(val, _values, result) 4551 4669 CompositeCelltype.new_attribute( val[0] ) 4552 4670 result … … 4554 4672 .,., 4555 4673 4556 module_eval(<<'.,.,', 'bnf.y.rb', 13 26)4557 def _reduce_3 68(val, _values, result)4674 module_eval(<<'.,.,', 'bnf.y.rb', 1334) 4675 def _reduce_370(val, _values, result) 4558 4676 CompositeCelltype.new_attribute( val[1] ) 4559 4677 result … … 4561 4679 .,., 4562 4680 4563 module_eval(<<'.,.,', 'bnf.y.rb', 133 1)4564 def _reduce_3 69(val, _values, result)4681 module_eval(<<'.,.,', 'bnf.y.rb', 1339) 4682 def _reduce_371(val, _values, result) 4565 4683 Cell.new_def 4566 4684 result … … 4568 4686 .,., 4569 4687 4570 module_eval(<<'.,.,', 'bnf.y.rb', 13 33)4571 def _reduce_37 0(val, _values, result)4688 module_eval(<<'.,.,', 'bnf.y.rb', 1341) 4689 def _reduce_372(val, _values, result) 4572 4690 result = Cell.end_of_parse true 4573 4691 result … … 4575 4693 .,., 4576 4694 4577 module_eval(<<'.,.,', 'bnf.y.rb', 13 35)4578 def _reduce_37 1(val, _values, result)4695 module_eval(<<'.,.,', 'bnf.y.rb', 1343) 4696 def _reduce_373(val, _values, result) 4579 4697 result = Cell.end_of_parse false 4580 4698 result … … 4582 4700 .,., 4583 4701 4584 module_eval(<<'.,.,', 'bnf.y.rb', 134 0)4585 def _reduce_37 2(val, _values, result)4702 module_eval(<<'.,.,', 'bnf.y.rb', 1348) 4703 def _reduce_374(val, _values, result) 4586 4704 Cell.new(val[0],true) 4587 4705 result … … 4589 4707 .,., 4590 4708 4591 module_eval(<<'.,.,', 'bnf.y.rb', 13 44)4592 def _reduce_37 3(val, _values, result)4709 module_eval(<<'.,.,', 'bnf.y.rb', 1352) 4710 def _reduce_375(val, _values, result) 4593 4711 Cell.set_name(val[0].val) 4594 4712 result … … 4596 4714 .,., 4597 4715 4598 # reduce 374 omitted4599 4600 # reduce 375 omitted4601 4602 4716 # reduce 376 omitted 4603 4717 4604 module_eval(<<'.,.,', 'bnf.y.rb', 1354) 4605 def _reduce_377(val, _values, result) 4718 # reduce 377 omitted 4719 4720 # reduce 378 omitted 4721 4722 # reduce 379 omitted 4723 4724 module_eval(<<'.,.,', 'bnf.y.rb', 1363) 4725 def _reduce_380(val, _values, result) 4606 4726 Cell.external_join( val[0].val, val[4].val, true ) 4607 4727 result … … 4609 4729 .,., 4610 4730 4611 module_eval(<<'.,.,', 'bnf.y.rb', 13 56)4612 def _reduce_3 78(val, _values, result)4731 module_eval(<<'.,.,', 'bnf.y.rb', 1365) 4732 def _reduce_381(val, _values, result) 4613 4733 Cell.external_join( val[0].val, val[2].val, false ) 4614 4734 result … … 4616 4736 .,., 4617 4737 4618 module_eval(<<'.,.,', 'bnf.y.rb', 13 63)4619 def _reduce_3 79(val, _values, result)4738 module_eval(<<'.,.,', 'bnf.y.rb', 1372) 4739 def _reduce_382(val, _values, result) 4620 4740 CompositeCelltype.new_join( val[0].val, 4621 4741 val[2].val, val[4].val, :ENTRY ) … … 4625 4745 .,., 4626 4746 4627 module_eval(<<'.,.,', 'bnf.y.rb', 13 68)4628 def _reduce_38 0(val, _values, result)4747 module_eval(<<'.,.,', 'bnf.y.rb', 1377) 4748 def _reduce_383(val, _values, result) 4629 4749 CompositeCelltype.new_join( val[2].val, 4630 4750 val[4].val, val[6].val, :ENTRY ) … … 4634 4754 .,., 4635 4755 4636 # reduce 38 1omitted4637 4638 # reduce 38 2omitted4639 4640 # reduce 38 3omitted4641 4642 module_eval(<<'.,.,', 'bnf.y.rb', 13 84)4643 def _reduce_38 4(val, _values, result)4756 # reduce 384 omitted 4757 4758 # reduce 385 omitted 4759 4760 # reduce 386 omitted 4761 4762 module_eval(<<'.,.,', 'bnf.y.rb', 1393) 4763 def _reduce_387(val, _values, result) 4644 4764 Region.end_of_parse 4645 4765 result 4646 4766 end 4647 4767 .,., 4648 4649 module_eval(<<'.,.,', 'bnf.y.rb', 1386)4650 def _reduce_385(val, _values, result)4651 Region.end_of_parse4652 result4653 end4654 .,.,4655 4656 # reduce 386 omitted4657 4658 # reduce 387 omitted4659 4768 4660 4769 module_eval(<<'.,.,', 'bnf.y.rb', 1395) 4661 4770 def _reduce_388(val, _values, result) 4771 Region.end_of_parse 4772 result 4773 end 4774 .,., 4775 4776 # reduce 389 omitted 4777 4778 # reduce 390 omitted 4779 4780 module_eval(<<'.,.,', 'bnf.y.rb', 1404) 4781 def _reduce_391(val, _values, result) 4662 4782 Region.new_in_through( val[2].val, val[4].val ) 4663 4783 result … … 4665 4785 .,., 4666 4786 4667 module_eval(<<'.,.,', 'bnf.y.rb', 1 397)4668 def _reduce_3 89(val, _values, result)4787 module_eval(<<'.,.,', 'bnf.y.rb', 1406) 4788 def _reduce_392(val, _values, result) 4669 4789 Region.new_in_through 4670 4790 result … … 4672 4792 .,., 4673 4793 4674 module_eval(<<'.,.,', 'bnf.y.rb', 1 399)4675 def _reduce_39 0(val, _values, result)4794 module_eval(<<'.,.,', 'bnf.y.rb', 1408) 4795 def _reduce_393(val, _values, result) 4676 4796 Region.new_out_through( val[2].val, val[4].val ) 4677 4797 result … … 4679 4799 .,., 4680 4800 4681 module_eval(<<'.,.,', 'bnf.y.rb', 14 01)4682 def _reduce_39 1(val, _values, result)4801 module_eval(<<'.,.,', 'bnf.y.rb', 1410) 4802 def _reduce_394(val, _values, result) 4683 4803 Region.new_out_through() 4684 4804 result … … 4686 4806 .,., 4687 4807 4688 module_eval(<<'.,.,', 'bnf.y.rb', 14 03)4689 def _reduce_39 2(val, _values, result)4808 module_eval(<<'.,.,', 'bnf.y.rb', 1412) 4809 def _reduce_395(val, _values, result) 4690 4810 Region.new_to_through( val[2], val[4].val, val[6].val ) 4691 4811 result … … 4693 4813 .,., 4694 4814 4695 module_eval(<<'.,.,', 'bnf.y.rb', 14 05)4696 def _reduce_39 3(val, _values, result)4815 module_eval(<<'.,.,', 'bnf.y.rb', 1414) 4816 def _reduce_396(val, _values, result) 4697 4817 Region.new_to_through( val[2], nil, nil ) 4698 4818 result … … 4700 4820 .,., 4701 4821 4702 module_eval(<<'.,.,', 'bnf.y.rb', 14 07)4703 def _reduce_39 4(val, _values, result)4822 module_eval(<<'.,.,', 'bnf.y.rb', 1416) 4823 def _reduce_397(val, _values, result) 4704 4824 Region.set_type( :NODE ) 4705 4825 result … … 4707 4827 .,., 4708 4828 4709 module_eval(<<'.,.,', 'bnf.y.rb', 14 09)4710 def _reduce_39 5(val, _values, result)4829 module_eval(<<'.,.,', 'bnf.y.rb', 1418) 4830 def _reduce_398(val, _values, result) 4711 4831 Region.set_type( :LINKUNIT ) 4712 4832 result … … 4714 4834 .,., 4715 4835 4716 module_eval(<<'.,.,', 'bnf.y.rb', 14 11)4717 def _reduce_39 6(val, _values, result)4836 module_eval(<<'.,.,', 'bnf.y.rb', 1420) 4837 def _reduce_399(val, _values, result) 4718 4838 Region.set_domain( val[2].val, val[4] ) 4719 4839 result … … 4721 4841 .,., 4722 4842 4723 module_eval(<<'.,.,', 'bnf.y.rb', 14 13)4724 def _reduce_ 397(val, _values, result)4843 module_eval(<<'.,.,', 'bnf.y.rb', 1422) 4844 def _reduce_400(val, _values, result) 4725 4845 Region.set_type( :CLASS, val[2].val ) 4726 4846 result … … 4728 4848 .,., 4729 4849 4730 module_eval(<<'.,.,', 'bnf.y.rb', 14 17)4731 def _reduce_ 398(val, _values, result)4850 module_eval(<<'.,.,', 'bnf.y.rb', 1426) 4851 def _reduce_401(val, _values, result) 4732 4852 result = Region.new( val[0].val ) 4733 4853 result … … 4735 4855 .,., 4736 4856 4737 # reduce 399 omitted4738 4739 # reduce 400 omitted4740 4741 # reduce 401 omitted4742 4743 4857 # reduce 402 omitted 4744 4858 4745 module_eval(<<'.,.,', 'bnf.y.rb', 1428) 4746 def _reduce_403(val, _values, result) 4859 # reduce 403 omitted 4860 4861 # reduce 404 omitted 4862 4863 # reduce 405 omitted 4864 4865 module_eval(<<'.,.,', 'bnf.y.rb', 1437) 4866 def _reduce_406(val, _values, result) 4747 4867 obj = val[3] 4748 4868 if obj.kind_of?( Cell ) then … … 4756 4876 .,., 4757 4877 4758 module_eval(<<'.,.,', 'bnf.y.rb', 145 0)4759 def _reduce_40 4(val, _values, result)4878 module_eval(<<'.,.,', 'bnf.y.rb', 1459) 4879 def _reduce_407(val, _values, result) 4760 4880 result = [ val[0].val ] 4761 4881 result … … 4763 4883 .,., 4764 4884 4765 module_eval(<<'.,.,', 'bnf.y.rb', 14 55)4766 def _reduce_40 5(val, _values, result)4885 module_eval(<<'.,.,', 'bnf.y.rb', 1464) 4886 def _reduce_408(val, _values, result) 4767 4887 set_in_specifier 4768 4888 result … … 4770 4890 .,., 4771 4891 4772 module_eval(<<'.,.,', 'bnf.y.rb', 14 57)4773 def _reduce_40 6(val, _values, result)4892 module_eval(<<'.,.,', 'bnf.y.rb', 1466) 4893 def _reduce_409(val, _values, result) 4774 4894 unset_in_specifier 4775 4895 result … … 4777 4897 .,., 4778 4898 4779 # reduce 407 omitted4780 4781 # reduce 408 omitted4782 4783 # reduce 409 omitted4784 4785 4899 # reduce 410 omitted 4786 4900 4787 module_eval(<<'.,.,', 'bnf.y.rb', 1471) 4788 def _reduce_411(val, _values, result) 4901 # reduce 411 omitted 4902 4903 # reduce 412 omitted 4904 4905 # reduce 413 omitted 4906 4907 module_eval(<<'.,.,', 'bnf.y.rb', 1480) 4908 def _reduce_414(val, _values, result) 4789 4909 TECSGEN::Cell_location.new( val[1], val[3], val[5], val[7], val[9], val[12] ) 4790 4910 … … 4793 4913 .,., 4794 4914 4795 module_eval(<<'.,.,', 'bnf.y.rb', 14 77)4796 def _reduce_41 2(val, _values, result)4915 module_eval(<<'.,.,', 'bnf.y.rb', 1486) 4916 def _reduce_415(val, _values, result) 4797 4917 result = val[0] << val[1] 4798 4918 … … 4801 4921 .,., 4802 4922 4803 module_eval(<<'.,.,', 'bnf.y.rb', 148 0)4804 def _reduce_41 3(val, _values, result)4923 module_eval(<<'.,.,', 'bnf.y.rb', 1489) 4924 def _reduce_416(val, _values, result) 4805 4925 result = [] 4806 4926 result … … 4808 4928 .,., 4809 4929 4810 module_eval(<<'.,.,', 'bnf.y.rb', 14 84)4811 def _reduce_41 4(val, _values, result)4930 module_eval(<<'.,.,', 'bnf.y.rb', 1493) 4931 def _reduce_417(val, _values, result) 4812 4932 result = [ val[0], val[2], val[3] ] 4813 4933 result … … 4815 4935 .,., 4816 4936 4817 module_eval(<<'.,.,', 'bnf.y.rb', 14 89)4818 def _reduce_41 5(val, _values, result)4937 module_eval(<<'.,.,', 'bnf.y.rb', 1498) 4938 def _reduce_418(val, _values, result) 4819 4939 TECSGEN::Join_location.new( val[2], val[4], val[6], val[8], val[11] ) 4820 4940 … … 4823 4943 .,., 4824 4944 4825 module_eval(<<'.,.,', 'bnf.y.rb', 1 495)4826 def _reduce_41 6(val, _values, result)4945 module_eval(<<'.,.,', 'bnf.y.rb', 1504) 4946 def _reduce_419(val, _values, result) 4827 4947 result = val[0] << [ val[1], val[3] ] 4828 4948 … … 4831 4951 .,., 4832 4952 4833 module_eval(<<'.,.,', 'bnf.y.rb', 1 497)4834 def _reduce_4 17(val, _values, result)4953 module_eval(<<'.,.,', 'bnf.y.rb', 1506) 4954 def _reduce_420(val, _values, result) 4835 4955 result = [] 4956 result 4957 end 4958 .,., 4959 4960 module_eval(<<'.,.,', 'bnf.y.rb', 1510) 4961 def _reduce_421(val, _values, result) 4962 TOOL_INFO.new( val[2].to_sym, val[4] ) 4963 result 4964 end 4965 .,., 4966 4967 module_eval(<<'.,.,', 'bnf.y.rb', 1511) 4968 def _reduce_422(val, _values, result) 4969 result = val[1] 4970 result 4971 end 4972 .,., 4973 4974 module_eval(<<'.,.,', 'bnf.y.rb', 1512) 4975 def _reduce_423(val, _values, result) 4976 result = { val[0].to_sym => val[2] } 4977 result 4978 end 4979 .,., 4980 4981 module_eval(<<'.,.,', 'bnf.y.rb', 1514) 4982 def _reduce_424(val, _values, result) 4983 val[0][ val[2].to_sym ] = val[4] 4984 result 4985 end 4986 .,., 4987 4988 # reduce 425 omitted 4989 4990 # reduce 426 omitted 4991 4992 # reduce 427 omitted 4993 4994 # reduce 428 omitted 4995 4996 module_eval(<<'.,.,', 'bnf.y.rb', 1516) 4997 def _reduce_429(val, _values, result) 4998 result=val[0].val 4999 result 5000 end 5001 .,., 5002 5003 module_eval(<<'.,.,', 'bnf.y.rb', 1516) 5004 def _reduce_430(val, _values, result) 5005 result=val[0].val 5006 result 5007 end 5008 .,., 5009 5010 module_eval(<<'.,.,', 'bnf.y.rb', 1517) 5011 def _reduce_431(val, _values, result) 5012 result = val[1] 5013 result 5014 end 5015 .,., 5016 5017 module_eval(<<'.,.,', 'bnf.y.rb', 1518) 5018 def _reduce_432(val, _values, result) 5019 result = [] 5020 result 5021 end 5022 .,., 5023 5024 module_eval(<<'.,.,', 'bnf.y.rb', 1519) 5025 def _reduce_433(val, _values, result) 5026 result = [ val[0] ] 5027 result 5028 end 5029 .,., 5030 5031 module_eval(<<'.,.,', 'bnf.y.rb', 1520) 5032 def _reduce_434(val, _values, result) 5033 val[0] << val[2] 5034 result 5035 end 5036 .,., 5037 5038 module_eval(<<'.,.,', 'bnf.y.rb', 1521) 5039 def _reduce_435(val, _values, result) 5040 result = val[0].val.gsub!( /\"(.*)\"/, "\\1" ) 5041 result 5042 end 5043 .,., 5044 5045 module_eval(<<'.,.,', 'bnf.y.rb', 1522) 5046 def _reduce_436(val, _values, result) 5047 result = val[0].val.to_i 5048 result 5049 end 5050 .,., 5051 5052 module_eval(<<'.,.,', 'bnf.y.rb', 1523) 5053 def _reduce_437(val, _values, result) 5054 result = val[0].val.to_f 5055 result 5056 end 5057 .,., 5058 5059 module_eval(<<'.,.,', 'bnf.y.rb', 1524) 5060 def _reduce_438(val, _values, result) 5061 result = - val[0].val.to_i 5062 result 5063 end 5064 .,., 5065 5066 module_eval(<<'.,.,', 'bnf.y.rb', 1525) 5067 def _reduce_439(val, _values, result) 5068 result = - val[0].val.to_f 5069 result 5070 end 5071 .,., 5072 5073 module_eval(<<'.,.,', 'bnf.y.rb', 1526) 5074 def _reduce_440(val, _values, result) 5075 result = val[0].val.to_i 5076 result 5077 end 5078 .,., 5079 5080 module_eval(<<'.,.,', 'bnf.y.rb', 1527) 5081 def _reduce_441(val, _values, result) 5082 result = val[0].val.to_f 4836 5083 result 4837 5084 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.y.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 6by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 378 378 | STRUCT 379 379 { 380 result = StructType.new() 380 # tag が無い場合、内部名を与える 381 result = StructType.new( :"TAG__#{@@no_struct_tag_num}__" ) 382 @@no_struct_tag_num += 1 381 383 StructType.set_define( true ) 382 384 } … … 709 711 : component_description specified_statement 710 712 | component_description location_information 713 | component_description tool_info 711 714 | 712 715 … … 738 741 | import 739 742 | import_C 740 | signature_plugin743 | generate_statement 741 744 | error # エラー回復ポイント 742 745 … … 797 800 798 801 region_name_list 799 : IDENTIFIER800 { result = [val[0] .val] }801 | region_name_list ',' IDENTIFIER802 { result << val[2] .val}802 : namespace_identifier 803 { result = [val[0]] } 804 | region_name_list ',' namespace_identifier 805 { result << val[2] } 803 806 804 807 const_statement … … 832 835 { Import.new( val[2], true ) } 833 836 834 signature_plugin 837 generate_statement 835 838 # : GENERATE '(' plugin_name ',' namespace_identifier ',' STRING_LITERAL ')' ';' #1ok signature plugin 836 839 : GENERATE '(' plugin_name ',' namespace_identifier ',' plugin_arg ')' ';' #1ok signature plugin … … 1301 1304 result = [ val[0] ] 1302 1305 } 1306 | composite_celltype_statement_specifier_list ',' composite_celltype_statement_specifier 1307 { 1308 Generator.add_statement_specifier val[2] 1309 result = val[0] << val[2] 1310 } 1303 1311 1304 1312 composite_celltype_statement_specifier … … 1350 1358 | internal_join_list specified_join 1351 1359 | internal_join_list external_join 1360 | internal_join_list reverse_join 1352 1361 1353 1362 external_join # cell 内に記述する呼び口の外部結合 … … 1499 1508 1500 1509 1510 # JSON object 1511 tool_info : TOOL_INFO '(' JSON_string ')' JSON_object { TOOL_INFO.new( val[2].to_sym, val[4] ) } 1512 JSON_object : '{' JSON_property_list '}' { result = val[1] } 1513 JSON_property_list : JSON_string ':' JSON_value { result = { val[0].to_sym => val[2] } } 1514 | JSON_property_list ',' JSON_string ':' JSON_value 1515 { val[0][ val[2].to_sym ] = val[4] } 1516 JSON_value : JSON_string | JSON_number | JSON_object | JSON_array 1517 | TRUE { result=val[0].val } | FALSE { result=val[0].val } # JSON_NULL # null not suppoted 1518 JSON_array : '[' JSON_array_list ']' { result = val[1] } 1519 | '[' ']' { result = [] } 1520 JSON_array_list : JSON_value { result = [ val[0] ] } 1521 | JSON_array_list ',' JSON_value { val[0] << val[2] } 1522 JSON_string : STRING_LITERAL { result = val[0].val.gsub!( /\"(.*)\"/, "\\1" ) } 1523 JSON_number : INTEGER_CONSTANT { result = val[0].val.to_i } 1524 | FLOATING_CONSTANT { result = val[0].val.to_f } 1525 | '-' INTEGER_CONSTANT { result = - val[0].val.to_i } 1526 | '-' FLOATING_CONSTANT { result = - val[0].val.to_f } 1527 | '+' INTEGER_CONSTANT { result = val[0].val.to_i } 1528 | '+' FLOATING_CONSTANT { result = val[0].val.to_f } 1529 1530 1501 1531 end 1502 1532 … … 1523 1553 'import_C' => :IMPORT_C, 1524 1554 'generate' => :GENERATE, 1555 '__tool_info__' => :TOOL_INFO, 1525 1556 1526 1557 # types … … 1658 1689 # すべての構文解析が完了した 1659 1690 @@b_end_all_parse = false 1691 1692 # tag なし struct 1693 @@no_struct_tag_num = 0 1660 1694 1661 1695 def self.parse( file_name, plugin = nil, b_reuse = false ) … … 1773 1807 string += line 1774 1808 # この位置では error メソッドは使えない (token 読出し前) 1775 puts " error: #{file} line #{lineno}: string literal has newline without escape"1809 puts "#{file}:#{lineno}:#{col}: error: string literal has newline without escape" 1776 1810 @@n_error += 1 1777 1811 end … … 1814 1848 b_in_string = true 1815 1849 # この位置では error メソッドは使えない (token 読出し前) # mikan cdl_error ではない 1816 puts " error: #{file} line #{lineno}: string literal has newline without escape"1850 puts "#{file}:#{lineno}:#{col}: error: string literal has newline without escape" 1817 1851 @@n_error += 1 1818 1852 # 山括弧で囲まれた文字列 1819 when /\A<[0-9A-Za-z_\. \/]+>/ # AB: angle bracke 1853 # when /\A<[0-9A-Za-z_\. \/]+>/ # AB: angle bracke 1854 when /\A<(?:[^>\\]|\\.)*>/ # これはうまく行くようだ 1820 1855 @q << [:AB_STRING_LITERAL, Token.new($&, file, lineno, col)] 1821 1856 # 行コメント … … 1913 1948 @@n_error = 0 1914 1949 @@n_warning = 0 1950 @@n_info = 0 1915 1951 1916 1952 # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切) … … 1946 1982 end 1947 1983 if locale then 1948 Console.puts " error: #{locale[0]}: line #{locale[1]}#{msg}"1984 Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: error: #{msg}" 1949 1985 else 1950 1986 Console.puts "error: #{msg}" … … 1979 2015 end 1980 2016 if locale then 1981 Console.puts " warning: #{locale[0]}: line #{locale[1]}#{msg}"2017 Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: warning: #{msg}" 1982 2018 else 1983 2019 Console.puts "warning: #{msg}" … … 1986 2022 end 1987 2023 2024 # このメソッドは構文解析、意味解析からのみ呼出し可 2025 def self.info( msg, *arg ) 2026 locale = nil 2027 self.info2( locale, msg, *arg ) 2028 end 2029 2030 def self.info2( locale, msg, *arg ) 2031 @@n_info += 1 2032 2033 msg = TECSMsg.get_info_message( msg ) 2034 # $1, $2, ... を arg で置換 2035 count = 1 2036 arg.each{ |a| 2037 str = TECSIO.str_code_convert( msg, a.to_s ) 2038 msg.sub!( /\$#{count}/, str ) 2039 count += 1 2040 } 2041 2042 # import_C の中でのウォーニング? 2043 if @@import_C then 2044 C_parser.info( msg ) 2045 else 2046 if @@b_end_all_parse == false || locale == nil then 2047 locale = @@current_locale[ @@generator_nest ] 2048 end 2049 if locale then 2050 Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: info: #{msg}" 2051 else 2052 Console.puts "info: #{msg}" 2053 end 2054 end 2055 end 2056 1988 2057 def self.get_n_error 1989 2058 @@n_error … … 1994 2063 end 1995 2064 2065 def self.get_n_info 2066 @@n_info 2067 end 2068 1996 2069 def self.get_nest 1997 2070 @@generator_nest 2071 end 2072 2073 def self.parsing_C? 2074 @@import_C 1998 2075 end 1999 2076 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 6by TOPPERS Project6 # Copyright (C) 2008-2019 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 79 79 # @b_checked_as_allocator_signature:: bool: アロケータシグニチャとしてチェック済み 80 80 # @b_empty:: Bool: 空(関数が一つもない状態) 81 # @descriptor_list:: nil | { Signature => ParamDecl } 最後の ParamDecl しか記憶しないことに注意 82 # @generate:: [ Symbol, String, Plugin ] = [ PluginName, option, Plugin ] Plugin は生成後に追加される 83 84 include PluginModule 81 85 82 86 @@nest_stack_index = -1 … … 123 127 @b_empty = false 124 128 @b_checked_as_allocator_signature = false 129 @descriptor_list = nil 130 @generate = nil 125 131 @@current_object = self 126 132 set_specifier_list( Generator.get_statement_specifier ) … … 136 142 function_head_list.get_items.each{ |f| 137 143 @func_name_to_id[ f.get_name ] = id 144 f.set_owner self 138 145 id += 1 139 146 } … … 142 149 end 143 150 151 # set_descriptor_list ## 152 153 if @generate then 154 signature_plugin 155 end 156 144 157 @@current_object = nil 158 145 159 return self 146 160 end … … 170 184 when :DEVIATE 171 185 @b_deviate = true 186 when :GENERATE 187 if @generate then 188 cdl_error( "S9999 generate specifier duplicate" ) 189 end 190 @generate = [ s[1], s[2] ] # [ PluginName, "option" ] 172 191 else 173 192 cdl_error( "S1002 \'$1\': unknown specifier for signature" , s[0] ) … … 309 328 end 310 329 311 #== Signature# 引数で参照されている Descriptor 型のリストを作成する 330 #=== Signature# シグニチャプラグイン (generate 指定子) 331 def signature_plugin 332 plugin_name = @generate[0] 333 option = @generate[1] 334 apply_plugin( plugin_name, option ) 335 end 336 337 #== Signature#apply_plugin 338 def apply_plugin plugin_name, option 339 if is_empty? then 340 cdl_warning( "S9999 $1 is empty. cannot apply signature plugin. ignored" , @name ) 341 return 342 end 343 344 plClass = load_plugin( plugin_name, SignaturePlugin ) 345 return if plClass == nil 346 if $verbose then 347 print "new through: plugin_object = #{plClass.class.name}.new( #{@name}, #{option} )\n" 348 end 349 350 begin 351 plugin_object = plClass.new( self, option ) 352 plugin_object.set_locale @locale 353 rescue Exception => evar 354 cdl_error( "S1150 $1: fail to new" , plugin_name ) 355 print_exception( evar ) 356 end 357 generate_and_parse plugin_object 358 end 359 360 #== Signature# 引数で参照されている Descriptor 型のリストを 312 361 #RETURN:: Hash { Signature => ParamDecl }: 複数の ParamDecl から参照されている場合、最後のものしか返さない 313 362 def get_descriptor_list 363 @descriptor_list 364 end 365 366 @@set_descriptor_list = {} 367 def self.set_descriptor_list 368 Namespace.get_root.travers_all_signature{ |sig| 369 if @@set_descriptor_list[ sig ] == nil then 370 @@set_descriptor_list[ sig ] = true 371 sig.set_descriptor_list 372 end 373 } 374 end 375 376 #== Signature# 引数で参照されている Descriptor 型のリストを作成する 377 def set_descriptor_list 314 378 desc_list = { } 315 379 # p "has_desc #{@name}" 316 380 fha = get_function_head_array # 呼び口または受け口のシグニチャの関数配列 317 381 if fha == nil then # nil の場合、自己参照によるケースと仮定 382 @descriptor_list = desc_list 318 383 return desc_list 319 384 end … … 330 395 # p "has_desc #{param.get_name} #{t}" 331 396 if t.kind_of? DescriptorType then 332 desc_list[t] = param 397 desc_list[ t.get_signature ] = param 398 # p self.get_name, t.get_signature.get_name 399 if t.get_signature == self then 400 # cdl_error( "S9999 Descriptor argument '$1' is the same signature as this parameter '$2' included", @name, param.get_name ) 401 end 402 dir = param.get_direction 403 if dir != :IN && dir != :OUT && dir != :INOUT then 404 cdl_error( "S9999 Descriptor argument '$1' cannot be specified for $2 parameter", param.get_name, dir.to_s.downcase ) 405 end 333 406 end 334 407 } … … 336 409 end 337 410 } 338 returndesc_list411 @descriptor_list = desc_list 339 412 end 340 413 341 414 #=== Signature# 引数に Descriptor があるか? 342 415 def has_descriptor? 343 # p "has_desc #{@name}" 344 fha = get_function_head_array # 呼び口または受け口のシグニチャの関数配列 345 if fha == nil then # nil の場合、自己参照によるケースと仮定 416 if get_descriptor_list == nil then 417 # end_of_parse が呼び出される前に has_descriptor? が呼び出された 418 # 呼び出し元は DescriptorType#initialize 419 # この場合、同じシグニチャ内の引数が Descriptor 型である 346 420 return true 347 end 348 fha.each{ |fh| 349 fd = fh.get_declarator # fd: Decl (関数頭部からDeclarotorを得る) 350 if fd.is_function? then # fd が関数でなければ、すでにエラー 351 params = fd.get_type.get_paramlist.get_items 352 if params then 353 params.each{ |param| 354 t = param.get_type.get_original_type 355 while( t.kind_of? PtrType ) 356 t = t.get_referto 357 end 358 # p "has_desc #{param.get_name} #{t}" 359 if t.kind_of? DescriptorType then 360 return true 361 end 362 } 363 end 364 end 365 } 366 return false 421 elsif get_descriptor_list.length > 0 then 422 return true 423 else 424 return false 425 end 367 426 end 368 427 … … 411 470 412 471 end 472 473 module CelltypePluginModule 474 #=== Celltype# セルタイププラグイン (generate 指定子) 475 def celltype_plugin 476 plugin_name = @generate[0] 477 option = @generate[1] 478 @generate[2] = apply_plugin( plugin_name, option ) 479 end 480 481 #=== Celltype# セルタイププラグインをこのセルタイプに適用 482 def apply_plugin( plugin_name, option ) 483 484 # plClass = load_plugin( plugin_name, CelltypePlugin ) 485 if kind_of? Celltype then 486 plugin_class = CelltypePlugin 487 elsif kind_of? CompositeCelltype then 488 plugin_class = CompositePlugin 489 else 490 raise "unknown class #{self.class.name}" 491 end 492 493 plClass = load_plugin( plugin_name, plugin_class ) 494 return if plClass == nil 495 if $verbose then 496 print "new celltype plugin: plugin_object = #{plClass.class.name}.new( #{@name}, #{option} )\n" 497 end 498 499 begin 500 plugin_object = plClass.new( self, option ) 501 @generate_list << [ plugin_name, option, plugin_object ] 502 plugin_object.set_locale @locale 503 generate_and_parse plugin_object 504 rescue Exception => evar 505 cdl_error( "S1023 $1: fail to new" , plugin_name ) 506 print_exception( evar ) 507 end 508 509 # 既に存在するセルに new_cell を適用 510 @cell_list.each{ |cell| 511 apply_plugin_cell plugin_object, cell 512 } 513 514 return plugin_object 515 end 516 517 def apply_plugin_cell plugin, cell 518 begin 519 plugin.new_cell cell 520 rescue Exception => evar 521 cdl_error( "S1037 $1: celltype plugin fail to new_cell" , plugin.class.name ) 522 print_exception( evar ) 523 end 524 end 525 526 def celltype_plugin_new_cell cell 527 @generate_list.each{ |generate| 528 celltype_plugin = generate[2] 529 begin 530 celltype_plugin.new_cell cell 531 rescue Exception => evar 532 cdl_error( "S1037 $1: celltype plugin fail to new_cell" , celltype_plugin.class.name ) 533 print_exception( evar ) 534 end 535 } 536 end 537 end #CelltypePluginModule 413 538 414 539 class Celltype < NSBDNode # < Nestable … … 423 548 # @ct_factory_list:: Factory[] : celltype factory 424 549 # @cell_list:: Cell[] : 定義のみ (V1.0.0.2 以降) 550 # @ordered_cell_list:: Cell[] : ID 順に順序付けされたセルリスト、最適化以降有効 (リンク単位ごとに生成されなおす) 425 551 # @singleton:: bool 426 552 # @idx_is_id:: bool 427 553 # @idx_is_id_act:: bool: actual value 554 # @b_need_ptab:: bool: true if having cells in multi-domain 428 555 # @active:: bool 429 556 # @b_reuse:: bool : reuse 指定されて import された(template 不要) 430 557 # @generate:: [ Symbol, String, Plugin ] = [ PluginName, option, Plugin ] Plugin は生成後に追加される 558 # @generate_list:: [ [ Symbol, String, Plugin ], ... ] generate 文で追加された generate 431 559 # 432 560 # @n_attribute_ro:: int >= 0 none specified … … 437 565 # @n_var_omit:: int >= 0 # of [omit] specified vars # mikan var の omit は有? 438 566 # @n_var_init:: int >= 0 # of vars with initializer 439 # @n_call_port:: int >= 0 440 # @n_call_port_array:: int >= 0 567 # @n_call_port:: int >= 0 # dynamic ports are included 568 # @n_call_port_array:: int >= 0 # dynamic ports are included 441 569 # @n_call_port_omitted_in_CB:: int >= 0 最適化で省略される呼び口 570 # @n_call_port_dynamic:: int >= 0 # 571 # @n_call_port_array_dynamic:: int >= 0 572 # @n_call_port_ref_desc:: int >= 0 # 573 # @n_call_port_array_ref_desc:: int >= 0 442 574 # @n_entry_port:: int >= 0 443 575 # @n_entry_port_array:: int >= 0 … … 455 587 456 588 include PluginModule 457 589 include CelltypePluginModule 590 458 591 @@nest_stack_index = -1 459 592 @@nest_stack = [] … … 496 629 @active = false 497 630 @generate = nil 631 @generate_list = [] 498 632 499 633 @n_attribute_ro = 0 … … 507 641 @n_call_port_array = 0 508 642 @n_call_port_omitted_in_CB = 0 643 @n_call_port_dynamic = 0 644 @n_call_port_array_dynamic = 0 645 @n_call_port_ref_desc = 0 646 @n_call_port_array_ref_desc = 0 509 647 @n_entry_port = 0 510 648 @n_entry_port_array = 0 … … 528 666 if $idx_is_id then 529 667 @idx_is_id = true 668 @idx_is_id_act = true 669 @b_need_ptab = true 530 670 else 531 671 @idx_is_id = false 532 end 533 @idx_is_id_act = @idx_is_id 672 @idx_is_id_act = false 673 @b_need_ptab = false 674 end 534 675 535 676 Namespace.new_celltype( self ) 536 677 set_namespace_path # @NamespacePath の設定 537 678 set_specifier_list( Generator.get_statement_specifier ) 538 539 if @singleton then540 @idx_is_id_act = false541 end542 679 543 680 @included_header = {} … … 577 714 celltype_plugin 578 715 end 716 717 # check_dynamic_join ## 579 718 580 719 @@current_object = nil … … 592 731 @n_call_port += 1 593 732 @n_call_port_array += 1 if port.get_array_size != nil 733 if port.is_dynamic? then 734 @n_call_port_dynamic += 1 735 @n_call_port_array_dynamic += 1 if port.get_array_size != nil 736 end 737 if port.is_ref_desc? then 738 @n_call_port_ref_desc += 1 739 @n_call_port_array_ref_desc += 1 if port.get_array_size != nil 740 end 594 741 else 595 742 @n_entry_port += 1 … … 753 900 when :IDX_IS_ID 754 901 @idx_is_id = true 902 @idx_is_id_act = true 903 @b_need_ptab = true 755 904 when :ACTIVE 756 905 @active = true … … 764 913 end 765 914 } 915 if @singleton then 916 @idx_is_id_act = false 917 @b_need_ptab = false 918 end 766 919 end 767 920 … … 863 1016 end 864 1017 865 #=== Celltype# セルタイププラグイン (generate 指定子) 866 def celltype_plugin 867 868 load_plugin( @generate[0], CelltypePlugin ) 869 870 plugin_name = @generate[0] 871 option = @generate[1] 872 plugin_object = nil 873 eval_str = "plugin_object = #{plugin_name}.new( self, option )" 874 if $verbose then 875 print "new celltype : #{eval_str}\n" 876 end 877 878 begin 879 eval( eval_str ) # plugin を生成 880 plugin_object.set_locale @locale 881 @generate[ 2 ] = plugin_object 882 generate_and_parse plugin_object 883 rescue Exception => evar 884 cdl_error( "S1023 $1: fail to new" , plugin_name ) 885 print "eval( #{eval_str} )\n" 886 887 print_exception( evar ) 888 end 1018 @@dynamic_join_checked_list = {} 1019 def self.check_dynamic_join 1020 Namespace.get_root.travers_all_celltype{ |ct| 1021 if @@dynamic_join_checked_list[ ct ] == nil then 1022 @@dynamic_join_checked_list[ ct ] = true 1023 ct.check_dynamic_join 1024 end 1025 } 1026 end 1027 1028 #=== Celltype#dynamic の適合性チェック 1029 def check_dynamic_join 1030 return if ! $verbose 1031 @port.each{ |port| 1032 signature = port.get_signature 1033 next if signature == nil # すでにエラー 1034 if port.is_dynamic? then 1035 dbgPrint( "[DYNAMIC] checking dynamic port: #{@global_name}.#{port.get_name}\n" ) 1036 # print( "[DYNAMIC] checking dynamic port: #{@global_name}.#{port.get_name}\n" ) 1037 next if find_ref_desc_port signature 1038 next if find_descriptor_param signature, :DYNAMIC 1039 cdl_warning( 'W9999 $1 cannot get information for dynamic port $2', @name, port.get_name ) 1040 elsif port.is_ref_desc? then 1041 dbgPrint( "[DYNAMIC] checking ref_desc port: #{@global_name}.#{port.get_name}\n" ) 1042 # print( "[DYNAMIC] checking ref_desc port: #{@global_name}.#{port.get_name}\n" ) 1043 next if find_dynamic_port signature 1044 next if find_descriptor_param signature, :REF_DESC 1045 cdl_warning( 'W9999 $1 cannot put information from ref_desc port $2', @name, port.get_name ) 1046 elsif port.get_signature then 1047 if port.get_signature.has_descriptor? then 1048 port.get_signature.get_descriptor_list.each{ |signature, param| 1049 dbgPrint( "[DYNAMIC] checking Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1050 # print( "[DYNAMIC] checking Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1051 if port.get_port_type == :CALL then 1052 if param.get_direction == :IN 1053 next if find_ref_desc_port signature 1054 next if find_descriptor_param signature, :DYNAMIC 1055 elsif param.get_direction == :OUT 1056 next if find_dynamic_port signature 1057 next if find_descriptor_param signature, :REF_DESC 1058 end 1059 else # :ENTRY 1060 if param.get_direction == :IN 1061 next if find_dynamic_port signature 1062 next if find_descriptor_param signature, :REF_DESC 1063 elsif param.get_direction == :OUT 1064 next if find_ref_desc_port signature 1065 next if find_descriptor_param signature, :DYNAMIC 1066 end 1067 end 1068 cdl_warning( 'W9999 "$1" cannot handle Descriptor "$2" information for port "$3"', @name, param.get_name, port.get_name ) 1069 } 1070 end 1071 end 1072 } 1073 end 1074 1075 def find_dynamic_port signature 1076 dbgPrint "[DYNAMIC] find_dynamic_port signature=#{signature.get_name}" 1077 @port.each{ |port| 1078 dbgPrint "[DYNAMIC] port=#{port.get_name} signature=#{port.get_signature.get_name} dynamic=#{port.is_dynamic?}" 1079 return port if port.is_dynamic? && port.get_signature == signature 1080 } 1081 return nil 1082 end 1083 def find_ref_desc_port signature 1084 if signature == nil then # すでにエラー 1085 return nil 1086 end 1087 dbgPrint "[DYNAMIC] find_ref_desc_port signature=#{signature.get_name}" 1088 @port.each{ |port| 1089 dbgPrint "[DYNAMIC] port=#{port.get_name} signature=#{port.get_signature.get_name} ref_desc=#{port.is_ref_desc?}" 1090 return port if port.is_ref_desc? && port.get_signature == signature 1091 } 1092 return nil 1093 end 1094 #=== Celltype#ディスクリプタ型でシグニチャが一致し dyn_ref に対応づく引数を探す 1095 #dyn_ref::Symbol: :DYNAMIC=ディスクリプタを得る手段となる引数を探す.:REF_DESC=渡す手段となる引数を探す 1096 def find_descriptor_param signature, dyn_ref 1097 param_list = [] 1098 @port.each{ |port| 1099 port.each_param{ |port, func, param| 1100 type = param.get_type 1101 while type.kind_of? PtrType 1102 type = type.get_type 1103 end 1104 dbgPrint( "[DYNAMIC] dyn_ref=#{dyn_ref} port_type=#{port.get_port_type} dir=#{param.get_direction} paramName=#{param.get_name} paramType=#{type.class}\n" ) 1105 # print( "[DYNAMIC] dyn_ref=#{dyn_ref} port_type=#{port.get_port_type} dir=#{param.get_direction} paramName=#{param.get_name} paramType=#{type.class}\n" ) 1106 if type.kind_of? DescriptorType then 1107 if type.get_signature == signature then 1108 dir = param.get_direction 1109 if dir == :INOUT then 1110 dbgPrint( "[DYNAMIC] found INOUT Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1111 # print( "[DYNAMIC] found INOUT Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1112 return param 1113 elsif dyn_ref == :DYNAMIC then 1114 if dir == :IN && port.get_port_type == :ENTRY || 1115 dir == :OUT && port.get_port_type == :CALL then 1116 dbgPrint( "[DYNAMIC] found INBOUND Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1117 # print( "[DYNAMIC] found INBOUND Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1118 return param 1119 end 1120 elsif dyn_ref == :REF_DESC 1121 if dir == :IN && port.get_port_type == :CALL || 1122 dir == :OUT && port.get_port_type == :ENTRY then 1123 dbgPrint( "[DYNAMIC] found OUTBOUND Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1124 # print( "[DYNAMIC] found OUTBOUND Descriptor parameter: #{@global_name}.#{port.get_name} ... #{param.get_name}\n" ) 1125 return param 1126 end 1127 else 1128 raise "unknown ref_desc" 1129 end 1130 end 1131 end 1132 } 1133 } 1134 return nil 889 1135 end 890 1136 … … 895 1141 # シングルトンセルが同じ linkunit に複数ないかチェック 896 1142 def new_cell( cell ) 1143 dbgPrint "Celltype#new_cell( #{cell.get_name} )\n" 897 1144 # Celltype では Cell の set_owner しない 898 1145 # シングルトンで、プロトタイプ宣言でない場合、コード生成対象リージョンの場合 … … 905 1152 end 906 1153 @cell_list << cell 1154 1155 # プラグインにより生成されたセルタイプか ? 907 1156 if @plugin then 908 1157 @plugin.new_cell cell 909 1158 end 1159 1160 # セルタイププラグインの適用 1161 celltype_plugin_new_cell cell 910 1162 end 911 1163 … … 919 1171 # 呼び口(ただし、最適化で不要となるものは除く) 920 1172 def has_INIB? 921 # print "name=#{@name} @n_attribute_ro=#{@n_attribute_ro} @n_var_size_is=#{@n_var_size_is} @n_call_port=#{@n_call_port} @n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} @n_entry_port_array_ns=#{@n_entry_port_array_ns}\n" 922 return $rom && (@n_attribute_ro > 0 || @n_var_size_is > 0 || ( @n_call_port - @n_call_port_omitted_in_CB ) > 0 || @n_entry_port_array_ns > 0) 923 # return $rom && (@n_attribute_ro > 0 || ( @n_call_port - @n_call_port_omitted_in_CB ) > 0) 1173 1174 result = $rom && 1175 (@n_attribute_ro > 0 || 1176 @n_var_size_is > 0 || 1177 ( @n_call_port - @n_call_port_omitted_in_CB - (@n_call_port_dynamic-@n_call_port_array_dynamic) ) > 0 || 1178 $ram_initializer && @n_call_port_dynamic > 0 || 1179 @n_entry_port_array_ns > 0) 1180 # print "name=#{@name} n_attribute_ro=#{@n_attribute_ro} n_var_size_is=#{@n_var_size_is} n_call_port=#{@n_call_port} n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} n_call_port_dynamic=#{@n_call_port_dynamic} n_call_port_array_dynamic=#{@n_call_port_array_dynamic} n_entry_port_array_ns=#{@n_entry_port_array_ns} has_INIB?=#{result}\n" 1181 1182 return result 924 1183 end 925 1184 … … 934 1193 def has_CB? 935 1194 if $rom then 936 return @n_attribute_rw > 0 || (@n_var-@n_var_size_is) > 0 1195 return @n_attribute_rw > 0 || (@n_var-@n_var_size_is) > 0 || (@n_call_port_dynamic - @n_call_port_array_dynamic) > 0 937 1196 # return @n_attribute_rw > 0 || @n_var > 0 938 1197 else … … 943 1202 #=== Celltype# SET_CB_INIB_POINTER, INITIALIZE_CB が必要か 944 1203 def need_CB_initializer? 945 @n_var_init > 0 || has_CB? 1204 @n_var_init > 0 || has_CB? || ( @n_call_port_dynamic && $ram_initializer ) 946 1205 end 947 1206 … … 998 1257 def is_active? 999 1258 @active 1259 end 1260 1261 def idx_is_id_act? 1262 @idx_is_id_act 1263 end 1264 1265 def multi_domain? 1266 @b_need_ptab 1000 1267 end 1001 1268 … … 1120 1387 # 逆require ポートに対して複数の結合がないかチェックする 1121 1388 # @generate:: [ Symbol, String, Plugin ] = [ PluginName, option, Plugin ] Plugin は生成後に追加される 1389 # @b_post_code_generated:: Bool: true if generated in tmp_plugin_post_code.cdl 1122 1390 # 1123 1391 # composite のためインスタンス変数 … … 1142 1410 # @id:: Integer : コード生成直前に設定 (プロトタイプ宣言の場合は -1 のまま放置) 1143 1411 # @id_specified::Integer : 指定された id 1144 # @restrict_list::{ entry_name => { func_name, [ region_name, ... ] } } 1412 # @restrict_list::{ entry_name => { func_name, [ region_path_str, ... ] } } 1413 # @restrict_list2::{ entry_name => { func_name, [ domain_root_region, ... ] } } 1414 # @b_restrict_referenced::Bool: restrict_list が参照れた 1145 1415 1146 1416 =begin … … 1187 1457 end 1188 1458 1189 1190 # composite で clone されたもの(子孫まで含む)1191 # Join.change_rhs_port にて CompoisteCelltype 内の Join の結合先を変更する際に使用1192 @@cloned_cell_list = {}1193 ### mikan BUG @@cloned_cell_list は composite の階層ごとに記憶していないため、同じ名前が内部に現れると、うまく動作しない1194 # change_rhs_port の実装は、こんな回りくどいことをする必要はなかった。右辺に現れるセル名には、composite のセル名を前につなげるだけでよかった1195 1196 1459 def initialize( ct_path, in_composite = false ) 1197 1460 super() … … 1233 1496 @referenced_port_list = {} 1234 1497 @restrict_list = {} 1498 @restrict_list2 = {} 1499 @b_restrict_referenced = false 1500 @b_post_code_generated = false 1235 1501 1236 1502 @cell_list = {} … … 1258 1524 cell_prev = CompositeCelltype.find( name ) 1259 1525 if cell_prev == nil then 1260 CompositeCelltype.new_cell ( self )1526 CompositeCelltype.new_cell_in_composite( self ) 1261 1527 end 1262 1528 else … … 1437 1703 1438 1704 else 1705 dbgPrint "new_join: cell=#{@name} add_item=#{join.get_name}\n" 1439 1706 # join 1440 1707 @join_list.add_item( join ) … … 1500 1767 1501 1768 # 呼び口側のセルと、そのセルタイプ 1502 cell = Namespace.find cp_cell_nsp 1769 if ! @in_composite then 1770 cell = Namespace.find cp_cell_nsp 1771 else 1772 cell = CompositeCelltype.find cp_cell_nsp.to_s.to_sym 1773 end 1774 1503 1775 if ! cell.instance_of? Cell then 1504 1776 cdl_error( "S9999 '$1': not cell for reverse join", cp_cell_nsp.get_path_str ) … … 1510 1782 end 1511 1783 1512 ep_cell_nsp = get_namespace_path 1784 if ! @in_composite then 1785 ep_cell_nsp = get_namespace_path 1786 ep_cell_nsp_str = ep_cell_nsp.get_path_str 1787 else 1788 ep_cell_nsp = NamespacePath.new @name, false 1789 ep_cell_nsp_str = @name 1790 end 1513 1791 ep_subscript_val = ep_subscript ? ep_subscript.eval_const( nil ) : nil 1514 1792 rhs = Expression.create_cell_join_expression( ep_cell_nsp, ep_subscript_val, ep_name, rj.get_locale ) … … 1521 1799 ss_str = "" 1522 1800 end 1523 dbgPrint "create_reverse_join: #{cell.get_name}.#{cp_name}#{ss_str} => #{ep_cell_nsp .get_path_str}.ep_name\n"1801 dbgPrint "create_reverse_join: #{cell.get_name}.#{cp_name}#{ss_str} => #{ep_cell_nsp_str}.#{ep_name}\n" 1524 1802 } 1525 1803 end … … 1565 1843 set_specifier_list( Generator.get_statement_specifier ) 1566 1844 end 1845 if TECSGEN.post_coded? 1846 @b_post_code_generated = true 1847 end 1567 1848 set_f_def f_def 1568 1849 … … 1581 1862 1582 1863 if ! @in_composite then 1583 if @celltype.instance_of? Celltype then 1864 # if @celltype.instance_of? Celltype then 1865 if @celltype then # composite でも呼びだす, エラー時 nil 1584 1866 @celltype.new_cell self 1585 1867 end … … 1702 1984 end 1703 1985 1704 #=== Cell# セル タイププラグイン (generate 指定子)1986 #=== Cell# セルプラグイン (generate 指定子) 1705 1987 def cell_plugin 1706 1707 load_plugin( @generate[0], CellPlugin )1708 1709 1988 plugin_name = @generate[0] 1710 1989 option = @generate[1] 1711 plugin_object = nil 1712 eval_str = "plugin_object = #{plugin_name}.new( self, option )" 1990 @generate[2] = apply_plugin plugin_name, option 1991 end 1992 1993 def apply_plugin plugin_name, option 1994 if ! @b_defined then 1995 cdl_error( "S9999 plugin cannot apply to prototype cell '$1'", @name ) 1996 end 1997 1998 plClass = load_plugin( plugin_name, CellPlugin ) 1999 # return if plClass == nil # 従来と仕様が変わるので、継続する 1713 2000 if $verbose then 1714 print "new cell : #{eval_str}\n"2001 print "new cell plugin: plugin_object = #{plClass.class.name}.new( #{@name}, #{option} )\n" 1715 2002 end 1716 2003 1717 2004 begin 1718 eval( eval_str ) # plugin を生成2005 plugin_object = plClass.new( self, option ) 1719 2006 plugin_object.set_locale @locale 1720 @generate[ 2 ] = plugin_object1721 2007 generate_and_parse plugin_object 1722 2008 rescue Exception => evar 1723 2009 cdl_error( "S1166 $1: fail to new", plugin_name ) 1724 print "eval( #{eval_str} )\n"1725 1726 2010 print_exception( evar ) 1727 2011 end 2012 return plugin_object 1728 2013 end 1729 2014 … … 1742 2027 1743 2028 # debug 1744 dbgPrint "Cell#clone_for_composite : cloning: #{@name} #{global_name} b_defined=#{@b_defined}\n" 2029 dbgPrint " CLONING Cell#clone_for_composite : cloning: #{@name} #{global_name} b_defined=#{@b_defined} #{self}=>#{@my_clone} \n" 2030 dbgPrint " my_name=#{@name} name=#{name} owner class=#{@owner.class.name}\n" 1745 2031 1746 2032 @my_clone = self.clone 1747 @@cloned_cell_list[ self ] = @my_clone1748 2033 1749 2034 # clone したセルの内部に持つ名前情報を調整する 1750 1751 2035 @my_clone.set_cloned( name, global_name, namespacePath, join_array, ct_name, region, plugin, locale ) 1752 2036 … … 1772 2056 # debug 1773 2057 dbgPrint "cell.set_cloned : global_name: #{global_name} name: #{name} @name: #{@name}\n" 1774 2058 dbgPrint "set_cloned: entry_array_max_subscript.len=#{@entry_array_max_subscript.length}\n" 1775 2059 @global_name = :"#{global_name}_#{@name}" 1776 2060 @name = :"#{name}_#{@name}" … … 1796 2080 @alloc_list = [] 1797 2081 @require_joined_list = {} 1798 @entry_array_max_subscript = {}2082 @entry_array_max_subscript = @entry_array_max_subscript.dup 1799 2083 @cell_list = {} 1800 2084 @cell_list2 = [] … … 1805 2089 @join_list.change_item j 1806 2090 } 2091 end 2092 2093 #=== clone されたセルが composite の場合、内部セルを展開する 2094 #self:: clone されたセルでなければならない 2095 def expand_inner 2096 if ! @f_cloned then 2097 raise "expnad_inner: not cloned cell" 2098 end 1807 2099 1808 2100 # clone しようとするセルが composit セルタイプ? … … 1811 2103 @cell_list, @cell_list2 = @celltype.expand( @name, @global_name, @NamespacePath, @join_list, @region, @plugin, @locale ) 1812 2104 end 1813 1814 2105 end 1815 2106 1816 2107 #=== Cell# clone された cell の join_list の右辺の変更 1817 2108 # 呼び口の右辺の cell を他の clone された cell に置換え 1818 def change_rhs_port 2109 def change_rhs_port cloned_cell_list 1819 2110 1820 2111 # debug 1821 dbgPrint " Cell change_rhs_port: global_name: #{@global_name}\n"2112 dbgPrint "===== Cell#change_rhs_port: name=#{@name} =====\n" 1822 2113 1823 2114 @join_list.get_items.each { |j| 1824 j.change_rhs_port( @@cloned_cell_list, @celltype ) 1825 } 1826 1827 if @celltype.instance_of?( CompositeCelltype ) then 1828 1829 # 入れ子のセルについても変更 1830 @cell_list.each{ |name,c| 1831 c.change_rhs_port 1832 } 1833 end 2115 j.change_rhs_port( cloned_cell_list, @celltype ) 2116 } 1834 2117 end 1835 2118 … … 1891 2174 def is_in_composite? 1892 2175 @in_composite 2176 end 2177 2178 #=== Cell# composite のセルか? 2179 def is_of_composite? 2180 if @celltype.kind_of? CompositeCelltype 2181 return true 2182 else 2183 return false 2184 end 2185 end 2186 2187 #=== Cell# tmp_plugin_post_code.cdl で生成されたセルか? 2188 def post_code_generated? 2189 @b_post_code_generated 1893 2190 end 1894 2191 … … 1980 2277 1981 2278 # セルタイプ内で port_name の CompositeCelltypeJoin を探す(コード生成段階では必ず見つかる) 2279 # print "get_real_cell: cell=#{@name} port=#{port_name}\n" 2280 # pp @cell_list 1982 2281 cj = @celltype.find_export( port_name ) 1983 2282 … … 1991 2290 end 1992 2291 2292 #=== Cell#get_real_celltype 2293 # 2294 def get_real_celltype( port_name ) 2295 if @celltype.instance_of?( CompositeCelltype ) then 2296 return @celltype.get_real_celltype port_name 2297 else 2298 return @celltype 2299 end 2300 end 1993 2301 1994 2302 #=== Cell# 受け口のport の参照カウントをアップする … … 2033 2341 end 2034 2342 2343 #Cell#属性の初期値を得る 2344 #attr_name::Symbol 必ず初期化されていないと Ruby 例外となる 2345 def get_attr_initializer attr_name 2346 val = @join_list.get_item( attr_name ) 2347 if val == nil then 2348 val = (@celltype.find attr_name).get_initializer 2349 else 2350 val = val.get_rhs 2351 end 2352 return val 2353 end 2354 2035 2355 def get_celltype 2036 2356 @celltype … … 2075 2395 #=== Cell# composite の内側セルの受け口配列の添数の最大値を設定 2076 2396 def set_entry_inner_port_max_subscript( port, num ) 2077 if @cell_list == nil then # mikan これって問題ない?2078 return # プロトタイプ宣言しかされていなくて、内側セルが展開されていない 2397 if @cell_list == nil then 2398 return # プロトタイプ宣言しかされていなくて、内側セルが展開されていない or composite 展開前 2079 2399 end 2080 2400 2081 2401 # composite の内側のセルに伝播 2082 2402 if @celltype.instance_of? CompositeCelltype then 2403 dbgPrint "set_entry_inner_port_max_subscript #{@name} #{@port} #{num} cell_list.len=#{@cell_list.length}\n" 2404 # @cell_list.each{ |c, p| print c, p, '\n' } 2405 2083 2406 cj = @celltype.find_export port.get_name 2084 2407 if cj && @cell_list[ cj.get_cell_name.to_s ] then … … 2278 2601 else 2279 2602 cell = j.get_rhs_cell2 2280 next if cell == nil # 右辺が見つからなかった.既にエラー2603 next if cell == nil || cell.get_celltype == nil # 右辺が見つからなかった.既にエラー 2281 2604 port = cell.get_celltype.find( j.get_rhs_port2 ) 2605 if port == nil then 2606 dbgPrint "set_port_ref: #{@name}.#{j.get_name} = #{cell.get_name}.#{j.get_rhs_port2}\n" 2607 # through プラグインで生成されたセルの受け口が見つからないケース (のハズ) 2608 cdl_error( "entry '$1' not found in '$2' refered from $3.$4", j.get_rhs_port2, cell.get_name, @name, j.get_name ) 2609 next 2610 end 2282 2611 dbgPrint( "set_port_reference_count: #{@name}.#{j.get_name} => #{cell.get_name}.#{port.get_name}\n") 2283 2612 cell.port_referenced port … … 2672 3001 } 2673 3002 else 3003 dbgPrint "set_definition_join: #{@name}.#{join.get_name} celltype=#{@celltype.get_name}\n" 2674 3004 join.set_definition( @celltype.find(join.get_name) ) 2675 3005 end … … 2687 3017 expand 2688 3018 end 2689 2690 # celltype に generate が指定されされているか2691 celltype_plugin = @celltype.get_celltype_plugin2692 if celltype_plugin then2693 begin2694 celltype_plugin.new_cell self2695 rescue Exception => evar2696 cdl_error( "S1037 $1: celltype plugin fail to new_cell" , celltype_plugin.class.name )2697 print_exception( evar )2698 end2699 end2700 3019 end 2701 3020 … … 2705 3024 2706 3025 #debug 2707 dbgPrint "expanding #{@name} #{@celltype.get_name}\n" 2708 2709 # 展開されたセルのリスト 2710 @@cloned_cell_list = {} 3026 dbgPrint "===== expanding #{@name} =====\n" 2711 3027 2712 3028 # composite celltype の cell を展開 … … 2718 3034 set_f_ref 2719 3035 end 2720 2721 # 呼び口の右辺のセルを clone したものに変更 2722 self.change_rhs_port 3036 end 3037 3038 #=== Cell#内部セルの受け口添数最大値を設定 3039 def set_max_entry_port_inner_cell 3040 if @cell_list == nil then 3041 return 3042 end 3043 3044 dbgPrint "set_max_entry_port_inner_cell name=#{@name} entry_array_max_subscript.len=#{@entry_array_max_subscript.length}\n" 2723 3045 2724 3046 # プロトタイプ宣言で設定されていたものを反映する 2725 3047 @entry_array_max_subscript.each{ |port,name| 3048 dbgPrint "set_entry_inner_port_max_subscript( #{port}, #{name} )\n" 2726 3049 set_entry_inner_port_max_subscript( port, name ) 2727 3050 } … … 2730 3053 #=== Cell#restrict を追加 2731 3054 def add_restrict( entry_name, func_name, region_name_list ) 2732 if @restrict_list[ entry_name ] then 2733 if @restrict_list[ entry_name ][ func_name ] then 2734 @restrict_list[ entry_name ][ func_name ].each{ |rn| 2735 if region_name_list.include? rn then 2736 # p func_name 2737 name = func_name ? entry_name : entry_name+"."+func_name 2738 cdl_warning( "W9999 $1 restrict region duplicate $2", name, rn ) 3055 if @restrict_list[ entry_name ] == nil then 3056 @restrict_list[ entry_name ] = {} 3057 @restrict_list2[ entry_name ] = {} 3058 end 3059 if @restrict_list[ entry_name ][ func_name ] == nil then 3060 @restrict_list[ entry_name ][ func_name ] = [] 3061 @restrict_list2[ entry_name ][ func_name ] = [] 3062 end 3063 region_name_list.each { |rp| 3064 @restrict_list[ entry_name ][ func_name ] << rp 3065 # p "Class: " + rp.to_s 3066 obj = Namespace.find rp 3067 if ( obj.kind_of? Region ) then 3068 @restrict_list2[ entry_name ][ func_name ] << obj.get_domain_root 3069 else 3070 cdl_error( "S9999 $1 not found or not region", rp.to_s ) 3071 end 3072 } 3073 end 3074 3075 #=== Cell#check_restrict_list 3076 def check_restrict_list 3077 # p "check_restrict_list" 3078 @restrict_list.each{ |entry_name, func_hash| 3079 func_hash.each{ |func_name, region_list| 3080 region_list.each{ |rp| 3081 obj = Namespace.find rp 3082 if ( obj.kind_of? Region ) then 3083 if obj.get_domain_root != @region.get_domain_root then 3084 else 3085 cdl_info( "I9999 $1: restrict calling domain to $2, which is same domain as the cell locates", @name, rp.to_s ) 3086 # restrict を同じドメインを指定してもよいこととする (HRP3) 3087 # KernelDoamin 内のセルに対し、KernelDomain に restrict している場合、 3088 # 無所属経由で結合されているが、KernelDomain から呼出すことを想定した許可 3089 end 3090 else 3091 cdl_error( "S9999 $1 not region", rp.to_s ) 3092 end 3093 } 3094 } 3095 } 3096 end 3097 3098 #=== Cell#callable? 3099 def callable?( callee_cell, entry_name, func_name ) 3100 # p "callable? #{@name}" 3101 res = callee_cell.callable_from?( entry_name, func_name, self ) 3102 dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n" 3103 return res 3104 end 3105 3106 #=== Cell#callable_from? (private) 3107 def callable_from?( entry_name, func_name, caller_cell ) 3108 @b_restrict_referenced = true 3109 if @restrict_list.length == 0 then 3110 return true 3111 end 3112 3113 dr = caller_cell.get_region.get_domain_root 3114 if @restrict_list[entry_name] then 3115 if @restrict_list[entry_name][func_name] then 3116 @restrict_list2[entry_name][func_name].each{ |region| 3117 if dr == region then 3118 return true 3119 end 3120 } 3121 elsif @restrict_list[entry_name][nil] then 3122 @restrict_list2[entry_name][nil].each{ |region| 3123 if dr == region then 3124 return true 2739 3125 end 2740 3126 } 2741 3127 else 2742 @restrict_list[ entry_name ][ func_name ] = region_name_list 2743 end 2744 else 2745 func_list = { } 2746 func_list[ func_name ] = region_name_list 2747 @restrict_list[ entry_name ] = func_list 2748 end 2749 # pp @restrict_list 2750 end 2751 2752 #=== Cell#check_restrict_list 2753 def check_restrict_list 2754 @restrict_list.each{ |entry_name, func_hash| 2755 func_hash.each{ |func_name, region_list| 2756 region_list.each{ |rn| 2757 obj = Namespace.find [ rn ] 2758 if ( obj.kind_of? Region ) then 2759 if obj.get_domain_root != @region.get_domain_root then 2760 else 2761 cdl_warning( "W9999 $1 in same domain", rn ) 2762 end 2763 else 2764 cdl_error( "S9999 $1 not region", region ) 2765 end 2766 } 2767 } 2768 } 2769 end 2770 2771 #=== Cell#callable? 2772 def callable?( callee_cell, entry_name, func_name ) 2773 res = callee_cell.callable_from?( entry_name, func_name, self ) 2774 dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n" 2775 return res 2776 end 2777 2778 #=== Cell#callable_from? (private) 2779 def callable_from?( entry_name, func_name, caller_cell ) 2780 if @restrict_list.length == 0 then 3128 return false 3129 end 3130 else 3131 return false 3132 end 3133 end 3134 3135 #=== Cell#get_callable_regions( entry_name, func_name ) 3136 # func_name=nil の場合、entry_name の可否をチェック数る 3137 # nil が返る場合、制限されていないことを意味する 3138 def get_restricted_regions( entry_name, func_name ) 3139 # p "get_restricted_regions #{@name}" 3140 @b_restrict_referenced = true 3141 if @restrict_list[entry_name] then 3142 if @restrict_list[entry_name][func_name] then 3143 return @restrict_list2[entry_name][func_name] 3144 else 3145 return @restrict_list2[entry_name][nil] 3146 end 3147 end 3148 return nil 3149 end 3150 3151 #=== Cell#has_ineffective_restrict_specifier 3152 # restrict 指定子が指定されていて、参照されていない場合 true 3153 # 参照は、HRPSVCPlugin のみ 3154 def has_ineffective_restrict_specifier 3155 if @restrict_list.length != 0 && @b_restrict_referenced == false then 2781 3156 return true 2782 end 2783 2784 if @restrict_list[entry_name] then 2785 if @restrict_list[entry_name][nil] && 2786 @restrict_list[entry_name][nil].include?( caller_cell.get_region.get_domain_root.get_name )then 2787 return true 2788 end 2789 if @restrict_list[entry_name][func_name] && 2790 @restrict_list[entry_name][func_name].include?( caller_cell.get_region.get_domain_root.get_name )then 2791 return true 2792 else 2793 return false 2794 end 2795 else 2796 return true 2797 end 2798 end 2799 3157 else 3158 return false 3159 end 3160 end 3161 2800 3162 def show_tree( indent ) 2801 3163 indent.times { print " " } … … 2857 3219 # @name:: str 2858 3220 # @global_name:: str 2859 # @cell_list:: NamedList Cell 3221 # @cell_list_in_composite:: NamedList Cell 3222 # @cell_list::Array :: [ Cell ] : cell of CompositeCelltype's cell 2860 3223 # @export_name_list:: NamedList : CompositeCelltypeJoin 2861 3224 # @port_list:: CompositeCelltypeJoin[] … … 2867 3230 # @name_list:: NamedList item: Decl (attribute), Port エクスポート定義 2868 3231 # @internal_allocator_list:: [ [cell, internal_cp_name, port_name, func_name, param_name, ext_alloc_ent], ... ] 3232 # @generate:: [ Symbol, String, Plugin ] = [ PluginName, option, Plugin ] Plugin は生成後に追加される 3233 # @generate_list:: [ [ Symbol, String, Plugin ], ... ] generate 文で追加された generate 2869 3234 2870 3235 @@nest_stack_index = -1 2871 3236 @@nest_stack = [] 2872 3237 @@current_object = nil 3238 3239 include CelltypePluginModule 3240 include PluginModule 2873 3241 2874 3242 def self.push … … 2889 3257 super() 2890 3258 @name = name 2891 @cell_list = NamedList.new( nil, "in composite celltype #{name}" ) 3259 @cell_list_in_composite = NamedList.new( nil, "in composite celltype #{name}" ) 3260 @cell_list = [] 2892 3261 @export_name_list = NamedList.new( nil, "export in composite celltype #{name}" ) 2893 3262 @name_list = NamedList.new( nil, "in composite celltype #{name}" ) … … 2910 3279 @attr_list = [] 2911 3280 @internal_allocator_list = [] 3281 @generate_list = [] 2912 3282 set_specifier_list( Generator.get_statement_specifier ) 2913 3283 end … … 2920 3290 # CompositeCelltype#end_of_parse 2921 3291 def end_of_parse 2922 2923 3292 # singleton に関するチェック 2924 3293 if @b_singleton && @real_singleton == nil then … … 2960 3329 # mikan relay が正しく抜けているかチェックされていない 2961 3330 3331 # callback 結合 3332 @cell_list_in_composite.get_items.each{ |c| 3333 ct = c.get_celltype 3334 if ct then 3335 c.create_reverse_join 3336 end 3337 } 3338 2962 3339 # 意味解析 2963 @cell_list .get_items.each{ |c|3340 @cell_list_in_composite.get_items.each{ |c| 2964 3341 c.set_definition_join 2965 3342 } 2966 3343 2967 3344 # cell の未結合の呼び口がないかチェック 2968 @cell_list .get_items.each{ |c|3345 @cell_list_in_composite.get_items.each{ |c| 2969 3346 c.check_join 2970 3347 c.check_reverse_require … … 3004 3381 } 3005 3382 } 3006 end 3007 3008 ### cell (CompositeCelltype) 3009 def self.new_cell( cell ) 3010 @@current_object.new_cell( cell ) 3011 3012 end 3013 3014 def new_cell( cell ) 3383 3384 # composite プラグイン 3385 if @generate then 3386 celltype_plugin 3387 end 3388 end 3389 3390 ### CompositeCelltype#new_cell_in_composite 3391 def self.new_cell_in_composite( cell ) 3392 @@current_object.new_cell_in_composite( cell ) 3393 3394 end 3395 3396 def new_cell_in_composite( cell ) 3015 3397 cell.set_owner self # Cell (in_omposite) 3016 @cell_list .add_item( cell )3398 @cell_list_in_composite.add_item( cell ) 3017 3399 if cell.get_celltype then # nil ならば、すでにセルタイプなしエラー 3018 3400 if cell.get_celltype.is_singleton? then … … 3031 3413 internal_cell_elem_name, type ) 3032 3414 3415 end 3416 3417 ### CompositeCelltype#new_cell 3418 def new_cell cell 3419 @cell_list << cell 3420 3421 # セルタイププラグインの適用 3422 celltype_plugin_new_cell cell 3033 3423 end 3034 3424 … … 3050 3440 dbgPrint "new_join: #{export_name} #{internal_cell_name} #{internal_cell_elem_name}\n" 3051 3441 3052 cell = @cell_list .get_item( internal_cell_name )3442 cell = @cell_list_in_composite.get_item( internal_cell_name ) 3053 3443 if cell == nil then 3054 3444 cdl_error( "S1057 $1 not found in $2" , internal_cell_name, @name ) … … 3107 3497 elsif obj.is_omit? != obj2.is_omit? then 3108 3498 cdl_error( "S9999 $1 : omit specifier mismatch with previous definition" , export_name ) 3499 elsif obj.is_dynamic? != obj2.is_dynamic? then 3500 cdl_error( "S9999 $1 : dynamic specifier mismatch with previous definition" , export_name ) 3501 elsif obj.is_ref_desc? != obj2.is_ref_desc? then 3502 cdl_error( "S9999 $1 : ref_desc specifier mismatch with previous definition" , export_name ) 3109 3503 end 3110 3504 else … … 3292 3686 def find name 3293 3687 dbgPrint "CompositeCelltype: find in composite: #{name}\n" 3294 cell = @cell_list .get_item( name )3688 cell = @cell_list_in_composite.get_item( name ) 3295 3689 return cell if cell 3296 3690 … … 3333 3727 clone_cell_list = {} 3334 3728 clone_cell_list2 = [] 3729 clone_cell_list3 = {} 3335 3730 3336 3731 # composite 内部のすべての cell について 3337 @cell_list .get_items.each { |c|3732 @cell_list_in_composite.get_items.each { |c| 3338 3733 3339 3734 # debug … … 3359 3754 # debug 3360 3755 if j then 3361 dbgPrint " expand : parent cell: #{name} child cell: #{c.get_name}: parent's export port: #{cj.get_name} join: #{j.get_name} #{j}\n"3756 dbgPrint " REWRITE_EX parent cell: #{name} child cell: #{c.get_name}: parent's export port: #{cj.get_name} join: #{j.get_name}=>#{j.get_rhs.to_s}\n" 3362 3757 else 3363 3758 dbgPrint "expand : parent cell: #{name} child cell: #{c.get_name}: parent's export port: #{cj.get_name} join: nil\n" … … 3394 3789 clone_cell_list[ "#{c.get_local_name}" ] = c2 3395 3790 clone_cell_list2 << c2 3791 clone_cell_list3[ c ] = c2 3396 3792 3397 3793 } … … 3403 3799 j.set_cloned( clone_cell_list[ "#{c.get_local_name}" ] ) 3404 3800 } 3801 dbgPrint "change_rhs_port: inner cell #{c.get_name}\n" 3802 c.change_rhs_port clone_cell_list3 3803 } 3804 clone_cell_list2.each { |c| 3805 c.expand_inner 3405 3806 } 3406 3807 return [ clone_cell_list, clone_cell_list2 ] … … 3419 3820 when :ACTIVE 3420 3821 @b_active = true 3822 when :GENERATE 3823 if @generate then 3824 cdl_error( "S9999 generate specifier duplicate" ) 3825 end 3826 @generate = [ s[1], s[2] ] # [ PluginName, "option" ] 3421 3827 else 3422 3828 cdl_error( "S1071 $1 cannot be specified for composite" , s[0] ) … … 3429 3835 end 3430 3836 3837 def get_global_name 3838 @global_name 3839 end 3840 3431 3841 def get_port_list 3432 3842 @port_list … … 3443 3853 def get_internal_allocator_list 3444 3854 @internal_allocator_list 3855 end 3856 3857 #== CompositeCelltype#get_real_celltype 3858 # port_name に接続されている内部のセルタイプを得る 3859 def get_real_celltype( port_name ) 3860 cj = find_export port_name 3861 inner_celltype = cj.get_cell.get_celltype 3862 if inner_celltype.instance_of? CompositeCelltype then 3863 return inner_celltype.get_real_celltype 3864 else 3865 return inner_celltype 3866 end 3445 3867 end 3446 3868 … … 3465 3887 def is_inactive? 3466 3888 if @b_active == false then 3467 @cell_list .get_items.each{ |c|3889 @cell_list_in_composite.get_items.each{ |c| 3468 3890 if c.get_celltype && c.get_celltype.is_inactive? == false then 3469 3891 # c.get_celltype == nil の場合はセルタイプ未定義ですでにエラー … … 3486 3908 (indent+1).times { print " " } 3487 3909 puts "active: #{@b_active}, singleton: #{@b_singleton}" 3488 @cell_list .show_tree( indent + 1 )3910 @cell_list_in_composite.show_tree( indent + 1 ) 3489 3911 (indent+1).times { print " " } 3490 3912 puts "name_list" … … 3532 3954 # @b_omit:: bool : omit 指定子が指定された (call port のみ) 3533 3955 # @b_optional:: bool : call port のみ 3534 # @b_ref_des :: bool : ref_desc キーワードが指定された3956 # @b_ref_desc:: bool : ref_desc キーワードが指定された 3535 3957 # @b_dynamic:: bool : dynamic キーワードが指定された (呼び口のみ) 3536 3958 # … … 3638 4060 @b_inline = false 3639 4061 @b_optional = false 4062 @b_omit = false 3640 4063 @b_ref_desc = false 3641 4064 @b_dynamic = false … … 3655 4078 else 3656 4079 # entry port optimize 3657 if $unopt then4080 if $unopt || $unopt_entry then 3658 4081 # 最適化なし 3659 4082 @b_VMT_useless = false # VMT 不要 (true の時 VMT を介することなく呼出す) … … 3786 4209 @b_optional = true 3787 4210 when :REF_DESC 4211 if @port_type == :ENTRY then 4212 cdl_error( "S9999 ref_desc: cannnot be specified for entry port" ) 4213 next 4214 end 3788 4215 @b_ref_desc = true 3789 4216 when :DYNAMIC … … 3806 4233 end 3807 4234 } 4235 if ( @b_dynamic || @b_ref_desc ) then 4236 if @b_dynamic then 4237 dyn_ref = "dynamic" 4238 else 4239 dyn_ref = "ref_desc" 4240 end 4241 if @b_omit then # is_omit? は is_empty? も含んでいるので使えない 4242 cdl_error( "S9999 omit cannot be specified with $1", dyn_ref ) 4243 elsif @signature && @signature.is_empty? then 4244 cdl_error( "S9999 $1 cannot be specified for empty signature", dyn_ref ) 4245 elsif @signature && @signature.has_descriptor? then 4246 # cdl_error( "S9999 $1 port '$2' cannot have Descriptor in its signature", dyn_ref, @name ) 4247 end 4248 4249 elsif @b_dynamic && @b_ref_desc then 4250 cdl_error( "S9999 both dynamic & ref_desc cannot be specified simultaneously" ) 4251 end 3808 4252 end 3809 4253 … … 3958 4402 3959 4403 def is_VMT_useless? # VMT 関数テーブルを使用しない 3960 @b_VMT_useless 4404 if @port_type == :ENTRY && $unopt_entry == true then 4405 # プラグインから $unopt_entry を設定するケースのため 4406 # ここで読み出すときに、false を返す (reset_optimize での設定変更は速すぎる) 4407 return false 4408 else 4409 return @b_VMT_useless 4410 end 3961 4411 end 3962 4412 3963 4413 def is_skelton_useless? # スケルトン関数不要 (true の時、受け口関数を呼出す) 3964 @b_skelton_useless 4414 if @port_type == :ENTRY && $unopt_entry == true then 4415 # プラグインから $unopt_entry を設定するケースのため 4416 # ここで読み出すときに、false を返す (reset_optimize での設定変更は速すぎる) 4417 return false 4418 else 4419 return @b_skelton_useless 4420 end 3965 4421 end 3966 4422 … … 4078 4534 def is_reverse_required? 4079 4535 @reverse_require_cell_path != nil 4536 end 4537 4538 #=== Port# is_dynamic? 4539 def is_dynamic? 4540 @b_dynamic 4541 end 4542 4543 #=== Port# is_ref_desc? 4544 def is_ref_desc? 4545 @b_ref_desc 4080 4546 end 4081 4547 … … 4489 4955 if ! c.get_f_def then # Namespace の @cell_list にはプロトタイプが含まれるケースあり 4490 4956 if c.get_f_ref then 4491 c dl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str )4957 c.cdl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str ) 4492 4958 elsif $verbose then 4493 c dl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str )4959 c.cdl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str ) 4494 4960 end 4495 4961 else … … 4498 4964 # if c.get_f_ref == false && c.is_generate? && ct && ct.is_inactive? then 4499 4965 if c.get_f_ref == false && ct && ct.is_inactive? then 4500 cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str ) 4966 c.cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str ) 4967 end 4968 if c.has_ineffective_restrict_specifier then 4969 c.cdl_warning( "W9999: $1 has ineffective restrict specifier", c.get_namespace_path.get_path_str ) 4501 4970 end 4502 4971 end … … 4657 5126 end 4658 5127 5128 #=== Namespace# set_max_entry_port_inner_cell 5129 # セルタイプに属するすべてのセルに対して実施 5130 def set_max_entry_port_inner_cell 5131 # celltype のコードを生成 5132 @cell_list.each { |c| 5133 c.set_max_entry_port_inner_cell 5134 } 5135 @namespace_list.each{ |ns| 5136 ns.set_max_entry_port_inner_cell 5137 } 5138 end 5139 4659 5140 #=== Namespace# セルの結合をチェックする 4660 5141 def check_join … … 4681 5162 end 4682 5163 5164 #== Namespace (Region) に属するセルのリスト 5165 def get_cell_list 5166 @cell_list 5167 end 5168 5169 #== Namespace (Region)# 子リージョンのリスト 5170 # 5171 # リージョンは Namespace クラスで namespace として記憶されている 5172 def get_region_list 5173 @namespace_list 5174 end 5175 4683 5176 def show_tree( indent ) 4684 5177 indent.times { print " " } … … 4904 5397 4905 5398 if object == nil then # (2) 4906 cdl_error( "S1109 \'$1\' not found" , @cell_name)5399 cdl_error( "S1109 \'$1\' not found" , nsp.to_s ) 4907 5400 elsif ! object.instance_of?( Cell ) then # (3) 4908 cdl_error( "S1110 \'$1\' not cell" , @cell_name)5401 cdl_error( "S1110 \'$1\' not cell" , nsp.to_s ) 4909 5402 else 4910 5403 dbgPrint "set_definition: set_f_ref #{@owner.get_name}.#{@name} => #{object.get_name}\n" … … 5277 5770 next_cell_nsp = @through_generated_list[ i + 1 ].get_cell_namespace_path 5278 5771 next_port_name = @through_generated_list[ i + 1 ].get_through_entry_port_name 5772 next_port_subscript = @through_generated_list[ i + 1 ].get_through_entry_port_subscript 5279 5773 rescue Exception => evar 5280 5774 cdl_error( "S1124 $1: plugin function failed: \'get_through_entry_port_name\'" , plugin_name ) … … 5295 5789 next_cell = @cell 5296 5790 next_port_name = @port_name 5791 next_port_subscript = @rhs_subscript 5297 5792 5298 5793 if next_cell == nil then … … 5306 5801 # region から @cell_name.@port_name への through がないか探す 5307 5802 # rp = @through_list[i][3].find_cell_port_through_plugin( @cell_name, @port_name ) #762 5308 rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name )5803 rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name, @rhs_subscript ) 5309 5804 # @through_list[i] と @region_through_list[i-cp_len] は同じ 5310 5805 # 共用しないようにするには、見つからなかったことにすればよい … … 5317 5812 5318 5813 if rp == nil then 5319 if( load_plugin( plugin_name, ThroughPlugin ) ) then 5320 gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name ) 5814 plClass = load_plugin( plugin_name, ThroughPlugin ) 5815 if( plClass ) then 5816 gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, next_port_subscript, plClass ) 5321 5817 end 5322 5818 else … … 5331 5827 # 生成したものを region(@through_list[i][3]) のリストに追加 5332 5828 # @through_list[i][3].add_cell_port_through_plugin( @cell_name, @port_name, @through_generated_list[i] ) #762 5333 @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @ through_generated_list[i] )5829 @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @rhs_subscript, @through_generated_list[i] ) 5334 5830 end 5335 5831 end … … 5365 5861 5366 5862 #=== Join# through プラグインを呼び出して CDL 生成させるとともに、import する 5367 def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name )5863 def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, next_port_subscript, plClass ) 5368 5864 5369 5865 through = @through_list[ i ] … … 5389 5885 end 5390 5886 @@plugin_creating_join = self 5391 5392 5887 caller_cell = @owner 5393 5888 5394 plugin_object = nil5395 eval_str = "plugin_object = #{plugin_name}.new( '#{generating_cell_name}'.to_sym, plugin_arg.to_s, next_cell, '#{next_port_name}'.to_sym, @definition.get_signature, @celltype, caller_cell )"5396 if $verbose then5397 print "new through: #{eval_str}\n"5398 end5399 5400 5889 begin 5401 eval( eval_str ) # plugin を生成 5890 plugin_object = plClass.new( generating_cell_name.to_sym, plugin_arg.to_s, 5891 next_cell, next_port_name.to_sym, next_port_subscript, 5892 @definition.get_signature, @celltype, caller_cell ) 5402 5893 plugin_object.set_locale @locale 5403 5894 rescue Exception => evar … … 5406 5897 print "signature: #{@definition.get_signature.get_name} from: #{caller_cell.get_name} to: #{next_cell.get_name} of celltype: #{@celltype.get_name}\n" 5407 5898 end 5408 print "eval( #{eval_str} )\n"5409 5410 5899 print_exception( evar ) 5411 5900 return … … 5596 6085 end 5597 6086 5598 def get_rhs_subscript 6087 # 末尾数字1 : CDL で指定された、右辺のセルを返す 6088 def get_rhs_cell1 # get_cell と同じ 6089 @cell 6090 end 6091 def get_rhs_port1 # get_port_name 同じ 6092 @port_name 6093 end 6094 def get_rhs_subscript1 5599 6095 @rhs_subscript 5600 6096 end … … 5606 6102 # through 指定あり? 5607 6103 if @through_list[0] then 5608 # mikan through で生成したものが root namespace 限定5609 6104 # through で生成されたセルを探す 5610 # cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] ) #15611 6105 cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path ) #1 5612 6106 # cell のプラグインで生成されたポート名のポートを探す (composite なら内部の繋がるポート) … … 5615 6109 # ポートを返す(composite なら内部の繋がるポートを返す) 5616 6110 return @cell.get_real_port( @port_name ) 6111 end 6112 end 6113 6114 #=== Join# 右辺の配列添数を得る 6115 # 右辺が through の場合は挿入されたセルの添数 6116 # 右辺が composite の場合は、内部の繋がるセルのポートの添数 (composite では変わらない) 6117 # このメソッドは get_rhs_cell, と対になっている 6118 def get_rhs_subscript 6119 if @through_list[0] then 6120 return @through_generated_list[0].get_through_entry_port_subscript 6121 else 6122 return @rhs_subscript 5617 6123 end 5618 6124 end … … 5718 6224 # composite cell を展開したセルの結合を clone したセルの名前に変更 5719 6225 def change_rhs_port( clone_cell_list, celltype ) 6226 dbgPrint "change_rhs_port: name=#{@name}\n" 5720 6227 5721 6228 # debug 5722 6229 if $debug then 5723 dbgPrint "change_rhs name: #{@name} cell_name: #{@cell_name} #{@cell} #{self}\n" 6230 # if @name == :cCallB then 6231 # dbgPrint "change_rhs name: #{@name} cell_name: #{@cell_name} #{@cell} #{self}\n" 6232 print "============\n" 6233 print "CHANGE_RHS change_rhs name: #{@owner.get_name}.#{@name} rhs cell_name: #{@cell_name} #{@cell} #{self}\n" 5724 6234 5725 6235 clone_cell_list.each{ |cell, ce| 5726 dbgPrint "change_rhs: #{cell.get_name}=#{cell} : #{ce.get_name}\n" 6236 # dbgPrint "=== change_rhs: #{cell.get_name}=#{cell} : #{ce.get_name}\n" 6237 print " CHANGE_RHS change_rhs: #{cell.get_name}=#{cell} : #{ce.get_name}\n" 5727 6238 } 6239 print "============\n" 5728 6240 end 5729 6241 … … 5732 6244 5733 6245 # debug 5734 dbgPrint " cell_name:#{@cell_name} => #{c.get_global_name}, #{c.get_name}\n"6246 dbgPrint " REWRITE cell_name: #{@owner.get_name} #{@cell_name} => #{c.get_global_name}, #{c.get_name}\n" 5735 6247 5736 6248 # @rhs の内容を調整しておく(この内容は、subscript を除いて、後から使われていない) … … 5756 6268 5757 6269 # debug 5758 # p "array_member2.len : #{@array_member.length}"6270 dbgPrint "array_member2.len : #{@array_member.length}\n" 5759 6271 5760 6272 i = 0 … … 5764 6276 # 無駄に設定されているものについては、再帰的に呼び出す必要はない(clone_for_composite では対策している) 5765 6277 if @array_member2[i] != self && @array_member[i] != nil then 6278 dbgPrint "change_rhs array_member #{i}: #{@name} #{@cell_name}\n" 5766 6279 @array_member2[i].change_rhs_port( clone_cell_list, celltype ) 5767 6280 end … … 5779 6292 # @through_list などもコピーされるので、これが呼び出される前に確定する必要がある 5780 6293 def clone_for_composite( ct_name, cell_name, locale, b_need_recursive = true ) 5781 5782 6294 # debug 5783 dbgPrint " join.clone_for_composite : #{@name} #{@cell_name} #{self}\n"6295 dbgPrint "===== clone_for_composite: #{@name} #{@cell_name} #{self} =====\n" 5784 6296 cl = self.clone 5785 6297 5786 6298 if @array_member2 && b_need_recursive then 5787 cl.clone_array_member( @array_member, @array_member2,ct_name, cell_name, self, locale )6299 cl.clone_array_member( ct_name, cell_name, self, locale ) 5788 6300 end 5789 6301 … … 5796 6308 end 5797 6309 5798 def clone_array_member( array_member, array_member2,ct_name, cell_name, prev, locale )6310 def clone_array_member( ct_name, cell_name, prev, locale ) 5799 6311 # 配列のコピーを作る 5800 am = array_member.clone5801 am2 = array_member2.clone6312 am = @array_member.clone 6313 am2 = @array_member2.clone 5802 6314 5803 6315 # 配列要素のコピーを作る 5804 6316 i = 0 5805 6317 while i < am2.length 5806 if array_member2[i] == prev then6318 if @array_member2[i] == prev then 5807 6319 # 自分自身である(ので、呼出すと無限再帰呼出しとなる) 5808 6320 am2[i] = self 5809 elsif array_member2[i] then 5810 am2[i] = array_member2[i].clone_for_composite( ct_name, cell_name, locale, false ) 6321 am[i] = am2[i].get_rhs 6322 elsif @array_member2[i] then 6323 # am2[i] = @array_member2[i].clone_for_composite( ct_name, cell_name, locale, false ) 6324 am2[i] = @array_member2[i].clone_for_composite( ct_name, cell_name, locale, true ) 6325 am[i] = am2[i].get_rhs 5811 6326 else 5812 6327 # 以前のエラーで array_member2[i] は nil になっている … … 5814 6329 5815 6330 # debug 5816 dbgPrint "clone_array_member: #{@name} #{am2[i]} #{array_member2[i]}\n"6331 dbgPrint "clone_array_member: #{@name} subsript=#{i} #{am2[i]} #{@array_member2[i]}\n" 5817 6332 5818 6333 i += 1 … … 5840 6355 dbgPrint "Join#set_cloned: #{@name} prev owner: #{@owner.get_name} new owner: #{owner.get_name}\n" 5841 6356 @owner = owner 6357 if @array_member2 then 6358 @array_member2.each{ |join| 6359 dbgPrint "Joinarray#set_cloned: #{@name} prev owner: #{join.get_owner.get_name} new owner: #{owner.get_name}\n" 6360 join.set_owner owner 6361 } 6362 end 5842 6363 end 5843 6364 … … 5905 6426 if j then 5906 6427 (indent+2).times { print " " } 5907 puts "[#{i}]: #{j.get_name} id: #{j} "6428 puts "[#{i}]: #{j.get_name} id: #{j} owner=#{j.get_owner.get_name}" 5908 6429 j.get_rhs.show_tree(indent+3) 5909 (indent+3).times { print " " } 5910 puts "cell global name: #{j.get_cell_global_name}" 5911 (indent+3).times { print " " } 5912 puts "port global name: #{j.get_port_global_name}" 6430 # (indent+3).times { print " " } 6431 # puts "cell global name: #{j.get_cell_global_name}" 6432 # puts "cell global name: #{j.get_rhs_cell.get_global_name}" 6433 # (indent+3).times { print " " } 6434 # puts "port global name: #{j.get_port_global_name}" 6435 # puts "port global name: #{j.get_rhs_port.get_name}" 5913 6436 else 5914 6437 (indent+2).times { print " " } … … 6235 6758 end 6236 6759 6237 #== Domain 6760 #== DomainType 6238 6761 # 6239 6762 # region の domain を記憶するクラス … … 6256 6779 @name = name 6257 6780 @plugin_name = (name.to_s + "Plugin").to_sym 6258 load_plugin( @plugin_name, DomainPlugin )6781 plClass = load_plugin( @plugin_name, DomainPlugin ) 6259 6782 @region = region 6260 6783 @option = option … … 6272 6795 if ! @plugin then 6273 6796 pluginClass = Object.const_get @plugin_name 6797 return if pluginClass == nil 6274 6798 @plugin = pluginClass.new( @region, @name, @option ) 6799 @plugin.set_locale @locale 6275 6800 end 6276 6801 end … … 6290 6815 end 6291 6816 6292 #== Domain リージョンの Hash を得る6817 #== DomainType リージョンの Hash を得る 6293 6818 # @@domain_regions の説明参照 6294 6819 def self.get_domain_regions … … 6302 6827 def get_option 6303 6828 @option 6829 end 6830 6831 #== DomainType#ドメイン種別を得る 6832 #return::Symbol :kernel, :user, :OutOfDomain 6833 def get_kind 6834 @plugin.get_kind 6304 6835 end 6305 6836 … … 6363 6894 6364 6895 if @@domain_name then 6896 dbgPrint "Region=#{name} domain_type=#{@@domain_name} option=#{@@domain_option}\n" 6365 6897 domain_option = CDLString.remove_dquote @@domain_option.to_s 6366 6898 @domain_type = DomainType.new( self, @@domain_name, domain_option ) … … 6401 6933 6402 6934 # 再出現時に specifier が指定されているか? 6403 if( @in_through_list.length != 0 || @out_through_list.length != 0 || @to_through_list.length != 0 || @region_type != nil )then 6935 if( @in_through_list.length != 0 || @out_through_list.length != 0 || @to_through_list.length != 0 || 6936 @region_type != nil || @domain_type != nil )then 6404 6937 cdl_error( "S1140 $1: region specifier must place at first appearence" , name ) 6405 6938 end … … 6610 7143 end 6611 7144 7145 #== Region# ルートリージョン 7146 # ルートリージョンは、namespace のルートと同じインスタンス 7147 def selfget_root 7148 Namespace.get_root 7149 end 7150 6612 7151 def next_in_through_count 6613 7152 @in_through_count += 1 … … 6643 7182 #=== Region# through プラグインで、この region から cell_name.port_name へのプラグインオブジェクトを登録 6644 7183 # mikan namesppace 対応 (cell_name) 6645 def add_cell_port_through_plugin( cell_name, port_name, through_plugin_object ) 6646 @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ] = through_plugin_object 6647 end 6648 6649 def find_cell_port_through_plugin( cell_name, port_name ) 6650 return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ] 7184 def add_cell_port_through_plugin( cell_name, port_name, subscript, through_plugin_object ) 7185 if subscript then 7186 subscript = '[' + subscript.to_s + ']' 7187 end 7188 @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}#{subscript}" ] = through_plugin_object 7189 end 7190 7191 def find_cell_port_through_plugin( cell_name, port_name, subscript ) 7192 if subscript then 7193 subscript = '[' + subscript.to_s + ']' 7194 end 7195 return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}#{subscript}" ] 6651 7196 end 6652 7197 … … 6779 7324 end 6780 7325 7326 #== Importable class 7327 # this module is included by Import_C and Import 7328 module Importable 7329 #@last_base_dir::String 7330 7331 #=== Importable#find_file 7332 #file::String : file name to find 7333 #return::String | Nil: path to file or nil if not found 7334 #find file in 7335 def find_file file 7336 $import_path.each{ |path| 7337 if path == "." 7338 pt = file 7339 else 7340 pt = "#{path}/#{file}" 7341 end 7342 if File.exist?( pt ) 7343 if ! $base_dir[ Dir.pwd ] 7344 $base_dir[ Dir.pwd ] = true 7345 end 7346 if $verbose then 7347 print "#{file} is found in #{path}\n" 7348 end 7349 @last_base_dir = nil 7350 dbgPrint "base_dir=. while searching #{file}\n" 7351 return pt 7352 end 7353 } 7354 7355 $base_dir.each_key{ |bd| 7356 $import_path.each{ |path| 7357 # if path =~ /\A\// || path =~ /\A[a-zA-Z]:/ 7358 pt = "#{path}/#{file}" 7359 # else 7360 # pt = "#{bd}/#{path}/#{file}" 7361 # end 7362 begin 7363 Dir.chdir $run_dir 7364 Dir.chdir bd 7365 if File.exist?( pt ) 7366 if $verbose then 7367 print "#{file} is found in #{bd}/#{path}\n" 7368 end 7369 @last_base_dir = bd 7370 dbgPrint "base_dir=#{bd} while searching #{file}\n" 7371 $base_dir[ bd ] = true 7372 return pt 7373 end 7374 rescue 7375 end 7376 } 7377 } 7378 @last_base_dir = nil 7379 dbgPrint "base_dir=. while searching #{file}\n" 7380 return nil 7381 end 7382 7383 def get_base_dir 7384 return @last_base_dir 7385 $base_dir.each{ |bd, flag| 7386 if flag == true 7387 return bd 7388 end 7389 } 7390 return nil 7391 end 7392 end 7393 6781 7394 class Import_C < Node 6782 7395 … … 6785 7398 @@header_list2 = [] 6786 7399 @@define_list = {} 7400 7401 include Importable 6787 7402 6788 7403 #=== Import_C# import_C の生成(ヘッダファイルを取込む) … … 6823 7438 } 6824 7439 7440 header_path = find_file header 7441 7442 =begin 6825 7443 include_opt = "" 6826 7444 found = false … … 6844 7462 6845 7463 if found == false then 7464 =end 7465 if header_path == nil then 6846 7466 cdl_error( "S1142 $1 not found in search path" , header ) 6847 7467 return 6848 7468 end 7469 7470 include_opt = "" 7471 if get_base_dir then 7472 base = get_base_dir + "/" 7473 else 7474 base = "" 7475 end 7476 $import_path.each{ |path| 7477 include_opt = "#{include_opt} -I #{base}#{path}" 7478 } 6849 7479 6850 7480 # 読込み済み? … … 6862 7492 @@header_list2 << header 6863 7493 @@define_list[ header ] = define 7494 7495 if $verbose then 7496 print "import_C header=#{header_path}, define=#{define}\n" 7497 end 6864 7498 6865 7499 begin … … 6940 7574 * --no-gcc-extension-support for tecsgen. 6941 7575 */ 7576 #ifdef __GNUC__ 7577 6942 7578 #ifndef __attribute__ 6943 7579 #define __attribute__(x) … … 6956 7592 #endif 6957 7593 7594 #ifndef restrict 7595 #define restrict 7596 #endif 7597 7598 #endif /* ifdef __GNUC__ */ 6958 7599 #endif /* TECS_NO_GCC_EXTENSION_SUPPORT */ 6959 7600 EOT … … 6983 7624 # @cdl_path:: string: CDL のパス 6984 7625 # @b_imported:: bool: import された(コマンドライン指定されていない) 7626 7627 include Importable 6985 7628 6986 7629 # ヘッダの名前文字列のリスト 添字:expand したパス、値:Import … … 7023 7666 @b_reuse_real = @b_reuse || Generator.is_reuse? 7024 7667 7025 if Generator.get_plugin then 7026 # plugin から import されている場合 gen をサーチパスの先頭に加える 7027 search_path = [ $gen ] + $import_path 7028 else 7029 search_path = $import_path 7030 end 7031 7032 search_path.each{ |path| 7033 dbgPrint "import: searching #{path}/#{@cdl}" 7034 begin 7035 if path == "." 7036 cdl_path = @cdl 7037 else 7038 cdl_path = "#{path}/#{@cdl}" 7039 end 7040 7041 # ファイルの stat を取ってみる(なければ例外発生) 7042 File.stat( cdl_path ) 7043 7044 # cdl を見つかったファイルパスに再設定 7045 @cdl_path = cdl_path 7668 if( Generator.get_plugin ) &&( File.exist? "#{$gen}/#{@cdl}" ) then 7669 @cdl_path = "#{$gen}/#{@cdl}" 7670 found = true 7671 else 7672 path = find_file @cdl 7673 if path then 7046 7674 found = true 7047 dbgPrint ": found\n" 7048 break 7049 rescue => evar 7050 found = false 7051 dbgPrint ": not found\n" 7052 # print_exception( evar ) 7053 end 7054 } 7675 @cdl_path = path 7676 end 7677 end 7055 7678 7056 7679 if found == false then … … 7118 7741 end 7119 7742 7120 #== generate: signature プラグインのロードと実行7743 #== generate: signature, celltype, cell へのプラグインのロードと適用 7121 7744 class Generate < Node 7122 7745 #@plugin_name:: Symbol 7123 #@ signature_nsp:: NamespacePath7746 #@object_nsp:: NamespacePath 7124 7747 #@option:: String '"', '"' で囲まれている 7748 #@plugin_object:: Plugin 7125 7749 7126 7750 include PluginModule 7127 7751 7128 def initialize( plugin_name, signature_nsp, option )7752 def initialize( plugin_name, object_nsp, option ) 7129 7753 super() 7130 7754 @plugin_name = plugin_name 7131 @ signature_nsp = signature_nsp7755 @object_nsp = object_nsp 7132 7756 option = option.to_s # option は Token 7133 7757 @option = option 7134 7135 signature = Namespace.find( signature_nsp ) #mikan Namespace #1 7136 if ! signature.instance_of? Signature then 7137 cdl_error( "S1149 $1 not signature" , signature_nsp ) 7758 @plugin_object = nil 7759 7760 dbgPrint "generate: #{plugin_name} #{object_nsp.to_s} option=#{option}\n" 7761 7762 object = Namespace.find( object_nsp ) 7763 if object.kind_of?( Signature ) || 7764 object.kind_of?( Celltype ) || 7765 object.kind_of?( CompositeCelltype ) || 7766 object.kind_of?( Cell )then 7767 @plugin_object = object.apply_plugin( @plugin_name, @option ) 7768 elsif object then 7769 # V1.5.0 以前の仕様では、signature のみ可能だった 7770 # cdl_error( "S1149 $1 not signature" , signature_nsp ) 7771 cdl_error( "S9999 generate: '$1' neither signature, celltype nor cell", object_nsp ) 7138 7772 return 7139 elsif signature.is_empty? then 7140 cdl_warning( "S9999 $1 is empty. cannot apply signature plugin. ignored" , signature_nsp ) 7141 return 7142 end 7143 7144 load_plugin( plugin_name, SignaturePlugin ) 7145 7146 plugin_object = nil 7147 eval_str = "plugin_object = #{plugin_name}.new( signature, option )" 7148 if $verbose then 7149 print "new through: #{eval_str}\n" 7150 end 7151 7152 begin 7153 eval( eval_str ) # plugin を生成 7154 plugin_object.set_locale @locale 7155 rescue Exception => evar 7156 cdl_error( "S1150 $1: fail to new" , plugin_name ) 7157 print "eval( #{eval_str} )\n" 7158 7159 print_exception( evar ) 7160 end 7161 generate_and_parse plugin_object 7773 else 7774 cdl_error( "S9999 generate: '$1' not found", object_nsp ) 7775 end 7162 7776 end 7163 7777 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/ctypes.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 118 118 end 119 119 return self 120 els e120 elsif self.instance_of?( CFloatType ) then 121 121 # mikan long double 122 122 # TECS には long double を表現する手段がない (double80_t を定義すればよいか?) 123 123 # cdl_warning( "C1003 $1 & $2 incompatible (\'long double\' is not supported.). Treated as $3." , self.class, another.class, self.class ) 124 cdl_warning( "W9999 $1 & $2 incompatible (\'long double\' is not supported.). Treated as $3." , self.get_type_str, another.get_type_str, self.get_type_str ) 125 return self 124 # cdl_warning( "W9999 $1 & $2 incompatible (\'long double\' is not supported.). Treated as $3." , self.get_type_str, another.get_type_str, self.get_type_str ) 125 self.to_long 126 return self 127 else 128 raise "merge: unknown type" 126 129 end 127 130 end … … 183 186 end 184 187 188 def to_long 189 if @bit_size != -64 then 190 cdl_warning( "W9999 long specified for $1" , get_type_str ) 191 else 192 @bit_size = -128 # @bit_size = -128 : long double 193 end 194 end 185 195 end 186 196 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/expression.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 151 151 when :IDENTIFIER 152 152 nsp = elements[1] 153 # if nsp.is_name_only? && name_list && name_list.get_item( nsp.get_name ) then 153 154 if nsp.is_name_only? && name_list && name_list.get_item( nsp.get_name ) then 154 155 return "#{pre}#{nsp.get_name}#{post}" … … 229 230 end 230 231 232 #=== Expression# 逆ポーランド文字列化 233 #param_list:: ParamlList 関数の引数リスト 234 def get_rpn( param_list = nil, name_list2 = nil ) 235 return elements_rpn( @elements, param_list, name_list2 ) 236 end 237 238 #=== Expression# 逆ポーランド文字列化 (private) 239 #name_list:: ParamlList 関数の引数リスト 240 def elements_rpn( elements, name_list = nil, name_list2 = nil ) 241 if elements.instance_of? Token then 242 print "rpn: #{elements.to_s}\n" 243 return elements.to_s # OP_DOT, OP_REF の右辺 244 end 245 246 case elements[0] 247 when :IDENTIFIER 248 nsp = elements[1] 249 #if nsp.is_name_only? && name_list && name_list.find( nsp.get_name ) then 250 if nsp.is_name_only? then 251 count = 0 252 # p "search: #{nsp.get_name}" 253 name_list.get_items.each{ |nm,val| 254 # p " : #{nm.get_name} #{nsp.get_name.class} #{nm.get_name.class}" 255 if nsp.get_name == nm.get_name then 256 return " $#{count}" 257 end 258 count += 1 259 } 260 raise "not found parameter" 261 else 262 # return elements[1].get_global_name 263 raise "not unexpected parameter" 264 end 265 when :INTEGER_CONSTANT, :FLOATING_CONSTANT, :OCTAL_CONSTANT, :HEX_CONSTANT, :CHARACTER_LITERAL, :STRING_LITERAL_LIST, :BOOL_CONSTANT 266 return elements[1].to_s 267 when :PARENTHESES 268 return elements_rpn( elements[1], name_list, name_list2 ) 269 when :OP_SUBSC 270 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[1], "", name_list, name_list2 ) + " []" 271 when :OP_DOT 272 return elements_rpn( elements[1], name_list, name_list2 ) + " ." 273 when :OP_REF 274 return elements_rpn( elements[1], name_list, name_list2 ) + " ->" 275 when :OP_SIZEOF_EXPR 276 return elements_rpn( elements[1], name_list, name_list2 ) + " #s" 277 when :OP_SIZEOF_TYPE 278 return elements_rpn( elements[1], name_list, name_list2 ) + " #S" 279 when :OP_U_AMP 280 return elements_rpn( elements[1], name_list, name_list2 ) + " #&" 281 when :OP_U_ASTER 282 return elements_rpn( elements[1], name_list, name_list2 ) + " #*" 283 when :OP_U_PLUS 284 return elements_rpn( elements[1], name_list, name_list2 ) + " #+" 285 when :OP_U_MINUS 286 return elements_rpn( elements[1], name_list, name_list2 ) + " #-" 287 when :OP_U_TILDE 288 return elements_rpn( elements[1], name_list, name_list2 ) + " #~" 289 when :OP_U_EXCLAM 290 return elements_rpn( elements[1], name_list, name_list2 ) + " #!" 291 when :CAST 292 return elements_rpn( elements[1], name_list, name_list2 ) + " #(" + elements_rpn( elements[2], "", name_list, name_list2 ) + ")" 293 when :OP_MULT 294 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " *" 295 when :OP_DIV 296 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " /" 297 when :OP_REMAIN 298 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " %" 299 when :OP_ADD 300 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " +" 301 when :OP_SUB 302 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " -" 303 when :OP_LSFT 304 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " <<" 305 when :OP_RSFT 306 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " >>" 307 when :OP_LT 308 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " <" 309 when :OP_GT 310 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " >" 311 when :OP_LE 312 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " <=" 313 when :OP_GE 314 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " >=" 315 when :OP_EQ 316 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " ==" 317 when :OP_NE 318 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " !=" 319 when :OP_AND 320 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " &" 321 when :OP_EOR 322 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " ^" 323 when :OP_OR 324 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " |" 325 when :OP_LAND 326 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " &&" 327 when :OP_LOR 328 return elements_rpn( elements[1], name_list, name_list2 ) + " " + elements_rpn( elements[2], "", name_list, name_list2 ) + " ||" 329 when :OP_CEX 330 return elements_rpn( elements[1], name_list, name_list2 ) + " " + 331 elements_rpn( elements[2], name_list, name_list2 ) + " " + 332 elements_rpn( elements[3], name_list, name_list2 ) + " ?:" 333 else 334 raise "Unknown expression element: #{elemets[0]}. try -t and please report" 335 end 336 return "" 337 end 338 231 339 # 定数式(elements)を評価する 232 340 # … … 382 490 return nil 383 491 when :OP_SIZEOF_EXPR 384 cdl_error( "E1007 cannot evaluate \'sizeof\' operator" ) 492 if Generator.parsing_C? then 493 cdl_info( "I9999 cannot evaluate \'sizeof\' operator. this might causes later error." ) 494 else 495 cdl_error( "E1007 cannot evaluate \'sizeof\' operator" ) 496 end 385 497 return nil 386 498 when :OP_SIZEOF_TYPE 387 cdl_error( "E1008 cannot evaluate \'sizeof\' operator" ) 499 if Generator.parsing_C? then 500 cdl_info( "I9999 cannot evaluate \'sizeof\' operator. this might causes later error." ) 501 else 502 cdl_error( "E1008 cannot evaluate \'sizeof\' operator" ) 503 end 388 504 return nil 389 505 when :OP_U_AMP -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/generate.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 6by TOPPERS Project6 # Copyright (C) 2008-2019 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 122 122 123 123 class Namespace 124 @@domain_gen_factory_list = nil 124 125 def generate 125 126 … … 135 136 return 136 137 end 138 if instance_of? Region then 139 @@domain_gen_factory_list = {} # create hash 140 end 137 141 end 138 142 … … 141 145 gen_global_header 142 146 147 if ( instance_of? Region ) && get_domain_type != nil then 148 # p "******************* domain_type: #{get_domain_type.get_name} ****************" 149 domain_type = get_domain_type 150 if @@domain_gen_factory_list[ domain_type ] == nil then 151 @@domain_gen_factory_list[ domain_type ] = self 152 domain_type.gen_factory 153 end 154 end 155 143 156 # signature のコードを生成 144 157 @signature_list.each { |s| … … 262 275 263 276 f.print( "/* Descriptor for dynamic join */\n" ) 264 f.print( "#define Descriptor( signature_global_name ) DynDesc__ ## signature_global_name\n\n" ) 277 f.print( "#define Descriptor( signature_global_name ) DynDesc__ ## signature_global_name\n" ) 278 f.print( "#define is_descriptor_unjoined( desc ) ((desc).vdes==NULL)\n\n" ) 265 279 endif_macro_only f 266 280 end … … 454 468 } 455 469 end 456 f.print " rm -f $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(TARGET) #{timestamp}\n"470 f.print " rm -f $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(TARGET) #{timestamp}\n" 457 471 if $generating_region == @@root_namespace then 458 472 f.print " rm -rf $(GEN_DIR)\n" … … 464 478 f.print "tecs : $(PRE_TECSGEN_TARGET) $(TIMESTAMP) $(POST_TECSGEN_TARGET)\n\n" 465 479 f.print "$(TIMESTAMP) : $(TECS_IMPORTS)\n" 466 f.print " $(TECSGEN) #{TECSGEN.subst_tecspath( $arguments, true )}\n "480 f.print " $(TECSGEN) #{TECSGEN.subst_tecspath( $arguments, true )}\n\n" 467 481 # f.print " touch $(TIMESTAMP)\n\n" 468 469 482 else 470 483 f.print "tecs:\n" … … 472 485 end 473 486 487 # tecsflow:, tcflow ターゲット 488 if $generating_region.get_n_cells != 0 || $generating_region == @@root_namespace then 489 f.print "##### TECSFlow targets #####\n" 490 end 491 492 if Region.get_link_roots.length > 1 && $generating_region == @@root_namespace then 493 tecsflow_target = "tecsflow_sub" 494 if $generating_region.get_n_cells > 0 then 495 f.print "tecsflow: tecs tecsflow_sub\n" 496 else 497 f.print "tecsflow:\n" 498 end 499 Region.get_link_roots.each {|region| 500 if region.get_n_cells > 0 then 501 f.print "\tcd #{region.get_global_name}; make tecsflow\n" 502 end 503 } 504 f.print "\n" 505 else 506 tecsflow_target = "tecsflow" 507 end 508 509 if $generating_region.get_n_cells != 0 then 510 f.print "#{tecsflow_target} : $(GEN_DIR)/tecsgen.rbdmp tcflow\n" 511 f.print "\ttecsflow -g $(GEN_DIR)\n\n" 512 f.print "tecsflow_u : $(GEN_DIR)/tecsgen.rbdmp tcflow\n" 513 f.print "\ttecsflow -g $(GEN_DIR) -U\n\n" 514 f.print "$(GEN_DIR)/tecsgen.rbdmp : tecs\n\n" 515 f.print "tcflow : tecs\n" 516 f.print "\tmake tcflow_exec\n\n" 517 f.print "tcflow_exec : $(GEN_DIR)/tcflow.rbdmp\n" 518 f.print "$(GEN_DIR)/tcflow.rbdmp : $(CELLTYPE_SRCS) $(PLUGIN_CELLTYPE_SRCS)\n" 519 f.print "\ttcflow -g $(GEN_DIR) -c '$(CC) -E -DTECSFLOW -DTECSGEN $(CFLAGS) -I ./' $^\n" 520 end 521 522 if $generating_region.get_n_cells != 0 || $generating_region == @@root_namespace then 523 f.print "##### end TECSFlow targets #####\n\n" 524 end 525 526 # generic %.o : %.c 474 527 f.print "# generic target for objs\n" 475 528 f.print "$(_TECS_OBJ_DIR)%.o : %.#{$c_suffix}\n" … … 491 544 ### Makefile.tecsgen の生成 492 545 f = AppFile.open( "#{$gen}/Makefile.tecsgen" ) 546 547 f.print <<EOT 548 # generated automatically by tecsgen. 549 # This file is not intended to modify. 550 # 551 # Makefile variables below are defined. 552 # TECS_IMPORT_CDLS .cdl files improted by import statement 553 # SIGNATURE_HEADERS .h files of signature 554 # CELLTYPE_TECSGEN_HEADERS .h files of celltype 555 # CELLTYPE_FACTORY_HEADERS .h files of celltype's factory 556 # TECS_HEADERS summary of .h files above 557 # TECS_INLINE_HEADERS .h files of celltype inline header 558 # PLUGIN_INLINE_HEADERS .h files of plugin generated inline header 559 # 560 # TECS_COBJS .o files of TECS 561 # = $(TECSGEN_COBJS)+$(PLUGIN_COBJS)+$(CELLTYPE_COBJS) 562 # = $(TECS_KERNEL_COBJS)+$(TECS_KERNEL_COBJS)+$(TECS_OUTOFDOMAIN_COBJS) 563 # = $(TECSGEN_domain_COBJS)+$(PLUGIN_domain_COBJS)+$(CELLTYPE_domain_COBJS) for each domain 564 # 565 # TECSGEN_COBJS .o files of celltype_tecsgen.c 566 # CELLTYPE_COBJS .o files of celltype.c (celltype code) 567 # PLUGIN_COBJS .o files of plugin generated .c files 568 # 569 # TECSGEN_SRCS .c files of celltype_tecsgen.c 570 # CELLTYPE_SRCS .c files of celltype.c (celltype code) 571 # PLUGIN_SRCS .c files of plugin generated 572 # PLUGIN_CELLTYPE_SRCS .c files of plugin generated celltype.c (celltype code) 573 # PLUGIN_TECSGEN_SRCS .c files of plugin generated celltype_tecsgen.c 574 # 575 # Variables for domain 576 # TECS_DOMAINS domain names 577 # TECS_KERNEL_COBJS .o files of kernel domain (tecsgen, celltype, plugin) 578 # TECS_USER_COBJS .o files of user domain (tecsgen, celltype, plugin) 579 # TECS_OUTOFDOMAIN_COBJS .o files of OutOfDomain (tecsgen, celltype, plugin) 580 # TECSGEN_domain_COBJS .o files of celltype_tecsgen.c files for each domain 581 # PLUGIN_domain_COBJS .o files of plugin generated .c files for each domain 582 # CELLTYPE_domain_COBJS .o files of celltype.c files for each domain 583 # TECSGEN_domain_SRCS .c files of celltype_domain_tecsgen.c 584 # PLUGIN_domain_SRCS .c files of plugin generated .c files for each domain 585 # CELLTYPE_domain_SRCS .c files of celltype.c files for each domain 586 587 EOT 493 588 494 589 f.print( "TECS_IMPORT_CDLS =" ) … … 545 640 DomainType.get_domain_regions.each{ |dt, regions| 546 641 # domain_type は一つのノードには、一つしかないので、このループは、必ず一回しか回らない 642 ### mikan 複数のノードがあり、異なる domain_type が指定される可能性はある 547 643 domain_regions = regions 548 644 domain_type = dt … … 587 683 f.print( "\n\n" ) 588 684 589 f.print( "# TECS_COBJS: objects from sources which are automatically generated by tecsgen\n" ) 685 f.print( "# TECS_KERNEL_COBJS: objects belong to kernel domain\n" ) 686 f.print( "TECS_KERNEL_COBJS = \\\n" ) 687 domain_regions.each{ |r| 688 if r.get_domain_type.get_kind == :kernel then 689 f.print( " $(TECSGEN#{decideDomainNameProc.call r}_COBJS) \\\n" ) 690 f.print( " $(PLUGIN#{decideDomainNameProc.call r}_COBJS) \\\n" ) 691 f.print( " $(CELLTYPE#{decideDomainNameProc.call r}_COBJS) \\\n" ) 692 end 693 } 694 f.print( "# TECS_KERNEL_COBJS terminator\n\n" ) 695 696 f.print( "# TECS_USER_COBJS: objects belong to user domain\n" ) 697 f.print( "TECS_USER_COBJS = \\\n" ) 698 domain_regions.each{ |r| 699 if r.get_domain_type.get_kind == :user then 700 f.print( " $(TECSGEN#{decideDomainNameProc.call r}_COBJS) \\\n" ) 701 f.print( " $(PLUGIN#{decideDomainNameProc.call r}_COBJS) \\\n" ) 702 f.print( " $(CELLTYPE#{decideDomainNameProc.call r}_COBJS) \\\n" ) 703 end 704 } 705 f.print( "# TECS_USER_COBJS terminator\n\n" ) 706 707 f.print( "# TECS_OUTOFDOMAIN_COBJS: objects belong to OutOfDomain\n" ) 708 f.print( "TECS_OUTOFDOMAIN_COBJS = \\\n" ) 709 domain_regions.each{ |r| 710 if r.get_domain_type.get_kind == :OutOfDomain then 711 f.print( " $(TECSGEN#{decideDomainNameProc.call r}_COBJS) \\\n" ) 712 f.print( " $(PLUGIN#{decideDomainNameProc.call r}_COBJS) \\\n" ) 713 f.print( " $(CELLTYPE#{decideDomainNameProc.call r}_COBJS) \\\n" ) 714 end 715 } 716 f.print( "# TECS_OUTOFDOMAIN_COBJS terminator\n\n" ) 717 718 f.print( "# TECSGEN_COBJS: objects from sources which are automatically generated by tecsgen\n" ) 590 719 f.print( "TECSGEN_COBJS = \\\n" ) 591 720 domain_regions.each{ |r| … … 621 750 622 751 ### 623 f.print( "# TECS _COBJS: objects from sources which are automatically generated by tecsgen\n" )752 f.print( "# TECSGEN_COBJS: objects from sources which are automatically generated by tecsgen\n" ) 624 753 domain_regions.each{ |r| 625 754 nsp = decideDomainNameProc.call( r ) … … 655 784 656 785 f.print( "# PLUGIN_SRCS: sources automatically generated by plugin\n" ) 786 f.print( "PLUGIN_CELLTYPE_SRCS = \\\n" ) 657 787 domain_regions.each{ |r| 658 788 nsp = decideDomainNameProc.call( r ) 659 f.print( "PLUGIN#{nsp}_SRCS = \\\n" ) 660 gen_celltype_names_domain( f, " $(GEN_DIR)/", "_tecsgen.#{$c_suffix} \\\n", domain_type, r, true ) 661 gen_celltype_names_domain2( f, " $(GEN_DIR)/", ".#{$c_suffix} \\\n", domain_type, r, true, false ) 662 f.print( "# PLUGIN#{nsp}_SRCS terminator\n\n" ) 663 } 664 789 f.print( " $(PLUGIN#{nsp}_CELLTYPE_SRCS)\\\n" ) 790 } 791 f.print( "# PLUGIN_CELLTYPE_SRCS terminator\n\n" ) 792 f.print( "PLUGIN_TECSGEN_SRCS = \\\n" ) 793 domain_regions.each{ |r| 794 nsp = decideDomainNameProc.call( r ) 795 f.print( " $(PLUGIN#{nsp}_TECSGEN_SRCS)\\\n" ) 796 } 797 f.print( "# PLUGIN_TECSGEN_SRCS terminator\n\n" ) 798 domain_regions.each{ |r| 799 nsp = decideDomainNameProc.call( r ) 800 f.print( "PLUGIN#{nsp}_SRCS = $(PLUGIN#{nsp}_CELLTYPE_SRCS) $(PLUGIN#{nsp}_TECSGEN_SRCS)\n\n" ) 801 f.print( "PLUGIN#{nsp}_CELLTYPE_SRCS = \\\n" ) 802 gen_celltype_names_domain2( f, "", ".#{$c_suffix} \\\n", domain_type, r, true, false ) 803 f.print( "# PLUGIN#{nsp}_CELLTYPE_SRCS terminator\n\n" ) 804 nsp = decideDomainNameProc.call( r ) 805 f.print( "PLUGIN#{nsp}_TECSGEN_SRCS = \\\n" ) 806 gen_celltype_names_domain( f, "", "_tecsgen.#{$c_suffix} \\\n", domain_type, r, true ) 807 f.print( "# PLUGIN#{nsp}_TECSGEN_SRCS terminator\n\n" ) 808 } 809 810 f.print( "# CELLTYPE_SRCS: sources of celltype code written by user\n" ) 811 f.print( "CELLTYPE_SRCS = \\\n" ) 812 gen_celltype_names( f, " ", ".#{$c_suffix} \\\n", false, false ) 813 f.print( "# CELLTYPE_SRCS terminator\n\n" ) 665 814 f.close 666 815 … … 762 911 end 763 912 913 #=== Namespace#すべてのシグニチャをたどる 914 def travers_all_signature # ブロック引数 { |signature| } 915 proc = Proc.new # このメソッドのブロック引数 916 @signature_list.each{ |sig| 917 proc.call sig 918 } 919 @namespace_list.each{ |ns| 920 ns.travers_all_signature_proc proc 921 } 922 end 923 def travers_all_signature_proc proc 924 @signature_list.each{ |sig| 925 proc.call sig 926 } 927 @namespace_list.each{ |ns| 928 ns.travers_all_signature_proc proc 929 } 930 end 931 932 #=== Namespace#すべてのセルタイプをたどる 933 def travers_all_celltype # ブロック引数 { |celltype| } 934 proc = Proc.new # このメソッドのブロック引数 935 @celltype_list.each{ |ct| 936 proc.call ct 937 } 938 @namespace_list.each{ |ns| 939 ns.travers_all_celltype_proc proc 940 } 941 end 942 def travers_all_celltype_proc proc 943 @celltype_list.each{ |ct| 944 proc.call ct 945 } 946 @namespace_list.each{ |ns| 947 ns.travers_all_celltype_proc proc 948 } 949 end 764 950 end 765 951 … … 854 1040 f.printf TECSMsg.get(:SDI_comment), "#_SDI_#" 855 1041 dl.each{ |dt,param| 856 f.print "#include \"#{dt.get_signature.get_global_name}_tecsgen.#{$h_suffix}\"\n" 1042 f.print <<EOT 1043 /* pre-typedef incomplete-type to avoid error in case of mutual or cyclic reference */ 1044 #ifndef Descriptor_of_#{dt.get_global_name}_Defined 1045 #define Descriptor_of_#{dt.get_global_name}_Defined 1046 typedef struct { struct tag_#{dt.get_global_name}_VDES *vdes; } Descriptor( #{dt.get_global_name} ); 1047 #endif 1048 EOT 1049 # f.print "#include \"#{dt.get_global_name}_tecsgen.#{$h_suffix}\"\n" 857 1050 } 858 1051 f.print "\n" … … 904 1097 end 905 1098 906 f.print "};\n" 907 f.printf "\n" 1099 f.print "};\n\n" 908 1100 f.printf TECSMsg.get(:SDES_comment), "#_SDES_#" 909 f.print( "typedef struct { struct tag_#{@global_name}_VDES *vdes; } Descriptor( #{@global_name} );\n" ) 1101 f.print <<EOT 1102 #ifndef Descriptor_of_#{@global_name}_Defined 1103 #define Descriptor_of_#{@global_name}_Defined 1104 typedef struct { struct tag_#{@global_name}_VDES *vdes; } Descriptor( #{@global_name} ); 1105 #endif 1106 EOT 910 1107 end 911 1108 … … 993 1190 gen_ph_get_cellcb f 994 1191 gen_ph_attr_access f if @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0 995 gen_ph_cp_fun_macro f if @n_call_port > 0 1192 f.print "#ifndef TECSFLOW\n" 1193 gen_ph_cp_fun_macro f, false if @n_call_port > 0 1194 f.print "#else /* TECSFLOW */\n" 1195 gen_ph_cp_fun_macro f, true if @n_call_port > 0 1196 f.print "#endif /* TECSFLOW */\n" 996 1197 # gen_ph_abstract_ep_des_type f 997 1198 … … 1008 1209 # gen_ph_ep_fun_prototype f 1009 1210 gen_ph_ep_skel_prototype f 1211 1212 #--- CB_TYPE_ONLY の場合、ref_desc, set_desc 関数は含めない (マクロ参照するため) 1213 if @n_entry_port_inline == 0 then 1214 ifndef_cb_type_only f 1215 end 1216 gen_ph_ref_desc_func f 1217 gen_ph_set_desc_func f 1218 if @n_entry_port_inline == 0 then 1219 endif_cb_type_only f 1220 end 1010 1221 end_extern_C f 1011 1222 endif_macro_only f … … 1019 1230 gen_ph_attr_access_abbrev f if @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0 1020 1231 gen_ph_cp_fun_macro_abbrev f if @n_call_port > 0 1232 gen_ph_ref_desc_macro_abbrev f 1233 gen_ph_set_desc_macro_abbrev f 1021 1234 gen_ph_test_optional_call_port_abbrev f 1022 1235 gen_ph_ep_fun_macro f if @n_entry_port > 0 … … 1084 1297 end 1085 1298 } 1299 if p.is_dynamic? then 1300 f.print( "#undef #{p.get_name}_set_descriptor\n" ) 1301 if p.is_optional? then 1302 f.print( "#undef #{p.get_name}_unjoin\n" ) 1303 end 1304 elsif p.is_ref_desc? then 1305 f.print( "#undef #{p.get_name}_refer_to_descriptor\n" ) 1306 f.print( "#undef #{p.get_name}_ref_desc\n" ) 1307 end 1086 1308 } 1087 1309 @port.each { |p| … … 1196 1418 def gen_ph_info f 1197 1419 1420 yn_multi_domain = "no" 1421 yn_multi_domain = "yes" if multi_domain? 1198 1422 yn_idx_is_id = "no" 1199 1423 yn_idx_is_id = "yes" if @idx_is_id … … 1204 1428 yn_rom = "no" 1205 1429 yn_rom = "yes" if $rom 1430 yn_has_CB = "no" 1431 yn_has_CB = "yes" if has_CB? 1432 yn_has_INIB = "no" 1433 yn_has_INIB = "yes" if has_INIB? 1206 1434 yn_cb_init = "no" 1207 1435 yn_cb_init = "yes" if need_CB_initializer? … … 1212 1440 * celltype : #{@name} 1213 1441 * global name : #{@global_name} 1442 * multi-domain : #{yn_multi_domain} 1214 1443 * idx_is_id(actual) : #{yn_idx_is_id}(#{yn_idx_is_id_act}) 1215 1444 * singleton : #{yn_singleton} 1216 * has_CB : #{ has_CB?}1217 * has_INIB : #{ has_INIB?}1445 * has_CB : #{yn_has_CB} 1446 * has_INIB : #{yn_has_INIB} 1218 1447 * rom : #{yn_rom} 1219 1448 * CB initializer : #{yn_cb_init} … … 1438 1667 end 1439 1668 1440 if p.get_array_size == nil then 1441 f.print( "#define #{@global_name}_is_#{p.get_name}_joined(p_that) \\\n" ) 1442 else 1443 f.print( "#define #{@global_name}_is_#{p.get_name}_joined(p_that,subscript) \\\n" ) 1444 end 1669 if @singleton then 1670 param = "" 1671 delim = "" 1672 else 1673 param = "p_that" 1674 delim = "," 1675 end 1676 if p.get_array_size != nil then 1677 param = param + delim + "subscript" 1678 end 1679 f.print( "#define #{@global_name}_is_#{p.get_name}_joined(#{param}) \\\n" ) 1445 1680 1446 1681 if p.is_omit? then … … 1452 1687 # mikan 全部つながっているかどうかで (1) を判定する 1453 1688 if ! p.is_VMT_useless? then 1689 if p.is_dynamic? then 1690 if @singleton then 1691 inib_tmp = "CB" 1692 else 1693 inib_tmp = "" 1694 end 1695 else 1696 inib_tmp = inib 1697 end 1698 1454 1699 # 標準コード 1455 1700 if p.get_array_size == nil then 1456 1701 if @singleton then 1457 f.print( "\t (#{@global_name}_SINGLE_CELL_#{inib }.#{p.get_name}!=0)\n" )1702 f.print( "\t (#{@global_name}_SINGLE_CELL_#{inib_tmp}.#{p.get_name}!=0)\n" ) 1458 1703 else 1459 f.print( "\t ((p_that)#{inib }->#{p.get_name}!=0)\n" )1704 f.print( "\t ((p_that)#{inib_tmp}->#{p.get_name}!=0)\n" ) 1460 1705 end 1461 1706 else 1462 1707 # 配列の場合 1463 1708 if @singleton then 1464 f.print( "\t ((#{@global_name}_SINGLE_CELL_#{inib }.#{p.get_name}!=0) \\\n" )1465 f.print( "\t &&(#{@global_name}_SINGLE_CELL_#{inib }.#{p.get_name}[subscript]!=0))\n" )1709 f.print( "\t ((#{@global_name}_SINGLE_CELL_#{inib_tmp}.#{p.get_name}!=0) \\\n" ) 1710 f.print( "\t &&(#{@global_name}_SINGLE_CELL_#{inib_tmp}.#{p.get_name}[subscript]!=0))\n" ) 1466 1711 else 1467 f.print( "\t (((p_that)#{inib }->#{p.get_name}!=0)\\\n" )1468 f.print( "\t &&((p_that)#{inib }->#{p.get_name}[subscript]!=0))\n" )1712 f.print( "\t (((p_that)#{inib_tmp}->#{p.get_name}!=0)\\\n" ) 1713 f.print( "\t &&((p_that)#{inib_tmp}->#{p.get_name}[subscript]!=0))\n" ) 1469 1714 end 1470 1715 end … … 1503 1748 end 1504 1749 1750 if @singleton then 1751 param = "" 1752 delim = "" 1753 else 1754 param = "p_cellcb" 1755 delim = "," 1756 end 1757 1505 1758 if p.get_array_size == nil then 1506 f.print( "#define is_#{p.get_name}_joined()\\\n\t\t#{@global_name}_is_#{p.get_name}_joined(p_cellcb)\n" ) 1507 else 1508 f.print( "#define is_#{p.get_name}_joined(subscript)\\\n" ) 1509 f.print( "\t\t#{@global_name}_is_#{p.get_name}_joined(p_cellcb,subscript)\n" ) 1510 end 1759 subscript = "" 1760 else 1761 subscript = "subscript" 1762 param = param + delim + subscript 1763 end 1764 f.print( "#define is_#{p.get_name}_joined(#{subscript})\\\n\t\t#{@global_name}_is_#{p.get_name}_joined(#{param})\n" ) 1511 1765 } 1512 1766 end … … 1519 1773 f.print( "#define #{@global_name}_GET_CELLCB(idx) ((void *)0)\n" ) 1520 1774 elsif @idx_is_id_act then # mikan 単一のセルの場合の最適化, idx_is_id でない場合 1521 f.print( "#define #{@global_name}_GET_CELLCB(idx) (#{@global_name}_CB_ tab[(idx) - #{@global_name}_ID_BASE])\n" )1775 f.print( "#define #{@global_name}_GET_CELLCB(idx) (#{@global_name}_CB_ptab[(idx) - #{@global_name}_ID_BASE])\n" ) 1522 1776 else 1523 1777 f.print( "#define #{@global_name}_GET_CELLCB(idx) (idx)\n" ) … … 1723 1977 end 1724 1978 1725 def gen_ph_cp_fun_macro f 1726 if @n_call_port >0 then1979 def gen_ph_cp_fun_macro f, b_flow 1980 if @n_call_port >0 && b_flow == false then 1727 1981 f.printf( TECSMsg.get( :CPM_comment ) , "#_CPM_#" ) 1728 end1729 1730 if @singleton then1731 if has_INIB? then1732 inib = "INIB"1733 else1734 inib = "CB"1735 end1736 else1737 if has_CB? && has_INIB? then1738 inib = "->_inib"1739 else1740 inib = ""1741 end1742 1982 end 1743 1983 … … 1747 1987 1748 1988 p.get_signature.get_function_head_array.each{ |fun| 1989 if @singleton then 1990 if has_INIB? then 1991 inib = "INIB" 1992 else 1993 inib = "CB" 1994 end 1995 if p.is_dynamic? && p.get_array_size == nil then 1996 # dynamic call port (not array) 1997 inib = "CB" 1998 end 1999 else 2000 if has_CB? && has_INIB? then 2001 inib = "->_inib" 2002 else 2003 inib = "" 2004 end 2005 if p.is_dynamic? && p.get_array_size == nil then 2006 # dynamic call port (not array) 2007 inib = "" 2008 end 2009 end 2010 1749 2011 f.print( "#define #{@global_name}_#{p.get_name}_#{fun.get_name}(" ) 1750 2012 ft = fun.get_declarator.get_type … … 1772 2034 1773 2035 # 関数名の出力(標準:受け口ディスクリプタから VMT の関数名、最適化:受け口関数 or 受け口ディスクリプタ) 1774 if ! p.is_VMT_useless? then 2036 if b_flow then 2037 f.print( "\t (p_that)->#{p.get_name}#{subsc}.#{fun.get_name}__T( \\\n" ) 2038 elsif ! p.is_VMT_useless? then 1775 2039 # 標準コード 1776 2040 if @singleton then … … 1807 2071 1808 2072 # 受け口情報の出力(標準:受け口ディスクリプタ、最適化:IDX など) 1809 if ! p.is_skelton_useless? && ! p.is_cell_unique? then 2073 if b_flow then 2074 elsif ! p.is_skelton_useless? && ! p.is_cell_unique? then 1810 2075 # 標準コード 1811 2076 if @singleton then … … 1857 2122 end 1858 2123 2124 #=== ref_desc 指定された呼び口に対するディスクリプタ参照関数の生成 2125 def gen_ph_ref_desc_func f 2126 if @n_call_port_ref_desc >0 then 2127 f.printf( TECSMsg.get( :CRD_comment ), "#_CRD_#" ) 2128 end 2129 2130 if has_CB? && has_INIB? then 2131 inib = "->_inib" 2132 else 2133 inib = "" 2134 end 2135 @port.each { |p| 2136 next if p.get_port_type != :CALL 2137 next if ! p.is_ref_desc? 2138 2139 if @singleton then 2140 p_that = "" 2141 p_cellcb = "" 2142 delim = "" 2143 if has_INIB? then 2144 cb = "#{@global_name}_SINGLE_CELL_INIB." 2145 else 2146 cb = "#{@global_name}_SINGLE_CELL_CB." 2147 end 2148 else 2149 p_that = "#{@global_name}_CB *p_that" 2150 p_cellcb = " #{@global_name}_CB *p_cellcb = p_that;\n" 2151 delim = ", " 2152 cb = "p_cellcb#{inib}->" 2153 end 2154 2155 if p.get_array_size 2156 array = "#{delim}int_t i " 2157 array2 = "[ i ]" 2158 assert = " assert( 0 <= i && i < NCP_#{p.get_name} );\n" 2159 else 2160 array = "" 2161 array2 = "" 2162 assert = "" 2163 end 2164 f.print <<EOT 2165 /* [ref_desc] #{p.get_name} */ 2166 Inline Descriptor( #{p.get_signature.get_global_name} ) 2167 #{@global_name}_#{p.get_name}_refer_to_descriptor( #{p_that}#{array} ) 2168 { 2169 Descriptor( #{p.get_signature.get_global_name} ) des; 2170 #{p_cellcb} /* cast is ncecessary for removing 'const' */ 2171 #{assert} des.vdes = (struct tag_#{p.get_signature.get_global_name}_VDES *)#{cb}#{p.get_name}#{array2}; 2172 return des; 2173 } 2174 2175 EOT 2176 } 2177 end 2178 2179 #=== dynamic 指定された呼び口に対するディスクリプタ設定関数の生成 2180 def gen_ph_set_desc_func f 2181 if @n_call_port_dynamic >0 then 2182 f.printf( TECSMsg.get( :SDF_comment ), "#_SDF_#" ) 2183 end 2184 2185 @port.each { |p| 2186 next if p.get_port_type != :CALL 2187 next if ! p.is_dynamic? 2188 if has_CB? && has_INIB? && p.get_array_size then 2189 inib = "->_inib" 2190 else 2191 inib = "" 2192 end 2193 if @singleton then 2194 # p "main== #{@global_name} #{p.get_name} #{p.get_array_size}" 2195 p_that = "" 2196 p_that2 = "" 2197 p_cellcb = "" 2198 if p.get_array_size && $rom then 2199 cb = "#{@global_name}_SINGLE_CELL_INIB." 2200 else 2201 cb = "#{@global_name}_SINGLE_CELL_CB." 2202 end 2203 else 2204 p_that = "#{@global_name}_CB *p_that, " 2205 p_that2 = "#{@global_name}_CB *p_that " 2206 p_cellcb = " #{@global_name}_CB *p_cellcb = p_that;\n" 2207 cb = "(p_cellcb)->#{inib}" 2208 end 2209 2210 if p.get_array_size then 2211 array = "int_t i, " 2212 array2 = "[ i ]" 2213 array3 = " int_t i " 2214 assert2 = " assert( 0 <= i && i < NCP_#{p.get_name} );\n" 2215 else 2216 array = "" 2217 array2 = "" 2218 array3 = "" 2219 assert2 = "" 2220 end 2221 f.print <<EOT 2222 /* [dynamic] #{p.get_name} */ 2223 Inline void 2224 #{@global_name}_#{p.get_name}_set_descriptor( #{p_that}#{array}Descriptor( #{p.get_signature.get_global_name} ) des ) 2225 { 2226 #{p_cellcb} assert( des.vdes != NULL ); 2227 #{assert2} #{cb}#{p.get_name}#{array2} = des.vdes; 2228 } 2229 2230 EOT 2231 2232 if p.is_optional? then 2233 if p_that2 != "" && array3 != "" then 2234 delim = ", " 2235 else 2236 delim = "" 2237 end 2238 f.print <<EOT 2239 /* [dynamic,optional] #{p.get_name} */ 2240 Inline void 2241 #{@global_name}_#{p.get_name}_unjoin( #{p_that2}#{delim}#{array3} ) 2242 { 2243 #{p_cellcb} #{cb}#{p.get_name}#{array2} = NULL; 2244 } 2245 2246 EOT 2247 end 2248 } 2249 end 2250 1859 2251 #=== send/receive で受け取ったメモリ領域を dealloc するマクロコード 1860 2252 #f:: File … … 1958 2350 1959 2351 if p.is_omit? then 1960 f.print( " 1961 else 1962 f.print( " 2352 f.print( " #{dummy_p_cell_access_pre}omitted #{p.get_name}_#{fun.get_name}(" ) 2353 else 2354 f.print( " #{dummy_p_cell_access_pre}#{@global_name}_#{p.get_name}_#{fun.get_name}(" ) 1963 2355 end 1964 2356 ft = fun.get_declarator.get_type … … 1981 2373 f.print( " )#{dummy_p_cell_access_post}\n" ) 1982 2374 } 2375 } 2376 f.print( "\n" ) 2377 end 2378 2379 def gen_ph_ref_desc_macro_abbrev f 2380 if @n_call_port_ref_desc >0 then 2381 f.printf( TECSMsg.get( :CRDA_comment ), "#_CRDA_#" ) 2382 end 2383 2384 @port.each { |p| 2385 next if p.get_port_type != :CALL 2386 next if ! p.is_ref_desc? 2387 2388 if @singleton then 2389 p_cellcb = "" 2390 delim = "" 2391 else 2392 p_cellcb = "p_cellcb" 2393 delim = ", " 2394 end 2395 2396 if p.get_array_size then 2397 array = " i " 2398 array2 = "#{delim}i" 2399 else 2400 array = "" 2401 array2 = "" 2402 end 2403 2404 f.printf( "#define %s_refer_to_descriptor(#{array})\\\n %s_refer_to_descriptor( #{p_cellcb}#{array2} )\n", 2405 "#{p.get_name}", 2406 "#{@global_name}_#{p.get_name}" ) 2407 f.printf( "#define %s_ref_desc(#{array})\\\n %s_refer_to_descriptor(#{array})\n", 2408 "#{p.get_name}", 2409 "#{p.get_name}" ) 2410 } 2411 f.print( "\n" ) 2412 end 2413 2414 def gen_ph_set_desc_macro_abbrev f 2415 if @n_call_port_dynamic >0 then 2416 f.printf( TECSMsg.get( :SDMA_comment ), "#_SDMA_#" ) 2417 end 2418 2419 if @singleton then 2420 p_cellcb = "" 2421 delim = "" 2422 else 2423 p_cellcb = "p_cellcb" 2424 delim = ", " 2425 end 2426 @port.each { |p| 2427 next if p.get_port_type != :CALL 2428 next if ! p.is_dynamic? 2429 2430 if p.get_array_size then 2431 subsc = "i, " 2432 subsc2 = "i" 2433 subsc3 = delim + subsc2 2434 else 2435 subsc = "" 2436 subsc2 = "" 2437 subsc3 = "" 2438 end 2439 f.printf( "#define %s_set_descriptor( #{subsc}desc )\\\n %s_set_descriptor( #{p_cellcb}#{delim}#{subsc}desc )\n", 2440 "#{p.get_name}", 2441 "#{@global_name}_#{p.get_name}" ) 2442 f.printf( "#define %s_unjoin( #{subsc2} )\\\n %s_unjoin( #{p_cellcb}#{subsc3} )\n", 2443 "#{p.get_name}", 2444 "#{@global_name}_#{p.get_name}" ) 1983 2445 } 1984 2446 f.print( "\n" ) … … 2149 2611 f.print( "typedef const struct tag_#{@global_name}_INIB {\n" ) 2150 2612 2151 gen_cell_cb_type_port f2613 gen_cell_cb_type_port( f, :INIB ) 2152 2614 gen_cell_cb_type_attribute( f, :INIB ) 2153 2615 … … 2162 2624 f.print " #{@global_name}_INIB *_inib;\n" 2163 2625 end 2626 gen_cell_cb_type_port( f, :CB_DYNAMIC ) 2164 2627 gen_cell_cb_type_attribute( f, :CB ) 2165 2628 gen_cell_cb_type_var f … … 2180 2643 f.print( "typedef struct tag_#{@global_name}_CB {\n" ) 2181 2644 2182 gen_cell_cb_type_port f2645 gen_cell_cb_type_port( f, :CB ) 2183 2646 gen_cell_cb_type_attribute( f, :CB ) 2184 2647 gen_cell_cb_type_var f … … 2248 2711 end 2249 2712 2250 def gen_cell_cb_type_port f2251 gen_cell_cb_type_call_port f2252 gen_cell_cb_type_entry_port f2253 end 2254 2255 def gen_cell_cb_type_call_port f2713 def gen_cell_cb_type_port( f, inib_cb ) 2714 gen_cell_cb_type_call_port( f, inib_cb ) 2715 gen_cell_cb_type_entry_port( f, inib_cb ) 2716 end 2717 2718 def gen_cell_cb_type_call_port( f, inib_cb ) 2256 2719 # 呼び口 2257 2720 if @n_call_port >0 then 2258 f.print " /* call port #_TCP_# */ 2721 f.print " /* call port #_TCP_# */\n" 2259 2722 end 2260 2723 … … 2262 2725 next if p.get_port_type != :CALL 2263 2726 next if p.is_omit? 2264 ptr = '' 2265 ptr = '*' if p.get_array_size 2727 next if inib_cb == :INIB && p.is_dynamic? && p.get_array_size == nil && ! $ram_initializer 2728 next if inib_cb == :CB_DYNAMIC && ( ! p.is_dynamic? || p.get_array_size != nil ) 2729 # bprint "cb_type #{inib_cb} #{p.get_name} dynamic=#{p.is_dynamic?}\n" 2730 2731 ptr = p.get_array_size ? '*' : '' 2266 2732 2267 2733 if ! p.is_cell_unique? then 2734 const = p.is_dynamic? ? '' : 'const' 2735 if inib_cb == :INIB && p.is_dynamic? && p.get_array_size == nil && $ram_initializer then 2736 init = '_init_' 2737 const2 = 'const' 2738 else 2739 init = '' 2740 const2 = 'const' 2741 end 2742 2268 2743 if ! p.is_skelton_useless? then 2269 2744 # 標準形 2270 f.print( " struct tag_#{p.get_signature.get_global_name}_VDES #{ptr}const*#{p.get_name;};\n" ) 2745 if inib_cb == :INIB && p.is_dynamic? && p.get_array_size != nil && $ram_initializer then 2746 f.print( " struct tag_#{p.get_signature.get_global_name}_VDES #{ptr}#{const2}*#{p.get_name;}_init_;\n" ) 2747 end 2748 f.print( " struct tag_#{p.get_signature.get_global_name}_VDES #{ptr}#{const}*#{p.get_name;}#{init};\n" ) 2749 # f.print( " struct tag_#{p.get_signature.get_global_name}_VDES #{ptr}*#{p.get_name;};\n" ) 2271 2750 if p.get_array_size == "[]" then 2272 2751 f.print( " int_t n_#{p.get_name};\n" ) … … 2295 2774 2296 2775 #=== Celltype#受け口配列添数を記憶する変数の定義 2297 def gen_cell_cb_type_entry_port f2776 def gen_cell_cb_type_entry_port( f, inib_cb ) 2298 2777 # 呼び口 2299 2778 if @n_entry_port >0 then … … 2318 2797 f.print "extern #{@global_name}_INIB #{@global_name}_SINGLE_CELL_INIB;\n" 2319 2798 end 2320 2321 # @ordered_cell_list.each{ |c|2322 # f.print "extern #{@global_name}_CB #{@global_name}_#{c.get_name}_CB;\n"2323 # }2324 2325 2799 f.print "\n" 2326 elsif @idx_is_id_act then 2327 f.print "extern #{@global_name}_CB *#{@global_name}_CB_tab[];\n" 2800 elsif @b_need_ptab then 2801 f.printf( TECSMsg.get( :SCP_comment ), "#_MCPP_#" ) 2802 if has_CB? then 2803 f.print "extern #{@global_name}_CB *const #{@global_name}_CB_ptab[];\n" 2804 @ordered_cell_list.each{ |c| 2805 if c.is_generate? then # 生成対象か? 2806 name_array = get_name_array c 2807 f.print "extern #{@global_name}_CB #{name_array[4]};\n" 2808 end 2809 } 2810 elsif has_INIB? 2811 f.print "extern #{@global_name}_INIB *const #{@global_name}_INIB_ptab[];\n" 2812 @ordered_cell_list.each{ |c| 2813 if c.is_generate? then # 生成対象か? 2814 name_array = get_name_array c 2815 f.print "extern #{@global_name}_INIB #{name_array[11]};\n" 2816 end 2817 } 2818 end 2328 2819 else 2329 f.print "extern #{@global_name}_CB #{@global_name}_CB_tab[];\n" 2820 f.printf( TECSMsg.get( :SCP_comment ), "#_MCPB_#" ) 2821 if has_CB? then 2822 f.print "extern #{@global_name}_CB #{@global_name}_CB_tab[];\n" 2823 elsif has_INIB? 2824 f.print "extern #{@global_name}_INIB #{@global_name}_INIB_tab[];\n" 2825 end 2330 2826 end 2331 2827 end 2332 2828 2333 2829 def gen_ph_INIB_as_CB f 2334 2830 # ここは、手抜きである。本来なら INIB を出力すべき 2335 2831 if ! has_CB? && has_INIB? then 2336 2832 f.printf( TECSMsg.get( :DCI_comment ), "#_DCI_#" ) 2337 f.print "#define #{@global_name}_CB_tab #{@global_name}_INIB_tab\n" 2338 f.print "#define #{@global_name}_SINGLE_CELL_CB #{@global_name}_SINGLE_CELL_INIB\n" 2833 if @singleton then 2834 f.print "#define #{@global_name}_SINGLE_CELL_CB #{@global_name}_SINGLE_CELL_INIB\n" 2835 elsif @b_need_ptab then 2836 f.print "#define #{@global_name}_CB_ptab #{@global_name}_INIB_ptab\n" 2837 else 2838 f.print "#define #{@global_name}_CB_tab #{@global_name}_INIB_tab\n" 2839 end 2339 2840 f.print "#define #{@global_name}_CB #{@global_name}_INIB\n" 2340 2841 f.print "#define tag_#{@global_name}_CB tag_#{@global_name}_INIB\n" … … 2360 2861 f.printf( TECSMsg.get( :FEC_comment ), "#_FEC_#" ) 2361 2862 2362 if @ idx_is_id_actthen2863 if @b_need_ptab then 2363 2864 amp = '' 2865 tab = 'ptab' 2364 2866 else 2365 2867 amp = '&' 2868 tab = 'tab' 2366 2869 end 2367 2870 f.print <<EOT 2368 2871 #define FOREACH_CELL(i,p_cb) \\ 2369 2872 for( (i) = 0; (i) < #{@global_name}_N_CELL; (i)++ ){ \\ 2370 #{necessity}(p_cb) = #{amp}#{@global_name}_CB_ tab[i];2873 #{necessity}(p_cb) = #{amp}#{@global_name}_CB_#{tab}[i]; 2371 2874 2372 2875 #define END_FOREACH_CELL } … … 2418 2921 2419 2922 if @n_cell_gen > 0 && need_CB_initializer? then 2923 b_var_init = false 2420 2924 f.print "#define INITIALIZE_CB#{arg}" 2421 2925 @var.each { |v| … … 2423 2927 next if init == nil 2424 2928 2929 b_var_init = true 2425 2930 type = v.get_type.get_original_type 2426 2931 f.print "\\\n" … … 2438 2943 # post = "" 2439 2944 end 2440 f.print "\tmemcpy((void*)#{pre}#{@global_name}_VAR_#{v.get_name}#{p_that}#{post}, (void*)#{pre}#{@global_name}_#{v.get_name}_VAR_INIT#{post}, sizeof(#{@global_name}_#{v.get_name}_VAR_INIT));" 2945 f.print "\tmemcpy((void*)#{pre}#{@global_name}_VAR_#{v.get_name}#{p_that}#{post}, " 2946 f.print "(void*)#{pre}#{@global_name}_#{v.get_name}_VAR_INIT#{post}, sizeof(#{@global_name}_#{v.get_name}_VAR_INIT));" 2441 2947 elsif init.instance_of? C_EXP then 2442 2948 f.print "\t#{that}#{v.get_name} = #{init.get_c_exp_string};" … … 2451 2957 end 2452 2958 } 2959 2960 # dynamic call port の初期化コード 2961 b_dyn_port = false 2962 @port.each{ |p| 2963 next if p.get_port_type != :CALL 2964 if p.is_dynamic? && $ram_initializer then 2965 if p.get_array_size == nil then 2966 f.print "\\\n\t#{that}#{p.get_name} = #{that}_inib->#{p.get_name}_init_;" 2967 else 2968 if @singleton || p.get_array_size != "[]" then 2969 p_that = "" 2970 else 2971 p_that = "(p_that)" 2972 end 2973 if @singleton then 2974 that = "#{@global_name}_SINGLE_CELL_INIB." 2975 else 2976 that = "(p_that)->" 2977 end 2978 if has_CB? then 2979 init = '_init->' 2980 else 2981 init = '' 2982 end 2983 f.printf( "\\\n%-80s\\\n", ' {' ) 2984 f.printf( "%-80s\\\n", ' int_t j;' ) 2985 f.printf( "%-80s\\\n", " for( j = 0; j < N_CP_#{p.get_name}#{p_that}; j++ ){" ) 2986 f.printf( "%-80s\\\n", " #{that}#{p.get_name}[j] = #{that}#{init}#{p.get_name}_init_[j];" ) 2987 f.printf( "%-80s\\\n", ' }' ) 2988 f.printf( "%-80s", ' }' ) 2989 end 2990 b_dyn_port = true 2991 end 2992 } 2993 if b_dyn_port then 2994 f.print( "\n" ) 2995 end 2996 2997 if b_var_init == false && b_dyn_port == false && ! @singleton then 2998 f.print "\t(void)(p_that);" 2999 end 2453 3000 f.print "\n" 2454 3001 … … 2457 3004 if @singleton then 2458 3005 f.print "\t#{that}_inib = &#{@global_name}_SINGLE_CELL_INIB;\n\n" 2459 elsif @ idx_is_id_act2460 f.print "\t#{that}_inib = #{@global_name}_INIB_ tab[(i)];\n\n"3006 elsif @b_need_ptab then 3007 f.print "\t#{that}_inib = #{@global_name}_INIB_ptab[(i)];\n\n" 2461 3008 else 2462 3009 f.print "\t#{that}_inib = &#{@global_name}_INIB_tab[(i)];\n\n" … … 2697 3244 j = am[i] 2698 3245 if j then 2699 if am[i].get_ cell.get_celltype == self then3246 if am[i].get_rhs_cell.get_celltype == self then 2700 3247 # 同じセルタイプへ結合している場合(VDES では type conflict になる) 2701 3248 p = am[i].get_rhs_port … … 2726 3273 end 2727 3274 else 2728 if j.get_cell.get_celltype == self then 3275 dbgPrint "me=#{@name} callee=#{j.get_rhs_cell.get_celltype.get_name} #{j.get_cell.get_celltype.get_name} \n" 3276 if j.get_rhs_cell.get_celltype == self then 2729 3277 # 同じセルタイプへ結合している場合(VDES では type conflict になる) 2730 3278 p = j.get_rhs_port … … 2765 3313 2766 3314 jl = c.get_join_list 2767 jl.get_items.each{ |j| 2768 definition = j.get_definition 2769 next unless definition.instance_of? Port 3315 # ループを回す変数を jl から @port に変更 3316 # dynamic, optional 3317 # jl.get_items.each{ |j| 3318 @port.each { |port| 3319 next if port.get_port_type != :CALL 3320 dbgPrint( "gen_cell_ep_vdes_array: #{c.get_name}.#{port.get_name}\n" ) 3321 3322 # definition = j.get_definition 3323 # next unless definition.instance_of? Port 3324 j = jl.get_item( port.get_name ) 3325 2770 3326 # port = definition # definition は composite の Port が得られることがある 2771 port = find j.get_name # celltype の Port (こちらに最適化情報がある)3327 # port = find j.get_name # celltype の Port (こちらに最適化情報がある) 2772 3328 next if port.is_cell_unique? 2773 3329 next if port.is_omit? 2774 3330 2775 am = j.get_array_member2 2776 if am then 3331 b_array = false 3332 am = nil 3333 if j then 3334 am = j.get_array_member2 3335 if am then 3336 b_array = true 3337 end 3338 else 3339 if port.get_array_size == "[]" then 3340 # this case is dynamic optional and nothing joined 3341 next 3342 elsif port.get_array_size then 3343 b_array = true 3344 end 3345 end 3346 if b_array then 3347 # if am then 2777 3348 # 左辺は配列 3349 const = ( port.is_dynamic? && ! $ram_initializer ) ? '' : 'const ' 3350 init = ( port.is_dynamic? && $ram_initializer ) ? '_init_' : '' 2778 3351 2779 3352 if ! port.is_skelton_useless? then 2780 f.printf( "struct %s * const%s_%s[] = {\n",3353 f.printf( "struct %s * #{const}%s_%s[] = {\n", 2781 3354 "tag_#{port.get_signature.get_global_name}_VDES", 2782 3355 "#{c.get_global_name}", 2783 "#{ j.get_name}")3356 "#{port.get_name}" + init ) 2784 3357 else 2785 3358 2786 3359 # スケルトン関数不要最適化の場合、この配列は参照されない 2787 3360 # mikan このケースがテストされていない 2788 f.printf( " const%s_IDX %s_%s[] = {\n",3361 f.printf( "#{const}%s_IDX %s_%s[] = {\n", 2789 3362 # "#{j.get_celltype.get_global_name}", # 右辺 composite に対応できない 2790 3363 "#{j.get_rhs_cell.get_celltype.get_global_name}", … … 2800 3373 i = 0 2801 3374 while i < length 3375 if am == nil then 3376 f.print( " 0,\n" ) 3377 i += 1 3378 next 3379 end 2802 3380 j = am[i] 2803 3381 i += 1 … … 2841 3419 # mikan cell の namespace 未対応、Join で Cell オブジェクトを引当ておく必要あり 2842 3420 f.print "};\n" 3421 # dynamic の呼び口配列 3422 if port.is_dynamic? && $ram_initializer then 3423 f.printf( "struct %s * %s_%s[ #{length} ];\n", 3424 "tag_#{port.get_signature.get_global_name}_VDES", 3425 "#{c.get_global_name}", 3426 "#{port.get_name}" ) 3427 end 2843 3428 end 2844 3429 } … … 2967 3552 init = v.get_initializer 2968 3553 if init && init.instance_of?( Array ) then 2969 type = v.get_type.get_original_type 2970 2971 if( type.kind_of? PtrType )then 3554 type = v.get_type 3555 org_type = v.get_type.get_original_type 3556 3557 if( org_type.kind_of? PtrType )then 2972 3558 # PtrType は ArrayType にすり替える 2973 3559 … … 2976 3562 t2.set_type( type.get_type ) 2977 3563 type = t2 3564 org_type = t2 2978 3565 end 2979 3566 … … 2982 3569 # f.print "const #{type0.get_type_str}\t#{@global_name}_#{v.get_name}_VAR_INIT#{type0.get_type_str_post} = " 2983 3570 f.print "const #{type.get_type_str}\t#{@global_name}_#{v.get_name}_VAR_INIT#{type.get_type_str_post} = " 2984 if type.kind_of? StructType then3571 if org_type.kind_of? StructType then 2985 3572 # celltype の default の初期値あり 2986 3573 str = gen_cell_cb_init( f, c, name_array, type, init, v.get_identifier, 1, true ) 2987 elsif( type.kind_of?( PtrType ) ||type.kind_of?( ArrayType ) ) then3574 elsif( org_type.kind_of?( PtrType ) || org_type.kind_of?( ArrayType ) ) then 2988 3575 str = "{ " 2989 type = type.get_type3576 type = org_type.get_type 2990 3577 # mikan ポインタではなく、配列型としないと、ポインタ変数の領域の分、損する 2991 3578 init.each { |i| … … 3015 3602 fs.each{ |r, f| f.print "#{@global_name}_INIB #{@global_name}_SINGLE_CELL_INIB = \n" } 3016 3603 indent = 0 3017 elsif ! @ idx_is_id_actthen3604 elsif ! @b_need_ptab then 3018 3605 fs.each{ |r, f| f.print "#{@global_name}_INIB #{@global_name}_INIB_tab[] = {\n" } 3019 3606 indent = 1 … … 3036 3623 3037 3624 print_indent( f, indent ) 3038 if @ idx_is_id_actthen3625 if @b_need_ptab then 3039 3626 f.print "const #{@global_name}_INIB #{name_array[5]} = " 3040 3627 end 3041 3628 f.print "{\n" 3042 3629 3043 gen_cell_cb_port( c, indent, f, name_array )3630 gen_cell_cb_port( c, indent, f, name_array, :INIB ) 3044 3631 gen_cell_cb_attribute( c, indent, f, name_array, :INIB ) 3045 3632 3046 3633 unless @singleton then 3047 3634 # 1 つの cell INIB の終わり 3048 if @ idx_is_id_actthen3635 if @b_need_ptab then 3049 3636 f.print( "};\n\n" ) 3050 3637 else … … 3053 3640 end 3054 3641 } 3055 if ! @ idx_is_id_actthen3642 if ! @b_need_ptab then 3056 3643 fs.each{ |r, f| f.print( "};\n\n" ) } 3057 3644 end … … 3068 3655 fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_SINGLE_CELL_CB = \n" } 3069 3656 indent = 0 3070 elsif ! @ idx_is_id_actthen3657 elsif ! @b_need_ptab then 3071 3658 fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_CB_tab[] = {\n" } 3072 3659 indent = 1 3660 else 3661 indent = 0 3073 3662 end 3074 3663 … … 3087 3676 3088 3677 print_indent( f, indent ) 3089 if @ idx_is_id_actthen3678 if @b_need_ptab then 3090 3679 f.print "#{@global_name}_CB #{name_array[2]} = " 3091 3680 end … … 3097 3686 end 3098 3687 3099 if ! has_INIB? then 3100 gen_cell_cb_port( c, indent, f, name_array ) 3688 #if ! has_INIB? then 3689 if $rom == false then 3690 gen_cell_cb_port( c, indent, f, name_array, :CB_ALL ) 3691 else 3692 gen_cell_cb_port( c, indent, f, name_array, :CB_DYNAMIC ) 3101 3693 end 3102 3694 … … 3106 3698 unless @singleton then 3107 3699 # 1 つの cell CB の終わり 3108 if @ idx_is_id_actthen3700 if @b_need_ptab then 3109 3701 f.print( "};\n\n" ) 3110 3702 else … … 3113 3705 end 3114 3706 } 3115 if ! @ idx_is_id_actthen3707 if ! @b_need_ptab then 3116 3708 fs.each{ |r, f| f.print( "};\n\n" ) } 3117 3709 end … … 3120 3712 fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_SINGLE_CELL_CB;\n" } 3121 3713 indent = 0 3122 elsif @ idx_is_id_actthen3714 elsif @b_need_ptab then 3123 3715 @ordered_cell_list.each{ |c| 3124 3716 next if ! c.is_generate? … … 3139 3731 def gen_cell_cb_tab f 3140 3732 indent = 0 3141 if @ idx_is_id_actthen3733 if @b_need_ptab then 3142 3734 if has_INIB? && ( $ram_initializer || ! has_CB? ) then 3143 3735 f.print "/* ID to INIB table #_INTAB_# */\n" … … 3150 3742 } 3151 3743 3152 f.print "#{@global_name}_INIB * #{@global_name}_INIB_tab[] ={\n"3744 f.print "#{@global_name}_INIB *const #{@global_name}_INIB_ptab[] ={\n" 3153 3745 @ordered_cell_list.each{ |c| 3154 3746 if c.is_generate? then # 生成対象か? … … 3170 3762 } 3171 3763 3172 f.print "#{@global_name}_CB * #{@global_name}_CB_tab[] ={\n"3764 f.print "#{@global_name}_CB *const #{@global_name}_CB_ptab[] ={\n" 3173 3765 @ordered_cell_list.each{ |c| 3174 3766 if c.is_generate? then # 生成対象か? … … 3199 3791 # name_array[9] = @global_name # celltype global name 3200 3792 # name_array[10] = cell.get_global_name # cell global name 3793 # name_array[11] = cell_INIB_proto #INIB name for proto type 3201 3794 3202 3795 def get_name_array( cell ) … … 3207 3800 cell_CB_proto = "#{@global_name}_SINGLE_CELL_CB" 3208 3801 cell_INIB_name = "#{@global_name}_SINGLE_CELL_INIB" 3802 cell_INIB_proto = cell_INIB_name 3209 3803 cell_ID = 0 3210 3804 else 3211 if ! @ idx_is_id_actthen3805 if ! @b_need_ptab then 3212 3806 index = cell.get_id - cell.get_celltype.get_id_base 3213 3807 cell_CB_name = "#{@global_name}_CB_tab[#{index}]" … … 3215 3809 cell_CB_proto = "#{@global_name}_CB_tab[]" 3216 3810 cell_INIB_name = "#{@global_name}_INIB_tab[#{index}]" 3811 cell_INIB_proto = "#{@global_name}_INIB_tab[]" 3217 3812 else 3218 3813 cell_CB_name = "#{cell.get_global_name}_CB" … … 3220 3815 cell_CB_proto = cell_CB_name 3221 3816 cell_INIB_name = "#{cell.get_global_name}_INIB" 3817 cell_INIB_proto = cell_INIB_name 3222 3818 end 3223 3819 cell_ID = cell.get_id 3224 3820 end 3821 3822 if has_CB? then 3823 cell_CBP = "&#{cell_CB_name}" 3824 elsif has_INIB? then 3825 cell_CBP = "&#{cell_INIB_name}" 3826 else 3827 cell_CBP = "NULL" # CB も INIB もなければ NULL に置換 3828 end 3829 3225 3830 if @idx_is_id_act then 3226 3831 cell_IDX = cell_ID 3227 3832 else 3228 cell_IDX = "&#{cell_CB_name}" 3229 end 3230 3231 if ! has_CB? && ! has_INIB? then 3232 cell_CBP = "NULL" # CB も INIB もなければ NULL に置換 3233 else 3234 cell_CBP = "&#{cell_CB_name}" 3833 cell_IDX = cell_CBP 3235 3834 end 3236 3835 … … 3247 3846 name_array[9] = @global_name # celltype global name 3248 3847 name_array[10] = cell.get_global_name # cell global name 3848 name_array[11] = cell_INIB_proto # INIB name for prototype 3249 3849 3250 3850 return name_array … … 3331 3931 end 3332 3932 3333 def gen_cell_cb_port( cell, indent, f, name_array ) 3334 gen_cell_cb_call_port( cell, indent, f, name_array ) 3933 #inib_cb::Symbol: :INIB, :CB_ALL, :CB_DYNAMIC 3934 def gen_cell_cb_port( cell, indent, f, name_array, inib_cb = :INIB ) 3935 gen_cell_cb_call_port( cell, indent, f, name_array, inib_cb ) 3335 3936 gen_cell_cb_entry_port( cell, indent, f, name_array ) 3336 3937 end 3337 3938 3338 3939 #=== 呼び口の初期化コードの生成 3339 def gen_cell_cb_call_port( cell, indent, f, name_array )3940 def gen_cell_cb_call_port( cell, indent, f, name_array, inib_cb ) 3340 3941 jl = cell.get_join_list 3341 3942 3342 3943 port = get_port_list 3343 if @n_call_port != 0 then 3944 if inib_cb == :INIB && ( @n_call_port - @n_call_port_omitted_in_CB - 3945 ( $ram_initializer ? 0 : (@n_call_port_dynamic-@n_call_port_array_dynamic) ) > 0 ) || 3946 inib_cb == :CB_ALL && @n_call_port > 0 || 3947 inib_cb == :CB_DYNAMIC && (@n_call_port_dynamic - @n_call_port_array_dynamic) > 0 then 3344 3948 print_indent( f, indent + 1 ) 3345 f.print "/* call port #_CP_# */ \n"3949 f.print "/* call port (#{inib_cb}) #_CP_# */ \n" 3346 3950 port.each{ |p| 3347 3951 next if p.get_port_type != :CALL 3348 3952 next if p.is_omit? 3349 3953 next if p.is_cell_unique? # 最適化(単一セルで呼び口マクロに埋め込まれる) 3954 next if inib_cb == :INIB && p.is_dynamic? && p.get_array_size == nil && ! $ram_initializer 3955 next if inib_cb == :CB_DYNAMIC && ( ! p.is_dynamic? || p.get_array_size != nil ) 3350 3956 3351 3957 j = jl.get_item( p.get_name ) … … 3354 3960 # debug 3355 3961 if j == nil then 3962 dbgPrint "cell_cb_call_port: #{p.get_name} array size=#{p.get_array_size}\n" 3356 3963 # optional 呼び口 3357 3964 # cdl_error( "H1003 internal error: cell \'$1\' port \'$2\': initializer not found\n" , cell.get_name, p.get_name ) 3358 3965 # exit( 1 ) 3359 f.printf( "%-40s /* #_CCP5_# */\n", "0," ) 3360 if p.get_array_size == "[]" then 3361 # 添数省略の呼び口配列 3362 print_indent( f, indent + 1 ) 3363 f.printf( "%-40s /* %s #_CCP6_# */\n", "0,", "length of #{p.get_name} (n_#{p.get_name})" ) 3966 if p.get_array_size then 3967 if p.is_dynamic? then 3968 if inib_cb == :INIB then 3969 if $ram_initializer then 3970 f.printf( "%-40s /* #_CCP7_# _init_ */\n", "#{cell.get_global_name}_#{p.get_name}_init_," ) 3971 print_indent( f, indent + 1 ) 3972 end 3973 f.printf( "%-40s /* #_CCP7B_# */\n", "#{cell.get_global_name}_#{p.get_name}," ) 3974 elsif $rom == false then 3975 f.printf( "%-40s /* #_CCP8_# */\n", "#{cell.get_global_name}_#{p.get_name}," ) 3976 end 3977 else 3978 f.printf( "%-40s /* #_CCP9_# */\n", "0," ) 3979 end 3980 if p.get_array_size == "[]" then 3981 # 添数省略の呼び口配列 3982 print_indent( f, indent + 1 ) 3983 f.printf( "%-40s /* %s #_CCP6_# */\n", "0,", "length of #{p.get_name} (n_#{p.get_name})" ) 3984 end 3985 else 3986 f.printf( "%-40s /* #_CCP5_# */\n", "0," ) 3364 3987 end 3365 3988 next … … 3369 3992 if am then 3370 3993 # 呼び口配列の場合 3371 f.printf( "%-40s /* #_CCP3_# */\n", "#{cell.get_global_name}_#{j.get_name}," ) 3994 if inib_cb == :INIB && p.is_dynamic? && p.get_array_size != nil && $ram_initializer then 3995 f.printf( "%-40s /* #_CCP3_# _init_ */\n", "#{cell.get_global_name}_#{j.get_name}_init_," ) 3996 print_indent( f, indent + 1 ) 3997 end 3998 f.printf( "%-40s /* #_CCP3B_# */\n", "#{cell.get_global_name}_#{j.get_name}," ) 3372 3999 if p.get_array_size == "[]" then 3373 4000 # 添数省略の呼び口配列 … … 3385 4012 end 3386 4013 4014 init = ( p.is_dynamic? && inib_cb == :INIB ) ? "_init_" : "" 4015 3387 4016 if j.get_rhs_subscript then 3388 4017 # 受け口配列の場合 … … 3391 4020 # "&#{j.get_cell_global_name}_#{j.get_port_name}_des#{subscript},", 3392 4021 "#{des_type_cast}&#{j.get_port_global_name}_des#{subscript},", 3393 p.get_name )4022 p.get_name.to_s + init ) 3394 4023 else 3395 4024 # 呼び口配列でも、受け口配列でもない … … 3397 4026 f.printf( "%-40s /* %s #_CCP1_# */\n", 3398 4027 "#{des_type_cast}&#{j.get_port_global_name}_des,", 3399 p.get_name )4028 p.get_name.to_s + init ) 3400 4029 else 3401 4030 # スケルトン不要最適化(CB (INIB) へのポインタを埋め込む) 3402 4031 c = j.get_rhs_cell # 呼び先セル 3403 4032 ct = c.get_celltype # 呼び先セルタイプ 4033 name_array = ct.get_name_array( c ) # 呼び先セルタイプで name_array を得る 3404 4034 if ct.has_INIB? || ct.has_CB? then 3405 name_array = ct.get_name_array( c ) # 呼び先セルタイプで name_array を得る3406 4035 f.printf( "%-40s /* %s #_CCP2_# */\n", "#{name_array[7]},", p.get_name ) 3407 4036 else 3408 4037 # 呼び先は CB も INIB も持たない(NULL に初期化) 3409 f.printf( "%-40s /* %s #_CCP2 _# */\n", "0,", p.get_name )4038 f.printf( "%-40s /* %s #_CCP2B_# */\n", "0,", p.get_name ) 3410 4039 end 3411 4040 end … … 3689 4318 f = fs[ c.get_region.get_domain_root ] 3690 4319 3691 ct = c.get_celltype 4320 ct = c.get_celltype # ct = self でも同じ 3692 4321 jl = c.get_join_list 4322 name_array = get_name_array( c ) 3693 4323 3694 4324 port = ct.get_port_list … … 3725 4355 else 3726 4356 if has_CB? then 3727 if @singleton then 3728 f.print " &#{@global_name}_SINGLE_CELL_CB, /* CB */\n" 3729 else 3730 # f.print " &#{@global_name}_#{c.get_name}_CB,\n" 3731 f.print " &#{@global_name}_CB_tab[#{index}], /* CB */\n" 3732 end 4357 # if @singleton then 4358 # f.print " &#{@global_name}_SINGLE_CELL_CB, /* CB 1 */\n" 4359 # else 4360 # # f.print " &#{@global_name}_#{c.get_name}_CB,\n" 4361 # f.print " &#{@global_name}_CB_tab[#{index}], /* CB 2 */\n" 4362 # end 4363 f.print " #{name_array[8]}, /* CB 1 */\n" 3733 4364 elsif has_INIB? then 3734 if @singleton then 3735 f.print " &#{@global_name}_SINGLE_CELL_INIB, /* INIB */\n" 3736 else 3737 f.print " &#{@global_name}_INIB_tab[#{index}], /* INIB */\n" 3738 end 4365 # if @singleton then 4366 # f.print " &#{@global_name}_SINGLE_CELL_INIB, /* INIB 1 */\n" 4367 # else 4368 # f.print " &#{@global_name}_INIB_tab[#{index}], /* INIB 2 */\n" 4369 # end 4370 f.print " &#{name_array[5]}, /* INIB 1 */\n" 3739 4371 else 3740 4372 f.print " 0,\n" … … 3760 4392 else 3761 4393 if has_CB? then 3762 if @singleton then 3763 f.print " &#{@global_name}_SINGLE_CELL_CB, /* CB */\n" 3764 else 3765 f.print " &#{@global_name}_CB_tab[#{index}], /* CB */\n" 3766 # f.print " &#{@global_name}_#{c.get_name}_CB,\n" 3767 end 4394 # if @singleton then 4395 # f.print " &#{@global_name}_SINGLE_CELL_CB, /* CB 3 */\n" 4396 # else 4397 # f.print " &#{@global_name}_CB_tab[#{index}], /* CB 4 */\n" 4398 # # f.print " &#{@global_name}_#{c.get_name}_CB,\n" 4399 # end 4400 f.print " #{name_array[8]}, /* CB 3 */\n" 3768 4401 elsif has_INIB? then 3769 if @singleton then 3770 f.print " &#{@global_name}_SINGLE_CELL_INIB, /* INIB */\n" 3771 else 3772 f.print " &#{@global_name}_INIB_tab[#{index}], /* INIB */\n" 3773 end 4402 # if @singleton then 4403 # f.print " &#{@global_name}_SINGLE_CELL_INIB, /* INIB 3 */\n" 4404 # else 4405 # # f.print " &#{@global_name}_INIB_tab[#{index}], /* INIB 4 */\n" 4406 # end 4407 f.print " &#{name_array[5]}, /* INIB 3 */\n" 3774 4408 else 3775 4409 f.print " 0,\n" … … 3940 4574 3941 4575 ft.get_paramlist.get_items.each{ |param| 4576 # p "type_str: #{param.get_type.get_type_str}" 3942 4577 f.print( "#{delim} #{param.get_type.get_type_str}" ) 3943 4578 f.print( " #{param.get_name}#{param.get_type.get_type_str_post}" ) … … 3967 4602 end 3968 4603 4604 if p.is_ref_desc? then 4605 subsc = p.get_array_size ? ' int_t subscript ' : '' 4606 f.print " * [ref_desc]\n" 4607 f.printf( " * %-14s %s;\n", 4608 "Descriptor( #{p.get_signature.get_global_name} )", 4609 "#{p.get_name}_refer_to_descriptor(#{subsc})" ) 4610 f.printf( " * %-14s %s;\n", 4611 "Descriptor( #{p.get_signature.get_global_name} )", 4612 "#{p.get_name}_ref_desc(#{subsc}) (same as above; abbreviated version)" ) 4613 end 4614 if p.is_dynamic? then 4615 subsc = p.get_array_size ? 'int_t subscript, ' : '' 4616 subsc2 = p.get_array_size ? ' int_t subscript' : '' 4617 if p.is_optional? then 4618 f.print " * [dynamic, optional]\n" 4619 else 4620 f.print " * [dynamic]\n" 4621 end 4622 f.printf( " * %-14s %s;\n", 4623 "void", 4624 "#{p.get_name}_set_descriptor( #{subsc}Descriptor( #{p.get_signature.get_global_name} ) desc )" ) 4625 if p.is_optional? then 4626 f.printf( " * %-14s %s;\n", 4627 "void", 4628 "#{p.get_name}_unjoin( #{subsc2} )" ) 4629 end 4630 end 3969 4631 } 3970 4632 … … 4048 4710 delim = ", " 4049 4711 f.print param.get_type.get_type_str 4712 # p "type_str2: #{param.get_type.get_type_str}" 4050 4713 f.print " " 4051 4714 f.print param.get_name … … 4103 4766 def generate_inline_template_code 4104 4767 return if @n_entry_port_inline == 0 4768 return if @b_reuse && ! $generate_all_template 4105 4769 if ! ( @plugin && @plugin.gen_ep_func? ) then 4106 4770 return if @b_reuse && ! $generate_all_template … … 4480 5144 # str に以下の置換を行う 4481 5145 #- $ct$ ⇒ セルタイプ名(ct) 4482 #- $cell$ ⇒ セル名(cell) cell が nil ならば 3つの置換は行われない5146 #- $cell$ ⇒ セル名(cell) cell が nil ならば以下の置換は行われない 4483 5147 #- $cb$ ⇒ CB の C 言語名(cb) 4484 5148 #- $cbp$ ⇒ CB へのポインタ(cbp) 4485 5149 #- $cb_proto$ ⇒ CB の C 言語名プロトタイプ宣言用(cb_proto) 4486 #- $id$ ⇒ ct_cell5150 #- $id$ ⇒ $ct$_$cell_global$ # ct_cell before or same V1.5.2 4487 5151 #- $idx$ ⇒ idx 4488 5152 #- $ID$ ⇒ id (整数の番号) 4489 5153 #- $ct_global$ ⇒ セルタイプ名(ct) 4490 #- $cell_global$ ⇒ セル名(cell) cell が nil ならば3つの置換は行われない5154 #- $cell_global$ ⇒ セル名(cell) 4491 5155 #- $$ ⇒ $ 4492 5156 def subst_name( str, name_array ) … … 4503 5167 4504 5168 str = str.gsub( /(^|[^\$])\$ct\$/, "\\1#{ct}" ) 5169 str = str.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{ct_global}" ) 4505 5170 if cell then 4506 5171 str = str.gsub( /(^|[^\$])\$cell\$/, "\\1#{cell}" ) 4507 5172 str = str.gsub( /(^|[^\$])\$cb\$/, "\\1#{cb}" ) 4508 str = str.gsub( /(^|[^\$])\$id\$/, "\\1#{ct}_#{cell}" ) 5173 # str = str.gsub( /(^|[^\$])\$id\$/, "\\1#{ct}_#{cell}" ) 5174 str = str.gsub( /(^|[^\$])\$id\$/, "\\1#{ct}_#{cell_global}" ) 4509 5175 str = str.gsub( /(^|[^\$])\$cb_proto\$/, "\\1#{cb_proto}" ) 4510 5176 str = str.gsub( /(^|[^\$])\$ID\$/, "\\1#{id}" ) 4511 5177 str = str.gsub( /(^|[^\$])\$idx\$/, "\\1#{idx}" ) 4512 5178 str = str.gsub( /(^|[^\$])\$cbp\$/, "\\1#{cbp}" ) 4513 str = str.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{ct_global}" )4514 5179 str = str.gsub( /(^|[^\$])\$cell_global\$/, "\\1#{cell_global}" ) 4515 5180 end … … 4631 5296 end 4632 5297 end 5298 5299 class DomainType < Node 5300 def gen_factory 5301 # p "DomainType: gen_factory" 5302 @plugin.gen_factory 5303 end 5304 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/location.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/messages.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 89 89 end 90 90 91 #=== TECSMsg#ローカライズされた情報メッセージを得る 92 # Generator.info2 から呼び出される 93 def self.get_info_message( body ) 94 body =~ /^[A-Z0-9]+/ # 情報番号を取り出す 95 num = $& 96 msg = @@info_message[ num.to_sym ] 97 if msg == nil then 98 m = body 99 else 100 m = num + " " + msg 101 end 102 return m 103 end 104 91 105 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/optimize.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 178 178 179 179 def set_domain 180 domain_cells = {} 180 181 @cell_list.each{ |c| 181 182 if c.is_generate? then … … 191 192 @domain_roots[ dn ] = [ dr ] 192 193 end 194 if domain_cells[ dr ] then 195 domain_cells[ dr ] << c 196 else 197 domain_cells[ dr ] = [ c ] 198 end 193 199 end 194 200 } … … 196 202 @domain_roots.each{ |dn, drs| 197 203 drs.uniq! 198 if ! $debug then 199 dbgPrint "domains celltype:#{@name} domain=#{dn} " 204 if $verbose && dn then 205 print "[domain] celltype=#{@name} domainType=#{dn} domainRootRegions={" 206 delim = "" 200 207 drs.each{ |r| 201 dbgPrint " region=#{r.get_name}" 208 print delim, r.get_name 209 delim = ", " 202 210 } 203 dbgPrint "\n" 211 print "}\n" 212 drs.each{ |r| 213 print "[domain] celltype=#{@name} domainRootRegion=#{r.get_name} domainType=#{dn} domainKind=#{r.get_domain_root.get_domain_type.get_kind} domainCells={" 214 delim = "" 215 domain_cells[r].each{ |c| 216 print delim, c.get_name 217 delim = ", " 218 } 219 print "}\n" 220 } 204 221 end 205 222 } … … 212 229 # domain_type は一つのノードに一つしかないので、一つの要素を無条件で取り出す 213 230 if regions.length > 1 then 214 cdl_info( "celltype:#{@name} has cells in multi domain.\n" ) 215 if @idx_is_id == false then 216 cdl_info( "celltype:#{@name} forcely set idx_is_id\n" ) 217 end 218 @idx_is_id_act = true 231 if $verbose then 232 cdl_info( "I9999 celltype '$1' has cells in multi-domain.\n", @name ) 233 end 234 # if @idx_is_id == false then 235 # cdl_info( "I9999 celltype '$1' forcely set idx_is_id\n", @name ) 236 # end 237 @b_need_ptab = true 238 # @idx_is_id_act = true 219 239 end 220 240 } … … 228 248 end 229 249 250 optimize_call 251 if $unopt_entry == false then 252 optimize_entry 253 end 254 end 255 256 #=== Celltype#呼び口最適化 257 def optimize_call 230 258 @port.each{ |port| 231 259 next if port.get_port_type != :CALL … … 238 266 if $verbose then 239 267 print "optimized by omit: port: #{port.get_name} : o\n" 268 end 269 next 270 elsif port.is_dynamic? then 271 if $verbose then 272 print "unoptimized by dynamic: port: #{port.get_name}\n" 273 end 274 next 275 elsif port.is_ref_desc? then 276 if $verbose then 277 print "unoptimized by ref_desc: port: #{port.get_name}\n" 240 278 end 241 279 next … … 351 389 dbgPrint "#{port.get_name} : # of cells : #{port_cells.length} # of ports : #{port_ports.length}\n" 352 390 } 353 391 end 392 393 #=== Celltype#受け口最適化 394 # optimize_entry は、呼び口最適化の結果を使用している 395 def optimize_entry 354 396 # 受け口最適化の設定 355 397 @port.each{ |port| -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/plugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 38 38 #++ 39 39 40 #== class モジュール40 #== Plugin クラス 41 41 # ThroughPlugin, SignaturePlugin, CelltypePlugin に include する 42 42 class Plugin < Node … … 75 75 end 76 76 77 ### 意味解析段階で呼び出されるメソッド ### 77 ### 構文解釈 または 意味解析段階で呼び出されるメソッド ### 78 # generate 指定子の場合、構文解釈次第(end_of_parseで)呼び出される 79 # generate 文の場合、出現次第呼び出される 80 ### 意味解析段階で呼び出されるメソッド ### <<< コメント誤り (V1.4.2) 78 81 #=== CDL ファイルの生成 79 82 # typedef, signature, celltype, cell のコードを生成 … … 157 160 # 識別子取得 158 161 if arg =~ /\A[a-zA-Z_]\w*/ then 159 ident = $~ 162 ident = $~.to_s # 160 163 arg = $' 161 164 else … … 285 288 end 286 289 287 #== 出力文字列を EUCから出力ファイルに convert する288 # tecsgen のソースコードは EUCで記述されている290 #== 出力文字列を utf-8 から出力ファイルに convert する 291 # tecsgen のソースコードは utf-8 で記述されている 289 292 # これを、出力ファイルの文字コードに変換して出力する 290 293 # -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/pluginModule.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 45 45 46 46 #=== プラグインをロードする 47 #return:: true : 成功、 false : 失敗 47 # return:: PluginClass 48 # V1.4.1 まで return:: true : 成功、 false : 失敗 49 # 50 # #{plugin_name}.rb をロードし、plugin_name クラスのオブジェクトを生成する. 51 # plugin_name が MultiPlugin の場合、get_plugin により、superClass のプラグインオブジェクトをロードする. 48 52 # 49 53 # すでにロードされているものは、重複してロードしない … … 59 63 end 60 64 # "#{plugin_name}.rb" をロード(システム用ではないので、fatal エラーにしない) 61 if require_tecsgen_lib( "#{plugin_name}.rb", false ) == false 65 if require_tecsgen_lib( "#{plugin_name}.rb", false ) == false then 62 66 cdl_error( "P2001 $1.rb : fail to load plugin" , plugin_name ) 63 return false67 return nil 64 68 end 65 69 end 66 70 67 plSuper = nil 68 # eval( "plSuper = #{plugin_name}.superclass" ) 69 eval( "plSuper = #{plugin_name}" ) 70 while plSuper != superClass && plSuper != nil 71 plSuper = plSuper.superclass 72 end 73 if plSuper == nil then 71 plClass = Object.const_get plugin_name 72 if ( plClass <= superClass ) then # plClass inherits superClass 73 return plClass 74 elsif (plClass <= MultiPlugin) then # plClass inherits MultiPlugin 75 dbgPrint "pluginClass=#{plClass}\n" 76 plugin_object = plClass.get_plugin superClass 77 dbgPrint "pluginClass=#{plugin_object}\n" 78 if plugin_object == nil then 79 cdl_error( "P9999 '$1': MultiPlugin not support '$2'", plugin_name, superClass.name ) 80 end 81 @@loaded_plugin_list[ plugin_name.to_sym ] = :MultiPlugin 82 return plugin_object 83 else 74 84 cdl_error( "P2002 $1: not kind of $2" , plugin_name, superClass.name ) 75 return false85 return nil 76 86 end 77 87 rescue Exception => evar … … 81 91 end 82 92 cdl_error( "P2003 $1: load failed" , plugin_name ) 83 return false93 return nil 84 94 end 85 return true 95 # ここへは来ない 96 return nil 86 97 end 87 98 … … 92 103 end 93 104 plugin_name = plugin_object.class.name.to_sym 94 if @@loaded_plugin_list[ plugin_name ] == nil 95 raise "#{plugin_name} might have different name " 96 # プラグインのファイル名と、プラグインのクラス名が相違する場合 105 if @@loaded_plugin_list[ plugin_name ] == :MultiPlugin then 106 p "#{plugin_name}: MultiPlugin" 107 return 108 elsif @@loaded_plugin_list[ plugin_name ] == nil then 109 #raise "#{plugin_name} might have different name " 110 ## プラグインのファイル名と、プラグインのクラス名が相違する場合 111 #MultiPlugin の get_plugin で返されたケースでは nil になっている 112 @@loaded_plugin_list[ plugin_name ] = 0 97 113 end 98 114 count = @@loaded_plugin_list[ plugin_name ] … … 131 147 dbgPrint "PluginModule #{@@loaded_plugin_list}\n" 132 148 @@loaded_plugin_list.each{ |plugin_name,count| 149 if count == :MultiPlugin then 150 next 151 end 133 152 dbgPrint "PluginModule: #{plugin_name}\n" 134 153 eval_str = "#{plugin_name}.gen_post_code( file )" -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/syntaxobj.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 6by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 86 86 87 87 #=== 情報を表示する 88 def cdl_info( message ) 89 Console.puts "info: #{message}" 88 def cdl_info( message, *arg ) 89 Generator.info2( @locale, message, *arg ) 90 end 91 92 #=== 情報を表示する 93 def cdl_info2( locale, message, *arg ) 94 Generator.info2( locale, message, *arg ) 90 95 end 91 96 … … 680 685 end 681 686 687 #=== Decl# print_flowinfo 688 def print_flowinfo file 689 if @kind == :VAR then 690 file.write "#{@identifier} " 691 end 692 end 693 682 694 def show_tree( indent ) 683 695 indent.times { print " " } -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecsgen.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 41 41 class TECSGEN 42 42 43 @@b_post_coded = false # ポストコード生成開始後 true 44 43 45 #=== import パス (-I) を末尾に追加 44 46 # 既に登録済みであれば、追加しない … … 216 218 end 217 219 220 def self.get_argv 221 ARGV 222 end 223 218 224 #------ TECSGEN CDL analyze and generate ------# 219 225 … … 236 242 end # syntax_analisys 237 243 244 #=== TECSGEN#semantics_analisys_1 245 # semantics check. only cells here 246 # other objects (signature, celltype, typedef, etc ) are checked while syntax analisys 238 247 def semantics_analisys_1 239 248 #### 意味解析1 (post コードを除く) #### 240 249 dbgPrint( "## Creating reverse join \n") 241 250 Cell.create_reverse_join 251 252 DescriptorType.check_signature 253 Signature.set_descriptor_list 254 Celltype.check_dynamic_join 242 255 243 256 #0 set_definition_join は2回呼び出される(1回目) … … 248 261 249 262 #### post コードの生成と構文解析 #### 263 @@b_post_coded = true # ポストコード生成開始後 true 250 264 # 引数がなければ、プラグインのポストコードを出力しない 251 265 if ARGV.length > 0 then … … 283 297 dbgPrint( "## Checking all join (for cells generated by Post Code\n") 284 298 @root_namespace.set_definition_join 299 @root_namespace.set_max_entry_port_inner_cell 285 300 286 301 dbgPrint( "## Set require join\n") … … 438 453 open( "#{$gen_base}/tecsgen.timestamp", "w" ){|io|} 439 454 end # finalize 455 456 def dump_tecsgen_rbdmp 457 dbgPrint "dump_tecsgen_rbdmp 0:\n" 458 #### unjoin_plugin 後に行う必要があるため、コード生成後にダンプを行う 459 #### Region link root ごとにオプティマイズしてダンプ #### 460 Namespace.get_root.unjoin_plugin 461 Namespace.get_root.find_plugin 0, [] 462 463 Region.get_link_roots.each { |region| 464 dbgPrint "dump_tecsgen_rbdmp 1: Region.path_str: #{region.get_namespace_path.get_path_str}\n" 465 466 n_cells = region.get_n_cells 467 468 if $region_list.length > 0 then 469 if $region_list[ region.get_namespace_path.get_path_str ] == false then 470 $region_list[ region.get_namespace_path.get_path_str ] = true 471 else 472 next 473 end 474 end 475 476 dbgPrint "dump_tecsgen_rbdmp 2: Region.path_str: #{region.get_namespace_path.get_path_str}\n" 477 # セルが一つもなければ生成しない 478 # セルの生成がない場合 479 if region.get_n_cells == 0 then 480 # if $region_list.length > 0 then 481 # Generator.warning( "W9999 $1: specified to generate but has no cell", region.get_name ) 482 # end 483 if region != @root_namespace then 484 next 485 end 486 end 487 488 dbgPrint "dump_tecsgen_rbdmp 3: Region.path_str: #{region.get_namespace_path.get_path_str}\n" 489 $generating_region = region 490 if Region.get_link_roots.length > 1 then 491 if region.get_name == "::" then 492 $gen = $gen_base 493 else 494 $gen = $gen_base + "/" + region.get_global_name.to_s 495 end 496 else 497 $gen = $gen_base 498 end 499 500 dbgPrint "dump_tecsgen_rbdmp 4: Region.path_str: #{region.get_namespace_path.get_path_str}\n" 501 dbgPrint( "## Unset optimize variables\n") 502 @root_namespace.reset_optimize # 最適化をリセットする 503 504 # if Generator.get_n_error == 0 then 505 # # エラーが発生していたら、ここへは来ない 506 dbgPrint( "## Set cell id\n") 507 @root_namespace.set_cell_id_and_domain # セルの ID とドメイン情報を設定(linkunit 毎に0からつける) 508 509 # エラーが発生していたら、最適化は実施しない 510 if ! $unopt then 511 dbgPrint( "## Optimizing: Link Region=#{@root_namespace.get_name}\n") 512 @root_namespace.optimize 513 end 514 # end 515 dbgPrint "dump_tecsgen_rbdmp final: Region.path_str: #{region.get_namespace_path.get_path_str}\n" 516 File.write( "#{$gen}/tecsgen.rbdmp", Marshal.dump(Namespace.get_root) ) 517 } 518 end 519 520 def self.post_coded? 521 @@b_post_coded 522 end 440 523 end # class TECSGEN -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/types.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 5by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 629 629 630 630 class FloatType < Type 631 # @bit_size:: 32, 64, (80), -32, -64 631 # @bit_size:: 32, 64, (80), -32, -64, -128 632 632 633 633 def initialize( bit_size ) … … 684 684 when -64 685 685 str = "#{str}double" 686 when -128 687 str = "#{str}long double" 686 688 end 687 689 return str … … 734 736 # @b_has_sized_pointer_member:: bool : メンバにポインタ型がある 735 737 # @b_has_unsized_string_member:: bool : メンバにポインタ型がある 738 # @b_hasTag:: bool : タグがある 736 739 # @member_types_symbol:: Symbol : tag が無い時のみ設定 (それ以外では nil) 737 740 … … 746 749 super() 747 750 @tag = tag 751 if tag then 752 @b_hasTag = true 753 else 754 @b_hasTag = false 755 end 748 756 @@structtype_current_sp += 1 749 757 @@structtype_current_stack[@@structtype_current_sp] = self … … 918 926 str = super 919 927 920 if @ tag then928 if @b_hasTag then 921 929 # typedef struct tag StructType; の形式の場合 922 930 # struct の本体は、別に生成される 923 return "#{str}struct #{@tag} 931 return "#{str}struct #{@tag}" 924 932 925 933 else 926 934 # typedef struct { int a; } StructType; の形式の場合 927 str += "struct { \n"935 str += "struct {" 928 936 @members_decl.get_items.each{ |i| 929 str += sprintf( " %-8s %s%s;\n", "#{i.get_type.get_type_str}", "#{i.get_name}", "#{i.get_type.get_type_str_post}" )937 str += sprintf( "%s %s%s;", "#{i.get_type.get_type_str}", "#{i.get_name}", "#{i.get_type.get_type_str_post}" ) 930 938 } 931 939 str += "} " … … 1267 1275 def check_init( locale, ident, initializer, kind, attribute = nil ) 1268 1276 if ( initializer.instance_of?( Array ) ) then 1277 # 要素数が指定されている場合、初期化要素数をチェック 1278 if @subscript then 1279 n_sub = @subscript.eval_const( nil ) 1280 if n_sub then 1281 if initializer.length > n_sub then 1282 cdl_error2( locale, "T9999 $1: too many initializer, $2 for $3" , ident, initializer.length, n_sub ) 1283 end 1284 end 1285 end 1269 1286 index = 0 1270 1287 initializer.each{ |i| … … 1543 1560 # 動的結合で渡すデスクリプタ型 1544 1561 class DescriptorType < Type 1545 # @sinagure_nsp::NamespacePath 1562 # @sinagure_nsp::NamespacePath 1563 1564 @@descriptors = {} 1546 1565 1547 1566 def initialize( signature_nsp ) 1548 1567 @signature_nsp = signature_nsp 1549 obj = Namespace.find signature_nsp 1550 if ! obj.kind_of? Signature then 1551 cdl_error( "T9999 '$1': not signature or not found", signature_nsp.to_s ) 1552 else 1553 if obj.has_descriptor? then 1554 cdl_error( "T9999 '$1': has Desicrptor in function parameter", signature_nsp.to_s ) 1555 end 1556 end 1568 # check_signature ## 1569 @@descriptors[ self ] = false 1557 1570 end 1558 1571 1559 1572 def get_type_str 1560 "Descriptor( #{@signature_nsp. to_s} )"1573 "Descriptor( #{@signature_nsp.get_global_name} )" 1561 1574 end 1562 1575 … … 1581 1594 end 1582 1595 1596 def self.check_signature 1597 @@descriptors.each{ |desc, val| 1598 if val != true then 1599 desc.check_signature 1600 @@descriptors[ desc ] = true 1601 end 1602 } 1603 end 1604 1605 def check_signature 1606 # p "Desc #{@signature_nsp.to_s}" 1607 obj = Namespace.find @signature_nsp 1608 if ! obj.kind_of? Signature then 1609 cdl_error( "T9999 '$1': not signature or not found", @signature_nsp.to_s ) 1610 else 1611 if obj.has_descriptor? then 1612 # cdl_error( "T9999 '$1': has Descriptor in function parameter", @signature_nsp.to_s ) 1613 end 1614 # @signature_nsp = obj.get_namespace_path 1615 end 1616 end 1617 1583 1618 #== DescriptorType# 1584 # 意味解析段階では nil が返される可能性に注意1585 1619 def get_signature 1586 1620 Namespace.find @signature_nsp -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_en_US.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 1168 1168 @@warning_message[ :"W6004" ] = "need 'void' for no parameter" 1169 1169 1170 ### 1171 # info メッセージ 1172 @@info_message = {} 1173 1170 1174 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_ja_JP.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 1168 1168 @@warning_message[ :"W6004" ] = "パラメータが存在しない場合 'void' が必要です" 1169 1169 1170 ### 1171 # info メッセージ 1172 @@info_message = {} 1173 1170 1174 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_en_US.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 76 76 # * このファイルを編集して使用することが意図されていますが 77 77 # * tecsgen の再実行により上書きされてしまうため、通常 78 # * gen/%s_templ ate.c => src/%s.c78 # * gen/%s_templ.c => src/%s.c 79 79 # * のように名前, フォルダを変更してから修正します 80 80 # */ … … 83 83 * This file was automatically generated by tecsgen. 84 84 * Move and rename like below before editing, 85 * gen/%s_templ ate.c => src/%s.c85 * gen/%s_templ.c => src/%s.c 86 86 * to avoid to be overwritten by tecsgen. 87 87 */ … … 227 227 @@comment[ :EPM_comment ] = "\n/* entry port function macro (abbrev) %s */\n" 228 228 229 # @@comment[ :CRD_comment ] = "\n/* ディスクリプタ参照関数 %s */\n" 230 @@comment[ :CRD_comment ] = "/* refer to descriptor function %s */\n" 231 232 # @@comment[ :CRDA_comment ] = "\n/* ディスクリプタ参照マクロ(短縮形) %s */\n" 233 @@comment[ :CRDA_comment ] = "\n/* refer to descriptor macro (abbrev) %s */\n" 234 235 # @@comment[ :SDF_comment ] = "/* ディスクリプタ設定関数 %s */\n" 236 @@comment[ :SDF_comment ] = "/* set descriptor function %s */\n" 237 238 # @@comment[ :SDMA_comment ] = "\n/* ディスクリプタ設定マクロ(短縮形) %s */\n" 239 @@comment[ :SDMA_comment ] = "\n/* set descriptor macro (abbrev) %s */\n" 240 229 241 # @@comment[ :CTIX_comment ] = "\n/* セルタイプのIDX型 %s */\n" 230 242 @@comment[ :CTIX_comment ] = "\n/* celltype IDX type %s */\n" … … 323 335 @@comment[ :TEFB_comment ] = "\t/* Put statements here %s */\n" 324 336 337 # @@comment[ :MCPP_comment ] = "/* セル CB プロトタイプ宣言 %s */\n" 338 @@comment[ :MCPP_comment ] = "/* cell CB prototype declaration %s */\n" 339 340 # @@comment[ :MCPB_comment ] = "/* セル CB プロトタイプ宣言 %s */\n" 341 @@comment[ :MCPB_comment ] = "/* cell CB prototype declaration %s */\n" 325 342 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_ja_JP.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 65 65 * このファイルを編集して使用することが意図されていますが 66 66 * tecsgen の再実行により上書きされてしまうため、通常 67 * gen/%s_templ ate.c => src/%s.c67 * gen/%s_templ.c => src/%s.c 68 68 * のように名前, フォルダを変更してから修正します 69 69 */ … … 127 127 @@comment[ :CPMA_comment ] = "/* 呼び口関数マクロ(短縮形)%s */\n" 128 128 @@comment[ :EPM_comment ] = "\n/* 受け口関数マクロ(短縮形) %s */\n" 129 @@comment[ :CRD_comment ] = "/* ディスクリプタ参照関数 %s */\n" 130 @@comment[ :CRDA_comment ] = "\n/* ディスクリプタ参照マクロ(短縮形) %s */\n" 131 @@comment[ :SDF_comment ] = "/* ディスクリプタ設定関数 %s */\n" 132 @@comment[ :SDMA_comment ] = "\n/* ディスクリプタ設定マクロ(短縮形) %s */\n" 129 133 @@comment[ :CTIX_comment ] = "\n/* セルタイプのIDX型 %s */\n" 130 134 @@comment[ :EPP_comment ] = "\n/* 受け口関数プロトタイプ宣言 %s */\n" … … 159 163 @@comment[ :TEPF_comment ] = "/* 受け口関数 %s */\n" 160 164 @@comment[ :TEFB_comment ] = "\t/* ここに処理本体を記述します %s */\n" 165 @@comment[ :MCPP_comment ] = "/* CB プロトタイプ宣言 %s */\n" 166 @@comment[ :MCPB_comment ] = "/* CB プロトタイプ宣言 %s */\n" 161 167 162 168 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/DomainPlugin.rb
r321 r429 46 46 #option::String : domain 指定子の第二引数 47 47 def initialize( region, domain_type_name, option ) 48 super() 48 49 end 49 50 … … 77 78 return false 78 79 end 80 81 #== ドメイン種別を返す 82 #return::Symbol :kernel, :user, :OutOfDomain 83 def get_kind 84 :kernel 85 end 86 87 #== factory 生成 88 # DomainPlugin の factory は特定のファイルへの出力が想定されていない 89 def gen_factory 90 end 79 91 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2AlarmHandlerPlugin.rb
r321 r429 34 34 # アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 35 35 # の責任を負わない. 36 # 37 # $Id: HRP2AlarmHandlerPlugin.rb 2640 2017-06-03 11:27:12Z okuma-top $ 36 38 # 37 39 #++ … … 50 52 def print_cfg_cre(file, cell, val, tab) 51 53 val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 52 # $cbp$ の代わり53 index = cell.get_id - @celltype.get_id_base54 cell_CB _name = "#{@celltype.get_global_name}_CB_tab[#{index}]"54 # $cbp$ #983 55 name_array = @celltype.get_name_array cell 56 cell_CBP = name_array[8] # CBP 55 57 # CRE_XXXの生成 56 58 if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN) … … 59 61 else 60 62 file.print <<EOT 61 #{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tAlarmHandler_start });63 #{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tAlarmHandler_start }); 62 64 EOT 63 65 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2CyclicHandlerPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 2by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 … … 51 52 def print_cfg_cre(file, cell, val, tab) 52 53 val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 53 # $cbp$ の代わり54 index = cell.get_id - @celltype.get_id_base55 cell_CB _name = "#{@celltype.get_global_name}_CB_tab[#{index}]"54 # $cbp$ #983 55 name_array = @celltype.get_name_array cell 56 cell_CBP = name_array[8] # CBP 56 57 # CRE_XXXの生成 57 58 if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN) … … 60 61 else 61 62 file.print <<EOT 62 #{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} });63 #{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} }); 63 64 EOT 64 65 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2DataqueuePlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 2by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2EventflagPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 2by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2FixedSizeMemoryPoolPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 2by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 39 40 #require "HRP2KernelObjectPlugin" 40 41 require_tecsgen_lib "HRP2KernelObjectPlugin.rb" 41 42 42 43 43 #== celltype プラグインの共通の親クラス … … 51 51 # tab : 52 52 def print_cfg_cre(file, cell, val, tab) 53 val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 54 # $cbp$の代わり 55 index = cell.get_id - @celltype.get_id_base 56 cell_CB_name = "#{@celltype.get_global_name}_CB_tab[#{index}]" 53 if !val[:id].nil? 54 val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 55 end 56 # $cbp$ #983 57 name_array = @celltype.get_name_array cell 58 cell_CBP = name_array[8] # CBP 57 59 # CRE_XXXの生成 58 60 domainOption = cell.get_region.get_domain_root.get_domain_type.get_option … … 63 65 elsif @plugin_arg_str == "ALARM" 64 66 file.print <<EOT 65 #{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tAlarmHandler_start });67 #{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tAlarmHandler_start }); 66 68 EOT 67 69 elsif @plugin_arg_str == "CYCLIC" 68 70 file.print <<EOT 69 #{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} }); 71 #{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} }); 72 EOT 73 elsif @plugin_arg_str == "CONFIG_INT" 74 file.print <<EOT 75 #{tab}CFG_INT( #{val[:interruptNumber]}, { #{val[:attribute]}, #{val[:interruptPriority]} }); 76 EOT 77 elsif @plugin_arg_str == "ISR" 78 file.print <<EOT 79 #{tab}ATT_ISR({ #{val[:attribute]}, #{cell_CBP}, #{val[:interruptNumber]}, tISR_start, #{val[:priority]} }); 80 EOT 81 elsif @plugin_arg_str == "INIT_ROUTINE" 82 file.print <<EOT 83 #{tab}ATT_INI({ #{val[:attribute]}, #{cell_CBP}, tInitializeRoutine_start }); 84 EOT 85 elsif @plugin_arg_str == "TERM_ROUTINE" 86 file.print <<EOT 87 #{tab}ATT_TER({ #{val[:attribute]}, #{cell_CBP}, tTerminateRoutine_start }); 70 88 EOT 71 89 else … … 79 97 elsif @plugin_arg_str == "CYCLIC" 80 98 file.puts "SAC_CYC(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });" 99 elsif @plugin_arg_str == "CONFIG_INT" 100 # nothing to do 101 elsif @plugin_arg_str == "ISR" 102 # nothing to do 103 elsif @plugin_arg_str == "INIT_ROUTINE" 104 # nothing to do 105 elsif @plugin_arg_str == "TERM_ROUTINE" 106 # nothing to do 81 107 else 82 108 raise "#{@plugin_arg_str} is unknown option" -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2KernelObjectPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 2by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 … … 185 186 val = {} 186 187 @celltype.get_attribute_list.each{ |a| 187 p a.get_name188 # p a.get_name 188 189 if a.get_type.kind_of?( ArrayType ) 189 190 val[a.get_name] = [] … … 217 218 if val[:id].nil? != true 218 219 puts val[:id] 219 val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 220 #val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 221 val[:id] = @celltype.subst_name( val[:id], @celltype.get_name_array( cell ) ) 220 222 end 221 223 # $cbp$の代わり … … 243 245 file2.puts "}\n" 244 246 else 245 print "~~~~~ #{cell.get_region.get_name.to_s} is included in"246 p @@region_list247 dbgPrint "~~~~~ #{cell.get_region.get_name.to_s} is included in" 248 # p @@region_list 247 249 end 248 250 file3 = AppFile.open( "#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg" ) … … 257 259 puts "===== end check my domain #{cell.get_name} =====" 258 260 # SAC_XXXの生成 259 puts "===== begin check regions #{cell.get_name} =====" 260 p val[:accessPattern] 261 p val[:accessPattern].class 262 263 #ep = [ :eTaskActivate, :eTaskControl, :eTaskManage, :eTaskRefer ] 264 #各カーネルオブジェクトの受け口名を取得 265 # ep = get_entry_ports_name_list() 266 i = 0 267 acv = [] 268 # アクセス許可ベクタの生成 269 val[:accessPattern].each { |acptnx| 270 # アクセス許可パターンの生成 271 if acptnx != "OMIT" 272 acv << acptnx 273 p acv[i] 274 elsif cell_domain_type.get_option.to_s == "trusted" 275 acv << "TACP_KERNEL" 276 p acv[i] 277 elsif cell_domain_type.get_option.to_s != "OutOfDomain" 278 acv << "TACP(#{cell_domain_root.get_name.to_s})" 261 if !val[:accessPattern].nil? 262 puts "===== begin check regions #{cell.get_name} =====" 263 # p val[:accessPattern] 264 # p val[:accessPattern].class 265 266 #ep = [ :eTaskActivate, :eTaskControl, :eTaskManage, :eTaskRefer ] 267 #各カーネルオブジェクトの受け口名を取得 268 # ep = get_entry_ports_name_list() 269 i = 0 270 acv = [] 271 # アクセス許可ベクタの生成 272 val[:accessPattern].each { |acptnx| 273 # アクセス許可パターンの生成 274 if acptnx != "OMIT" 275 acv << acptnx 276 # p acv[i] 277 elsif cell_domain_type.get_option.to_s == "trusted" 278 acv << "TACP_KERNEL" 279 # p acv[i] 280 elsif cell_domain_type.get_option.to_s != "OutOfDomain" 281 acv << "TACP(#{cell_domain_root.get_name.to_s})" 282 else 283 acv << "TACP_SHARED" 284 end 285 286 i += 1 287 } 288 289 dbgPrint "acv = " 290 p acv 291 292 #各種SACの生成 293 domainOption = cell_domain_type.get_option 294 # if cell.get_region.get_region_type == :DOMAIN 295 if domainOption != "OutOfDomain" 296 # 保護ドメインに属する場合 297 file3 = AppFile.open( "#{$gen}/tecsgen_#{cell.get_region.get_name.to_s}.cfg" ) 298 print_cfg_sac(file3, val, acv) 299 file3.close 279 300 else 280 acv << "TACP_SHARED" 301 # 無所属の場合 302 print_cfg_sac(file2, val, acv) 281 303 end 282 304 283 i += 1 284 } 285 286 print "acv = " 287 p acv 288 289 #各種SACの生成 290 domainOption = cell_domain_type.get_option 291 # if cell.get_region.get_region_type == :DOMAIN 292 if domainOption != "OutOfDomain" 293 # 保護ドメインに属する場合 294 file3 = AppFile.open( "#{$gen}/tecsgen_#{cell.get_region.get_name.to_s}.cfg" ) 295 print_cfg_sac(file3, val, acv) 296 file3.close 297 else 298 # 無所属の場合 299 print_cfg_sac(file2, val, acv) 305 puts "===== end check regions #{cell.get_name} =====" 300 306 end 301 302 puts "===== end check regions #{cell.get_name} ====="303 307 end 304 308 } … … 319 323 320 324 def self.check_referenced_cells() 321 puts "===== begin check registered celltype ====="325 dbgPrint "===== begin check registered celltype =====\n" 322 326 self.get_celltype_list.each { |ct| 323 p ct.get_name.to_s327 dbgPrint( ct.get_name.to_s + "\n" ) 324 328 } 325 puts "===== end check registered celltype ====="329 dbgPrint "===== end check registered celltype =====\n" 326 330 327 331 =begin … … 331 335 j = cell.get_join_list.get_item(p.get_name) 332 336 printf "===== check call port : " 333 p p.get_name.to_s337 # p p.get_name.to_s 334 338 next if j.nil? # 未結合の場合 335 339 if @@celltype_list.include?(j.get_celltype) … … 338 342 j.get_cell.set_referenced_cell(cell, j.get_port_name) 339 343 printf "===== check joined rhs cell : " 340 p j.get_cell.get_name.to_s344 # p j.get_cell.get_name.to_s 341 345 printf "===== check joined rhs port_name : " 342 p j.get_port_name346 # p j.get_port_name 343 347 end 344 348 } -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2ObjectPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Plugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 201 4by TOPPERS Project6 # Copyright (C) 2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 … … 43 44 44 45 def initialize( region, name, option ) 45 print "MyDomainPlugin: initialize: region=#{region.get_name}, domainName=#{name}, option=#{option}\n" 46 super 47 print "HRP2Plugin: initialize: region=#{region.get_name}, domainName=#{name}, option=#{option}\n" 48 @region = region 49 @name = name 50 51 case option 52 when "trusted", "nontrusted", "OutOfDomain" 53 # OK 54 @option = option 55 else 56 cdl_error( "HRPPlugin: '$1' is unacceptable domain kind, specify 'trusted' or 'nontrusted'", option ) 57 @option = "trusted" # とりあえず trusted を設定しておく 58 end 46 59 end 47 60 … … 54 67 # get_rhs_subscript:Integer or nil 受け口配列の添数 (Join::@rhs_subscript の説明参照) 55 68 # return [] 56 print " MyDomainPlugin: add_through_plugin: #{current_region.get_name}=>#{next_region.get_name}, #{join.get_owner.get_name}.#{join.get_definition.get_name}=>#{join.get_cell.get_name}.#{join.get_port_name}, #{through_type}\n"69 print "HRP2Plugin: add_through_plugin: #{current_region.get_name}=>#{next_region.get_name}, #{join.get_owner.get_name}.#{join.get_definition.get_name}=>#{join.get_cell.get_name}.#{join.get_port_name}, #{through_type}\n" 57 70 58 71 puts "=====Join Check Start=====" … … 107 120 end 108 121 122 #== ドメイン種別を返す 123 #return::Symbol :kernel, :user, :OutOfDomain 124 def get_kind 125 case @option 126 when "trusted" 127 return :kernel 128 when "nontrusted" 129 return :user 130 when "OutOfDomain" 131 return :OutOfDomain 132 end 133 end 134 109 135 def joinable?(current_region, next_region, through_type ) 110 print " MyDomainPlugin: joinable? from #{current_region.get_name} to #{next_region.get_name} (#{through_type})\n"136 print "HRP2Plugin: joinable? from #{current_region.get_name} to #{next_region.get_name} (#{through_type})\n" 111 137 return true 112 138 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PostHook.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 201 2by TOPPERS Project6 # Copyright (C) 2017 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2RPCPlugin.rb
r321 r429 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 … … 70 71 #=== RPCPlugin の initialize 71 72 # 説明は ThroughPlugin (plugin.rb) を参照 72 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )73 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 73 74 super 74 75 @b_noClientSemaphore = false … … 234 235 if cell.get_allocator_list.length > 0 then 235 236 236 dbgPrint "make allocator "237 dbgPrint "make allocator\n" 237 238 file.print "#{indent_str}[allocator(" 238 239 … … 269 270 nest = @end_region.gen_region_str_pre file 270 271 indent_str = " " * nest 272 nest_str = " " * nest 273 if @next_cell_port_subscript then 274 subscript = '[' + @next_cell_port_subscript.to_s + ']' 275 else 276 subscript = "" 277 end 271 278 272 279 file.print <<EOT 273 280 #{indent_str}cell #{@rpc_channel_celltype_name}Server #{@cell_name}Body { 274 #{indent_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name} ;281 #{indent_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name}#{subscript}; 275 282 //#{indent_str} #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name}; 276 283 #{indent_str} //cTDR = #{@channelCellName}.eTDR; -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SVCPlugin.rb
r321 r429 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 … … 83 84 @@generated_celltype_header = {} 84 85 85 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )86 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 86 87 super 87 88 @ct_name_body = "#{@ct_name}SVCBody_#{@next_cell.get_name}_#{@next_cell_port_name}".to_sym … … 217 218 nest = @end_region.gen_region_str_pre file 218 219 nest_str = " " * nest 220 if @next_cell_port_subscript then 221 subscript = '[' + @next_cell_port_subscript.to_s + ']' 222 else 223 subscript = "" 224 end 219 225 220 226 # サーバー側チャンネルの生成 … … 224 230 #{nest_str} // Server Side Channel 225 231 #{nest_str} cell #{@ct_name_body} #{@cell_name_body}{ 226 #{nest_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name} ;232 #{nest_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name}#{subscript}; 227 233 #{nest_str} }; 228 234 EOT … … 241 247 nest = @start_region.gen_region_str_pre file 242 248 nest_str = " " * nest 249 if @next_cell_port_subscript then 250 subscript = '[' + @next_cell_port_subscript.to_s + ']' 251 else 252 subscript = "" 253 end 243 254 244 255 # クライアント側チャンネルの生成 … … 247 258 #{nest_str} // Client Side Channel 248 259 #{nest_str} cell #{@ct_name} #{@cell_name}{ 249 #{nest_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name} ;260 #{nest_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name}#{subscript}; 250 261 #{nest_str} }; 251 262 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2TaskPlugin.rb
r321 r429 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 … … 52 53 # tab : 53 54 def print_cfg_cre(file, cell, val, tab) 54 val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" ) 55 #val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_global_name.to_s}" ) 56 #val[:id] = @celltype.subst_name( val[:id], @celltype.get_name_array( cell ) ) 55 57 # $cbp$の代わり 56 58 index = cell.get_id - @celltype.get_id_base … … 58 60 cell_CB_name = "#{index}" 59 61 # CRE_XXX/DEF_XXXの生成 60 print "assign task plugin\n"62 dbgPrint "assign task plugin\n" 61 63 domainOption = cell.get_region.get_domain_root.get_domain_type.get_option 62 64 # if cell.get_region.get_region_type == :DOMAIN 65 # cell.show_tree 1 63 66 if domainOption != "OutOfDomain" 64 67 # 保護ドメインに属する場合 … … 68 71 raise "system task cannot have user stack." 69 72 end 73 p "CRE_TSK 0 user=#{val[:userStackSize]} system=#{val[:systemStackSize]}" 70 74 file.print <<EOT 71 75 #{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:systemStackSize]}, NULL }); … … 76 80 raise "user task must have user stack." 77 81 end 82 p "CRE_TSK 1" 78 83 if val[:systemStackSize] == "OMIT" 79 84 file.print <<EOT … … 81 86 EOT 82 87 else 88 p "CRE_TSK 2" 83 89 file.print <<EOT 84 90 #{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:userStackSize]}, NULL, #{val[:systemStackSize]}, NULL }); … … 121 127 ct = cell.get_celltype 122 128 if ct.class == Celltype && check_celltype_list.include?( ct ) == false 129 # チェック済みセルタイプに登録 130 check_celltype_list << ct 131 123 132 # 未チェックのセルタイプだった場合 124 133 # puts "check for ATT_MOD : #{ct.classget_global_name}" … … 134 143 regions = ct.get_domain_roots 135 144 regions_hrp2 = regions[ :HRP2 ] 136 print "HRP2 domain in #{ct.get_name}: "145 dbgPrint "HRP2 domain in #{ct.get_name}: " 137 146 regions_hrp2.each { |reg| 138 print reg.get_name147 dbgPrint reg.get_name 139 148 } 140 149 puts "" … … 179 188 file.print "ATT_MOD(\"#{ct.get_global_name}.o\");\n" 180 189 file.close 181 182 check_celltype_list << ct183 190 else 184 191 # 何もしない -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/MrubyBridgePlugin.rb
r321 r429 3 3 # mruby => TECS bridge 4 4 # 5 # Copyright (C) 2008-201 5by TOPPERS Project5 # Copyright (C) 2008-2017 by TOPPERS Project 6 6 # 7 7 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 37 37 # 38 38 39 # Todo: 40 # 生成するもの 41 # gen_cdl_file 42 # ブリッジ初期化セルタイプ (シグニチャごと) 43 # @@init_celltypes に記録 44 # ブリッジセルタイプ (シグニチャごと) 45 # @@celltypes に記録 46 # 構造体セルタイプ 47 # @@struct_list に記録 48 # new_cell 49 # TECS 初期化セル(プロトタイプ宣言) 50 # @@VM_init_cells に記録 51 # @@VM_struct_list に記録 52 # @@VM_ptr_list に記録 53 # gen_post_code 54 # 構造体初期化セル 55 # ポインタ初期化セル 56 # TECS 初期化セル 57 # 58 # ep_func の作成 59 # signature, ポインタ、構造体 … 初期化受け口=mruby VM への登録 60 # ポインタ 61 # preamble の作成 62 # ポインタ、構造体 … アクセス用コードの生成 63 # signature … ブリッジ関数のプロトタイプ宣言 64 # postamble の作成 65 # signature … ブリッジ関数の定義 66 67 class MrubyBridgePlugin < SignaturePlugin 68 69 # プラグイン引数名 => Proc 70 MrubyBridgePluginArgProc = { 71 "ignoreUnsigned" => Proc.new { |obj,rhs| obj.set_ignoreUnsigned rhs }, 72 "include" => Proc.new { |obj,rhs| obj.set_include rhs }, 73 "exclude" => Proc.new { |obj,rhs| obj.set_exclude rhs }, 74 } 75 76 @@celltypes = { } # {celltype_name => [ BridgePlugin のインスタンスの配列 } 77 @@init_celltypes = { } # {celltype_name => [ BridgePlugin のインスタンスの配列 } 78 @@struct_list = { } # {struct_name=>StructType} 79 @@ptr_list = { } # {ptr_celltype_name=> @@TYPE_MAP の対応するもの} 80 @@VM_list = { } # VM_name => true 81 @@VM_celltypes = { } # VM_name => { @celltype_name => セルの配列 } 82 @@VM_struct_list = { } # {name=>StructType} 83 @@VM_ptr_list = { } # { VM_name => {name=> @@TYPE_MAP の対応するもの} } 84 @@TYPE_MAP = { # type_str class GET_SET 85 :char_t => [:char_t, "Char", :Char, :INT ], 86 :uchar_t => [:uchar_t, "UChar", :Char, :INT ], 87 :schar_t => [:schar_t, "SChar", :Char, :INT ], 88 89 :bool_t => [:bool_t, "Bool", :Bool, :BOOL ], 90 :int8_t => [:int8_t, "Int8", :Int, :INT ], 91 :int16_t => [:int16_t, "Int16", :Int, :INT ], 92 :int32_t => [:int32_t, "Int32", :Int, :INT ], 93 :int64_t => [:int64_t, "Int64", :Int, :INT ], 94 :uint8_t => [:uint8_t, "UInt8", :Int, :INT ], 95 :uint16_t => [:uint16_t, "UInt16", :Int, :INT ], 96 :uint32_t => [:uint32_t, "UInt32", :Int, :INT ], 97 :uint64_t => [:uint64_t, "UInt64", :Int, :INT ], 98 99 :int => [:int, "Int", :Int, :INT ], 100 :char => [:char, "Char", :Char, :INT ], # char は char_t として扱う 101 :short => [:short, "Short", :Int, :INT ], 102 :long => [:long, "Long", :Int, :INT ], 103 104 :"unsigned char" => [:uchar_t, "UChar", :Char, :INT ], 105 :"unsigned int" => [:"unsigned int", "UInt", :Int, :INT ], 106 :"unsigned short" => [:"unsigned short", "UShort", :Int, :INT ], 107 :"unsigned long" => [:"unsigned long", "ULong", :Int, :INT ], 108 :"signed char" => [:schar_t, "SChar", :Char, :INT ], 109 :"signed int" => [:int, "Int", :Int, :INT ], 110 :"signed short" => [:short, "Short", :Int, :INT ], 111 :"signed long" => [:long, "Long", :Int, :INT ], 112 113 :float32_t => [:float32_t, "Float32", :Float, :FLOAT ], 114 :double64_t => [:double64_t,"Double64", :Float, :FLOAT ], 115 116 :float => [:float, "Float32", :Float, :FLOAT ], 117 :double => [:double, "Double64", :Float, :FLOAT ] 118 } 119 120 # included or excluded functions 121 122 ### ロードされた時点で実行される ### 123 124 # -I に $(TECSPATH)/mruby を追加 125 # TECSGEN::Makefile.add_obj "$(MRUBY_MAIN_OBJ)" 126 TECSGEN::Makefile.add_ldflag "-lmruby -L$(MRUBYPATH)/lib -lm" 127 TECSGEN::Makefile.add_search_path "$(MRUBYPATH)/include" 128 TECSGEN::Makefile.add_var "MRUBYPATH", "..", "CHANGE this to suitable path" 129 # TECSGEN::Makefile.add_var "MRUBY_MAIN_OBJ", "$(_TECS_OBJ_DIR)tecs_mruby.o", "CHANGE this if your have your main" 130 131 132 #=== プラグインインスタンスの初期化 133 # 戻り値、引数の型が使用可能なものかチェックする 134 # 135 def initialize( signature, option ) 136 super 137 138 if ! $no_banner 139 STDERR << "MrubyBridgePlugin: version 1.2.0 (Suitable for mruby ver 1.2.0. Has backward compatibility with ver 1.1.0)\n" 140 end 141 142 @b_ignoreUnsigned = false 143 @includes = [] 144 @excludes = [] 145 @struct_list = { } 146 @ptr_list = { } 147 148 @plugin_arg_check_proc_tab = MrubyBridgePluginArgProc 149 parse_plugin_arg 150 151 @celltype_name = :"t#{@signature.get_global_name}" 152 @init_celltype_name = :"#{@celltype_name}_Initializer" 153 # this variable is sometimes not used. rhs coded directry. 154 @class_name = :"T#{@signature.get_global_name}" 155 156 @func_head_array = [] 157 if @includes.length > 0 && @excludes.length > 0 then 158 cdl_error( "MRB1011 both include && exclude are specified" ) 159 end 160 161 if signature.get_function_head_array == nil then 162 return # 以前に文法エラー発生 163 end 164 165 signature.get_function_head_array.each{ |func_head| 166 if @includes.length > 0 then 167 if @includes.index func_head.get_name then 168 dbgPrint "MrubyBridgePlugin: #{func_head.get_name} INCLUDED\n" 169 @func_head_array << func_head 170 else 171 dbgPrint "MrubyBridgePlugin: #{func_head.get_name} NOT included\n" 172 end 173 elsif @excludes.length > 0 then 174 if @excludes.index( func_head.get_name ) == nil then 175 dbgPrint "MrubyBridgePlugin: #{func_head.get_name} NOT excluded\n" 176 @func_head_array << func_head 177 else 178 dbgPrint "MrubyBridgePlugin: #{func_head.get_name} EXCLUDED\n" 179 end 180 else 181 @func_head_array << func_head 182 end 183 } 184 185 if @func_head_array.length == 0 then 186 cdl_error( "MRB1012 '$1' no function remained by exclude", @signature.get_name ) 187 end 188 189 check_name_and_return_type @func_head_array 190 check_parameter_type @func_head_array 191 192 end 193 194 #=== check function name & return type 195 def check_name_and_return_type func_head_array 196 b_init = false; b_init_cell = false 197 func_head_array.each{ |func_head| 198 if( func_head.get_name == :initialize )then 199 cdl_warning( "MRW2001 initialize: internally defined. change to initialize_cell in ruby" ) 200 b_init = true 201 elsif( func_head.get_name == :initialize_cell )then 202 b_init_cell = true 203 end 204 rtype = func_head.get_return_type.get_original_type 205 case rtype 206 when BoolType, IntType, FloatType, VoidType 207 else 208 cdl_error( "MRB1001 cannot return type $1", rtype.get_type_str ) 209 end 210 } 211 if( b_init && b_init_cell )then 212 cdl_warning( "MRB1002 initialize: internally defined. change to initialize_cell in ruby" ) 39 #== MrubyBridgePlugin クラス 40 class MrubyBridgePlugin < MultiPlugin 41 def self.get_plugin superClass 42 # case when (つまりは ===) では、期待したように一致しない模様 43 if superClass == SignaturePlugin then 44 dbgPrint "MrubyBridgePlugin: SignaturePlugin" 45 require_tecsgen_lib 'tecslib/plugin/MrubyBridgeSignaturePlugin.rb' 46 return MrubyBridgeSignaturePlugin 47 elsif superClass == CelltypePlugin 48 dbgPrint "MrubyBridgePlugin: CelltypePlugin" 49 require_tecsgen_lib 'tecslib/plugin/MrubyBridgeCelltypePlugin.rb' 50 return MrubyBridgeCelltypePlugin 51 elsif superClass == CompositePlugin 52 dbgPrint "MrubyBridgePlugin: CompositePlugin" 53 require_tecsgen_lib 'tecslib/plugin/MrubyBridgeCompositePlugin.rb' 54 return MrubyBridgeCompositePlugin 55 elsif superClass == CellPlugin 56 dbgPrint "MrubyBridgePlugin: CellPlugin" 57 require_tecsgen_lib 'tecslib/plugin/MrubyBridgeCellPlugin.rb' 58 return MrubyBridgeCellPlugin 59 #elsif superClass == ThroughPlugin 60 # return ThroughPlugin 61 #elsif superClass == DomainPlugin 62 # return DomainPlugin 63 else 64 dbgPrint "MrubyBridgePlugin: unsupported" 65 return nil 213 66 end 214 67 end 215 216 #=== check paramter type217 def check_parameter_type func_head_array218 # check type of parameters219 func_head_array.each{ |fh|220 fh.get_paramlist.get_items.each{ |param_decl|221 case param_decl.get_direction222 when :SEND, :RECEIVE223 cdl_error( "MRB1003 $1: $2 parameter cannot be used in mruby Bridge", param_decl.get_name, param_decl.get_direction.to_s.downcase )224 end225 type = param_decl.get_type226 type_org = type.get_original_type227 type_str = type.get_type_str + type.get_type_str_post228 229 b_ng = false230 case type_org231 when IntType232 case type_org.get_bit_size233 when 8, 16, 32, 64234 when -1, -2, -3, -4, -11235 else236 b_ng = true237 end238 when BoolType239 when FloatType240 when PtrType241 ttype_org = type_org.get_type # ポインタの指している先の型242 ttype = ttype_org.get_original_type # 上記の typedef されている場合、元の型243 register_ptr_type ttype_org244 245 if( type_org.get_string.to_s == "-1" ) then246 case param_decl.get_direction247 when :OUT, :INOUT248 cdl_error( "MRB9999 string specifier without length cannot be used for out & inout parameter")249 end250 end251 252 case ttype253 when IntType254 bit_size = ttype.get_bit_size255 # if bit_size < 0 && bit_size != -1 then256 # b_ng = true257 # end258 when FloatType259 when BoolType260 when StructType261 if( type_org.get_size || type_org.get_string || type_org.get_count ) then262 cdl_error( "MRB1004 $1: size_is, count_is, string cannot be specified for struct pointer", param_decl.get_name )263 end264 check_struct_member ttype_org265 else266 b_ng = true267 end268 when StructType269 check_struct_member type_org270 else # ArrayType, FuncType, EnumType, VoidType271 b_ng = true272 end273 if b_ng then274 cdl_error( "MRB1005 $1: type $2 cannot be used in mruby Bridge", param_decl.get_name, type_str )275 end276 }277 }278 end279 280 #=== 構造体のメンバーの型のチェック281 def check_struct_member struct_type282 #p "tag name:#{struct_type.get_name}"283 # sttype = Namespace.find_tag( struct_type.get_name )284 sttype = struct_type.get_original_type285 if sttype.get_name == nil then286 cdl_error( "MRB10007 tagless-struct cannot be handled")287 end288 sttype.get_members_decl.get_items.each { |d|289 t = d.get_type.get_original_type290 case t291 when IntType, FloatType, BoolType292 else293 cdl_error( "MRB1006 $1: type $2 not allowed for struct member", d.get_name, d.get_type.get_type_str + d.get_type.get_type_str_post )294 end295 }296 st_name = :"t{}"297 if @struct_list[ sttype.get_name ] == nil then298 # print_msg " MrubyBridgePlugin: [struct] #{struct_type.get_type_str} => class TECS::Struct#{sttype.get_name}\n"299 print " MrubyBridgePlugin: [struct] #{struct_type.get_type_str} => class TECS::Struct#{sttype.get_name}\n"300 @struct_list[ sttype.get_name ] = sttype301 end302 end303 304 def register_ptr_type ttype305 t_org = ttype.get_original_type306 tment = get_type_map_ent t_org307 if tment == nil then308 return309 cdl_error( "MRB1008 unknown pointer type '$1'", ttype.get_type_str )310 end311 ptr_celltype_name = :"t#{tment[1]}Pointer"312 if @@ptr_list[ ptr_celltype_name ] == nil then313 # print_msg " MrubyBridgePlugin: [pointer] #{ttype.get_type_str}* => class TECS::#{tment[1]}Pointer\n"314 print " MrubyBridgePlugin: [pointer] #{ttype.get_type_str}* => class TECS::#{tment[1]}Pointer\n"315 @@ptr_list[ ptr_celltype_name ] = tment316 end317 if @ptr_list[ ptr_celltype_name ] == nil then318 @ptr_list[ ptr_celltype_name ] = tment319 end320 end321 322 def get_type_map_ent ttype323 # structure type is registerd in check_struct_member324 if ttype.kind_of? StructType325 return326 end327 tstr = ttype.get_type_str.sub( /const /, "" ) # const は無視328 tstr = tstr.sub( /volatile /, "" ) # volatile も無視329 if @b_ignoreUnsigned then330 tstr = tstr.sub( /unsigned /, "" ) # volatile も無視331 tstr = tstr.sub( /uint/, "int" ) # volatile も無視332 tstr = tstr.sub( /[cs]char/, "char" ) # volatile も無視333 end334 return @@TYPE_MAP[ tstr.to_sym ]335 end336 337 #=== CDL ファイルの生成338 # typedef, signature, celltype, cell コードを生成339 #file:: FILE 生成するファイル340 def gen_cdl_file(file)341 342 # ブリッジセルタイプの生成343 if @@celltypes[ @celltype_name ] == nil then344 @@celltypes[ @celltype_name ] = [ self ]345 @@init_celltypes[ @init_celltype_name ] = true346 print_msg <<EOT347 MrubyBridgePlugin: [signature] #{@signature.get_namespace_path} => [celltype] nMruby::#{@celltype_name} => [class] TECS::#{@class_name}348 EOT349 350 file.print <<EOT351 import( <mruby.cdl> );352 353 /**** Ruby => TECS Bridge Celltype (MBP500) ****/354 namespace nMruby{355 // bridge celltype356 [idx_is_id,active] // not actually active, to avoid warning W1002, W1007357 celltype #{@celltype_name} {358 call #{@signature.get_namespace_path.to_s} cTECS;359 attr {360 [omit]361 char_t *VMname = "VM";362 };363 };364 // bridge initializer celltype365 celltype #{@init_celltype_name} {366 entry sInitializeTECSBridge eInitialize;367 };368 };369 EOT370 371 # 構造体セルタイプの生成372 @struct_list.each{ |name, sttype|373 if @@struct_list[ name ] == nil then374 file.print <<EOT375 namespace nMruby{376 [singleton]377 celltype #{name} {378 entry sInitializeTECSBridge eInitialize;379 };380 };381 EOT382 @@struct_list[ name ] = sttype383 end384 }385 386 else387 cdl_warning( "MRBW001 MrubyBridgePlugin: signature '$1' duplicate. ignored current one", @signature.get_namespace_path )388 @@celltypes[ @celltype_name ] << self389 end390 end391 392 #=== gen_cdl_file で定義したセルタイプに 新しいセルが定義された393 # cell のセルタイプの名前は @celltype_name394 def new_cell cell395 if cell.get_celltype.get_name != @celltype_name then396 return397 end398 399 join = cell.get_join_list.get_item :VMname400 if join then401 vm_name = CDLString.remove_dquote(join.get_rhs.to_s).to_sym402 else403 vm_name = :"VM"404 end405 406 if @@VM_list[ vm_name ] == nil then407 @@VM_list[ vm_name ] = true408 409 initializer_celltype_cdl = "#{$gen}/#{cell.get_name}Initializer.cdl"410 file = CFile.open( initializer_celltype_cdl, "w" )411 412 # TECS 初期化セル(プロトタイプ宣言)413 print_msg " MrubyBridgePlugin: join your VM's cInitialize to #{vm_name}_TECSInitializer.eInitialize\n"414 415 file.print <<EOT416 417 // prototype of TECSInitializer (MBP510)418 cell nMruby::tTECSInitializer #{vm_name}_TECSInitializer;419 EOT420 file.close421 422 Generator.parse( initializer_celltype_cdl, self )423 end424 425 if @@VM_celltypes[ vm_name ] then426 vma = @@VM_celltypes[ vm_name ]427 428 if vma[ @celltype_name ] then429 vma[ @celltype_name ] << cell430 else431 vma[ @celltype_name ] = [cell]432 @@VM_celltypes[ vm_name ] = vma433 end434 else435 vma = { }436 vma[ @celltype_name ] = [cell]437 @@VM_celltypes[ vm_name ] = vma438 end439 440 @struct_list.each{ |stname, sttype|441 if @@VM_struct_list[ vm_name ] then442 @@VM_struct_list[ vm_name ][ sttype.get_name ] = sttype443 else444 @@VM_struct_list[ vm_name ] = { sttype.get_name => sttype }445 end446 }447 @ptr_list.each{ |ptr_celltype_name, tment|448 if @@VM_ptr_list[ vm_name ] then449 @@VM_ptr_list[ vm_name ][ ptr_celltype_name ] = tment450 else451 @@VM_ptr_list[ vm_name ] = { ptr_celltype_name => tment }452 end453 }454 455 end456 457 #=== プラグインが CDL の POST コードを生成458 # tmp_plugin_post_code.cdl への出力459 def self.gen_post_code file460 461 # file.print <<EOT462 # namespace nMruby {463 # EOT464 #465 # @@ptr_list.each{ |name,tment|466 # file.print <<EOT467 #468 # // MBP600469 # [singleton]470 # celltype #{name} {471 # entry sInitializeTECSBridge eInitialize;472 # };473 # EOT474 # }475 #476 # file.print <<EOT477 # };478 # EOT479 480 # gen_post_code で生成した celltype は gen_ep_func が呼び出されない #847481 # @@struct_list.each{ |name,sttype|482 # file.print <<EOT483 #484 # [singleton]485 # celltype #{name} {486 # entry sInitializeTECSBridge eInitialize;487 # };488 #EOT489 # }490 491 file.print " // MBP601\n"492 @@VM_celltypes.each{ |vm_name, instance_list|493 instance_list.each { |celltype_name, array|494 cell = array[0]495 if cell.get_celltype then496 ct_name = cell.get_celltype.get_name497 file.print <<EOT498 cell nMruby::#{ct_name}_Initializer #{vm_name}_#{ct_name}_Initializer{ };499 EOT500 end501 }502 }503 504 file.print " // MBP602\n"505 @@ptr_list.each{ |name,tment|506 file.print <<EOT507 cell nMruby::#{name} C#{name} { };508 EOT509 }510 511 file.print " // MBP603\n"512 @@struct_list.each{ |name,sttype|513 file.print <<EOT514 cell nMruby::#{name} C#{name} { };515 EOT516 }517 518 if @@VM_celltypes == nil519 raise "are0"520 end521 @@VM_celltypes.each{ |vm_name, instance_list|522 file.print " /* === VM #{vm_name} === (MBP610) */\n"523 init_cell_name = "#{vm_name}_TECSInitializer"524 525 file.print " cell nMruby::tTECSInitializer #{init_cell_name} {\n"526 527 instance_list.each { |celltype_name, array|528 array.each{ |cell|529 ct_name = cell.get_celltype.get_name530 file.print " cInitialize[] = #{vm_name}_#{ct_name}_Initializer.eInitialize;\n"531 }532 }533 if @@VM_ptr_list[vm_name] then534 @@VM_ptr_list[vm_name].each{ |name, tment|535 file.print " cInitialize[] = C#{name}.eInitialize;\n"536 }537 end538 if @@VM_struct_list[vm_name] then539 @@VM_struct_list[vm_name].each{ |name, sttype|540 file.print " cInitialize[] = C#{name}.eInitialize;\n"541 }542 end543 file.print " };"544 }545 546 end547 548 ####### 以下コード生成段階 ######549 550 #=== 受け口関数の本体コードを生成(頭部と末尾は別途出力)551 #ct_name:: Symbol (プラグインで生成された) セルタイプ名 .Symbol として送られてくる552 def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )553 if @@celltypes[ ct_name ] then554 gen_ep_func_body_bridge( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )555 elsif @@init_celltypes[ ct_name ] then556 gen_ep_func_body_bridge_init( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )557 elsif @@ptr_list[ ct_name ] then558 gen_ep_func_body_ptr( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )559 elsif @@struct_list[ ct_name ] then560 gen_ep_func_body_struct( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )561 else562 raise "Unknown #{ct_name}"563 end564 end565 566 def gen_ep_func_body_bridge( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )567 raise "unexpected "568 end569 570 def gen_ep_func_body_bridge_init( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )571 file.print <<EOT572 CELLCB *p_cellcb = GET_CELLCB( idx ); /* no error check */ /* MBP700 */573 struct RClass *rc;574 575 rc = mrb_define_class_under( mrb, TECS, \"#{@class_name}\", mrb->object_class );576 mrb_define_method( mrb, rc, "initialize", MrubyBridge_#{@celltype_name}_initialize, MRB_ARGS_REQ(1) );577 MRB_SET_INSTANCE_TT(rc, MRB_TT_DATA);578 EOT579 580 @func_head_array.each{ |f|581 if ! f.is_function? then582 next583 end584 if f.get_name != :initialize then585 func_name = f.get_name586 else587 func_name = :initialize_cell588 end589 590 ret_type = f.get_return_type591 n_param = 0592 f.get_paramlist.get_items.each{ |param|593 case param.get_direction594 when :IN, :INOUT, :OUT595 n_param += 1596 when :SEND, :RECEIVE597 raise "send, receive"598 end599 }600 if n_param > 0 then601 p_str = "MRB_ARGS_REQ( #{n_param} )"602 else603 p_str = "MRB_ARGS_NONE()"604 end605 file.print <<EOT606 mrb_define_method( mrb, rc, "#{func_name}", MrubyBridge_#{@celltype_name}_#{func_name}, #{p_str} );607 EOT608 }609 end610 611 def gen_ep_func_body_ptr( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )612 613 t = @@ptr_list[ct_name]614 type = t[1]615 file.print <<EOT616 struct RClass *a; /* MBP710 */617 618 a = mrb_define_class_under(mrb, TECS, "#{type}Pointer", mrb->object_class);619 MRB_SET_INSTANCE_TT(a, MRB_TT_DATA);620 621 mrb_define_method(mrb, a, "initialize", #{type}Pointer_initialize, MRB_ARGS_REQ(1));622 mrb_define_method(mrb, a, "[]", #{type}Pointer_aget, MRB_ARGS_REQ(1));623 mrb_define_method(mrb, a, "value", #{type}Pointer_get_val, MRB_ARGS_NONE());624 mrb_define_method(mrb, a, "[]=", #{type}Pointer_aset, MRB_ARGS_REQ(2));625 mrb_define_method(mrb, a, "value=", #{type}Pointer_set_val, MRB_ARGS_REQ(1));626 mrb_define_method(mrb, a, "size", #{type}Pointer_size, MRB_ARGS_NONE());627 mrb_define_method(mrb, a, "length", #{type}Pointer_size, MRB_ARGS_NONE());628 EOT629 630 if t[2] == :Char then631 file.print <<EOT632 mrb_define_method(mrb, a, "to_s", CharPointer_to_s, MRB_ARGS_NONE());633 mrb_define_method(mrb, a, "from_s", CharPointer_from_s, MRB_ARGS_REQ(1));634 EOT635 end636 end637 638 def gen_ep_func_body_struct( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )639 tag = ct_name640 structType = @@struct_list[ tag ]641 file.print <<EOT642 struct RClass *a; /* MBP720 */643 644 a = mrb_define_class_under(mrb, TECS, "Struct#{tag}", mrb->object_class);645 MRB_SET_INSTANCE_TT(a, MRB_TT_DATA);646 647 mrb_define_method(mrb, a, "initialize", Struct_#{tag}_initialize, MRB_ARGS_NONE());648 EOT649 650 structType.get_members_decl.get_items.each{ |d|651 file.print " STRUCT_INIT_MEMBER( #{tag}, #{d.get_name} )\n"652 }653 end654 655 #=== 受け口関数の preamble (C言語)を生成する656 # 必要なら preamble 部に出力する657 #file:: FILE 出力先ファイル658 #b_singleton:: bool true if singleton659 #ct_name:: Symbol660 #global_ct_name:: string661 def gen_preamble( file, b_singleton, ct_name, global_ct_name )662 if @@celltypes[ ct_name ] then663 gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )664 gen_preamble_instance( file, b_singleton, ct_name, global_ct_name )665 gen_preamble_instance_initialize( file, b_singleton, ct_name, global_ct_name )666 gen_preamble_bridge_func( file, b_singleton, ct_name, global_ct_name )667 elsif @@init_celltypes[ ct_name ] then668 gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )669 gen_preamble_instance_proto( file, b_singleton, ct_name, global_ct_name )670 elsif @@ptr_list[ ct_name ] then671 gen_preamble_ptr( file, b_singleton, ct_name, global_ct_name )672 elsif @@struct_list[ ct_name ] then673 gen_preamble_struct( file, b_singleton, ct_name, global_ct_name )674 else675 raise "Unknown #{ct_name}"676 end677 end678 679 def gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )680 file.print <<EOT681 /* MBP: MrubyBridgePlugin: MBP000 */682 #include "mruby.h"683 #include "mruby/class.h"684 #include "mruby/data.h"685 #include "mruby/string.h"686 #include "TECSPointer.h"687 #include "TECSStruct.h"688 689 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)690 #define DLLEXPORT __declspec(dllexport)691 #else692 #define DLLEXPORT693 #endif694 695 #ifndef NULL696 #define NULL 0697 #endif698 EOT699 end700 701 def gen_preamble_instance( file, b_singleton, ct_name, global_ct_name )702 file.print <<EOT703 704 /* RData MBP001 */705 static void706 #{@celltype_name}_free( mrb_state *mrb, void *p )707 {708 if( p )709 (void)mrb_free( mrb, p );710 }711 712 /* RData MBP002 */713 struct mrb_data_type data_type_#{@celltype_name} =714 {715 "#{@celltype_name}",716 #{@celltype_name}_free717 };718 719 /* RData MBP003 */720 struct tecs_#{@celltype_name} {721 CELLCB *cbp;722 };723 724 /* name_to_cbp MBP010 */725 const struct name_to_cbp_#{@celltype_name} {726 char *name; /* Cell Name */727 CELLCB *cbp;728 } Name_to_cbp_#{@celltype_name}[] = {729 EOT730 731 # mikan namespace732 nsp = NamespacePath.new( :nMruby, true )733 nsp.append! ct_name734 ct = Namespace.find nsp735 736 ct.get_cell_list.each{ |cell|737 if cell.is_generate? then738 name_array = ct.get_name_array( cell )739 file.print "\t{ \"#{cell.get_name}\", #{name_array[8]} },\n"740 end741 }742 743 file.print <<EOT744 \t{ 0, 0 },745 };746 747 EOT748 749 end750 751 def gen_preamble_ptr( file, b_singleton, ct_name, global_ct_name )752 tment = @@ptr_list[ ct_name ]753 file.print <<EOT754 755 GET_SET_#{tment[3]}( #{tment[1]}, #{tment[0]} )756 POINTER_CLASS( #{tment[1]}, #{tment[0]} )757 EOT758 end759 760 def gen_preamble_struct( file, b_singleton, ct_name, global_ct_name )761 tag = ct_name762 structType = @@struct_list[ tag ]763 file.print <<EOT764 /* struct #{tag} */765 STRUCT_CLASS( #{tag} )766 EOT767 768 structType.get_members_decl.get_items.each{ |d|769 type = d.get_type.get_original_type770 case type771 when IntType, CIntType772 bit_size = type.get_bit_size773 case bit_size774 when -11, -1775 tType = "Char"776 ttype = "char"777 when -2778 tType = "Short"779 ttype = "short"780 when -3781 tType = "Int"782 ttype = "int"783 when -4784 tType = "Long"785 ttype = "long"786 when -5787 tType = "IntPtr"788 ttype = "intptr"789 when 8, 16, 32, 64790 tType = "Int#{bit_size}"791 ttype = "int#{bit_size}"792 else793 raise "cannot handle bit_size #{bit_size}"794 end795 file.print "MEMBER_GET_SET_INT( #{tag}, #{d.get_name}, #{tType}, #{ttype} )\n"796 when FloatType, CFloatType797 file.print "MEMBER_GET_SET_FLOAT( #{tag}, #{d.get_name} )\n"798 else799 raise "cannot handle type"800 end801 }802 803 end804 805 def gen_preamble_instance_proto( file, b_singleton, ct_name, global_ct_name )806 file.print <<EOT807 // Prototype MBP400808 mrb_value MrubyBridge_#{@celltype_name}_initialize( mrb_state *mrb, mrb_value self);809 EOT810 811 @func_head_array.each{ |f|812 if ! f.is_function? then813 next814 end815 if f.get_name != :initialize then816 func_name = f.get_name817 else818 func_name = :initialize_cell819 end820 821 ret_type = f.get_return_type822 ret_type0 = f.get_return_type.get_original_type823 b_void = ret_type0.is_void?824 plist = f.get_paramlist.get_items825 826 file.print <<EOT827 mrb_value MrubyBridge_#{@celltype_name}_#{func_name}( mrb_state *mrb, mrb_value self );828 EOT829 }830 end831 832 def gen_preamble_instance_initialize( file, b_singleton, ct_name, global_ct_name )833 file.print <<EOT834 835 /* MBP100 */836 mrb_value837 MrubyBridge_#{@celltype_name}_initialize( mrb_state *mrb, mrb_value self)838 {839 mrb_value name;840 struct tecs_#{@celltype_name} *tecs_cb;841 const struct name_to_cbp_#{@celltype_name} *ntc;842 843 /* set DATA_TYPE earlier to avoid SEGV */844 DATA_TYPE( self ) = &data_type_#{@celltype_name};845 846 mrb_get_args(mrb, "o", &name );847 if( mrb_type( name ) != MRB_TT_STRING ){848 mrb_raise(mrb, E_NAME_ERROR, "cell name not string");849 }850 for( ntc = &Name_to_cbp_#{@celltype_name}[0]; ntc->name != NULL; ntc++ ){851 if( strcmp( ntc->name, RSTRING_PTR( name ) ) == 0 )852 break;853 }854 if( ntc->name == 0 ){855 mrb_raise(mrb, E_ARGUMENT_ERROR, "cell not found");856 }857 tecs_cb = (struct tecs_#{@celltype_name} *)mrb_malloc(mrb, sizeof(struct tecs_#{@celltype_name}) );858 tecs_cb->cbp = ntc->cbp;859 DATA_PTR( self ) = (void *)tecs_cb;860 861 return self;862 }863 EOT864 end865 866 def gen_preamble_bridge_func( file, b_singleton, ct_name, global_ct_name )867 868 @func_head_array.each{ |f|869 if ! f.is_function? then870 next871 end872 if f.get_name != :initialize then873 func_name = f.get_name874 else875 func_name = :initialize_cell876 end877 878 ret_type = f.get_return_type879 ret_type0 = f.get_return_type.get_original_type880 b_void = ret_type0.is_void?881 plist = f.get_paramlist.get_items882 883 file.print <<EOT884 885 /* bridge function (MBP101) */886 mrb_value887 MrubyBridge_#{ct_name}_#{func_name}( mrb_state *mrb, mrb_value self )888 {889 /* cellcbp (MBP105) */890 CELLCB *p_cellcb = ((struct tecs_#{@celltype_name} *)DATA_PTR(self))->cbp;891 EOT892 893 file.print " /* variables for return & parameter (MBP110) */\n"894 if ! b_void then895 file.print " ", ret_type.get_type_str, "\tret_val", ret_type.get_type_str_post, ";\n"896 end897 arg_str = ""898 n_param = 0899 n_scalar = 0900 n_ptr = 0901 n_struct = 0902 plist.each{ |param|903 case param.get_direction904 when :IN, :INOUT, :OUT905 type = param.get_type.get_original_type906 case type907 when IntType908 file.print " mrb_int mrb_", param.get_name, ";\n"909 file.print " #{param.get_type.get_type_str} #{param.get_name}#{param.get_type.get_type_str_post};\n"910 arg_str += "i"911 n_param += 1912 n_scalar += 1913 when FloatType914 file.print " mrb_float mrb_", param.get_name, ";\n"915 file.print " #{param.get_type.get_type_str} #{param.get_name}#{param.get_type.get_type_str_post};\n"916 arg_str += "f"917 n_param += 1918 n_scalar += 1919 when BoolType920 file.print " mrb_value mrb_", param.get_name, ";\n"921 file.print " #{param.get_type.get_type_str} #{param.get_name}#{param.get_type.get_type_str_post};\n"922 arg_str += "o"923 n_param += 1924 n_scalar += 1925 when PtrType926 file.print " mrb_value mrb_", param.get_name, ";\n"927 file.print " #{param.get_type.get_type_str} #{param.get_name}#{param.get_type.get_type_str_post};\n"928 arg_str += "o"929 n_param += 1930 n_ptr += 1931 when StructType932 file.print " mrb_value mrb_", param.get_name, ";\n"933 file.print " #{param.get_type.get_type_str} *#{param.get_name}#{param.get_type.get_type_str_post};\n"934 arg_str += "o"935 n_param += 1936 n_struct += 1937 else938 raise "Unkown type"939 end940 end941 }942 943 if n_param > 0 then944 file.print " /* retrieve arguments (MBP111) */\n"945 file.print " mrb_get_args(mrb, \"#{arg_str}\""946 plist.each{ |param|947 case param.get_direction948 when :IN, :INOUT, :OUT949 type = param.get_type.get_original_type950 case type951 when IntType952 file.print ", &mrb_", param.get_name953 when FloatType954 file.print ", &mrb_", param.get_name955 when BoolType956 file.print ", &mrb_", param.get_name957 when PtrType958 file.print ", &mrb_", param.get_name959 when StructType960 file.print ", &mrb_", param.get_name961 else962 raise "Unkown type"963 end964 end965 }966 file.print " );\n"967 968 if n_scalar > 0 || n_struct > 0 then969 file.print " /* convert mrb to C (MBP112) */\n"970 end971 plist.each{ |param|972 case param.get_direction973 when :IN, :INOUT, :OUT974 type = param.get_type.get_original_type975 case type976 when IntType977 ttype = type.get_original_type978 tment = get_type_map_ent ttype979 file.print " VALCHECK_#{tment[1]}( mrb, mrb_#{param.get_name} );\n"980 file.print " #{param.get_name} = (#{param.get_type.get_type_str})mrb_#{param.get_name};\n"981 when FloatType982 file.print " #{param.get_name} = (#{param.get_type.get_type_str})mrb_#{param.get_name};\n"983 when BoolType984 file.print " #{param.get_name} = mrb_test( mrb_#{param.get_name} );\n"985 when PtrType986 ttype = type.get_type.get_original_type987 case ttype988 when StructType989 file.print " CHECK_STRUCT( #{ttype.get_name}, mrb_#{param.get_name} );\n"990 file.print " #{param.get_name} = (struct #{ttype.get_name}*)DATA_PTR(mrb_#{param.get_name});\n"991 when IntType992 when FloatType993 when BoolType994 else995 raise "cannot handle type"996 end997 when StructType998 file.print " CHECK_STRUCT( #{type.get_name}, mrb_#{param.get_name} );\n"999 file.print " #{param.get_name} = (struct #{type.get_name}*)DATA_PTR(mrb_#{param.get_name});\n"1000 else1001 raise( "canot treat class" )1002 end1003 end1004 }1005 1006 if n_ptr > 0 then1007 file.print " /* convert mrb to C for pointer types (MBP113) */\n"1008 end1009 plist.each{ |param|1010 case param.get_direction1011 when :IN, :INOUT, :OUT1012 type = param.get_type.get_original_type1013 case type1014 when IntType1015 when FloatType1016 when BoolType1017 when PtrType1018 case type.get_type.get_original_type1019 when StructType1020 when IntType1021 ptrMrb2C file, type, param1022 when FloatType1023 ptrMrb2C file, type, param1024 when BoolType1025 ptrMrb2C file, type, param1026 else1027 raise "cannot handle type"1028 end1029 when StructType1030 else1031 raise( "canot treat class" )1032 end1033 end1034 }1035 1036 end1037 1038 file.print " /* calling target (MBP120) */\n"1039 if ! b_void then1040 file.print " ret_val = "1041 else1042 file.print " "1043 end1044 delim = ""1045 file.print "cTECS_", f.get_name, "( "1046 plist.each{ |param|1047 if param.get_type.get_original_type.kind_of? StructType then1048 aster = "*"1049 else1050 aster = ""1051 end1052 file.print delim, aster, param.get_name1053 delim = ", "1054 }1055 file.print " );\n"1056 1057 file.print " /* return (MBP130) */\n"1058 case ret_type01059 when BoolType1060 file.print " return ret_val ? mrb_true_value() : mrb_false_value();\n"1061 when IntType1062 file.print " return mrb_fixnum_value( ret_val );\n"1063 when FloatType1064 file.print " return mrb_float_value( mrb, ret_val );\n"1065 when VoidType1066 file.print " return mrb_nil_value();\n"1067 else1068 raise "unknown type"1069 end1070 1071 file.print "}\n"1072 }1073 end1074 1075 def ptrMrb2C file, type, param1076 ttype = type.get_type.get_original_type1077 tment = get_type_map_ent ttype1078 tstr = tment[1]1079 =begin1080 case ttype1081 when IntType1082 bit_size = ttype.get_bit_size1083 case bit_size1084 when -1, -111085 tstr = "Char"1086 when 8, 16, 32, 641087 tstr = "Int#{bit_size}"1088 when -21089 tstr = "Short"1090 when -31091 tstr = "Int"1092 when -41093 tstr = "Long"1094 when -51095 tstr = "IntPtr"1096 else1097 raise "not handle type"1098 end1099 when FloatType1100 if ttype.get_bit_size == 32 then1101 tstr = "Float32"1102 else1103 tstr = "Double64"1104 end1105 when BoolType1106 tstr = "Bool"1107 when StructType1108 raise "not handle type 2 #{ttype}"1109 else1110 raise "not handle type 2 #{ttype}"1111 end1112 =end1113 if( param.get_size ) then1114 sz_str = param.get_size.to_s1115 elsif param.get_string then # mikan とりあえず size_is と string の同時指定 (二重ポインタ) はなし1116 sz_str = param.get_string.to_s1117 else1118 sz_str = "1"1119 end1120 # unsigned 型の場合には cast が必要1121 if ttype.get_original_type.get_type_str != param.get_type.get_type.get_type_str then1122 cast_str = "(#{param.get_type.get_type_str})"1123 else1124 cast_str = ""1125 end1126 1127 modify = ""1128 case param.get_direction1129 when :OUT, :INOUT1130 case tstr1131 when "Char", "SChar", "UChar"1132 modify = "Mod"1133 end1134 end1135 if param.is_nullable? then1136 nullable = "Nullable"1137 else1138 nullable = ""1139 end1140 1141 # file.print " CHECK_POINTER( #{tstr}, mrb_#{param.get_name}, #{sz_str} );\n"1142 # file.print " #{param.get_name} = #{cast_str}((struct #{tstr}PointerBody*)(DATA_PTR(mrb_#{param.get_name})))->buf;\n"1143 file.print " #{param.get_name} = CheckAndGet#{tstr}Pointer#{modify}#{nullable}( mrb, mrb_#{param.get_name}, #{sz_str} );\n"1144 end1145 1146 def get_celltype_name1147 @celltype_name1148 end1149 1150 #=== プラグイン引数 ignoreUnsigned1151 def set_ignoreUnsigned rhs1152 if rhs == "true" || rhs == nil then1153 @b_ignoreUnsigned = true1154 end1155 end1156 #=== プラグイン引数 include1157 def set_include rhs1158 funcs = rhs.split ','1159 funcs.each{ |rhs_func|1160 found = false1161 rhs_func.gsub!( /\s/, "" )1162 @signature.get_function_head_array.each{ |a|1163 if rhs_func.to_sym == a.get_name then1164 found = true1165 end1166 }1167 if found == false then1168 cdl_error( "MRB1009 include function '$1' not found in signagture '$2'", rhs, @signature.get_name )1169 else1170 @includes << rhs_func.to_sym1171 end1172 }1173 end1174 #=== プラグイン引数 exclude1175 def set_exclude rhs1176 funcs = rhs.split ','1177 funcs.each{ |rhs_func|1178 found = false1179 rhs_func.gsub!( /\s/, "" )1180 @signature.get_function_head_array.each{ |a|1181 if rhs_func.to_sym == a.get_name then1182 found = true1183 end1184 }1185 if found == false then1186 cdl_error( "MRB1010 exclude function '$1' not found in signagture '$2", rhs, @signature.get_name )1187 else1188 @excludes << rhs_func.to_sym1189 end1190 }1191 end1192 68 end 1193 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/NotifierPlugin.rb
r321 r429 1 1 # -*- coding: utf-8 -*- 2 # 3 # TECS Generator 4 # Generator for TOPPERS Embedded Component System 2 5 # 3 6 # Copyright (C) 2015 by Ushio Laboratory … … 5 8 # Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory 6 9 # Graduate School of Information Science, Nagoya Univ., JAPAN 10 # Copyright (C) 2015-2018 by TOPPERS Project 7 11 # 12 #-- 13 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ 14 # ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改 15 # 変・再配布(以下,利用と呼ぶ)することを無償で許諾する. 16 # (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 17 # 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 18 # スコード中に含まれていること. 19 # (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 20 # 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 21 # 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 22 # の無保証規定を掲載すること. 23 # (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 24 # 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 25 # と. 26 # (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 27 # 作権表示,この利用条件および下記の無保証規定を掲載すること. 28 # (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 29 # 報告すること. 30 # (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 31 # 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 32 # また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理 33 # 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを 34 # 免責すること. 35 # 36 # 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 37 # よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的 38 # に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ 39 # アの利用により直接的または間接的に生じたいかなる損害に関しても,そ 40 # の責任を負わない. 41 # 42 # $Id$ 43 #++ 8 44 9 45 NotifierPluginArgProc = { … … 31 67 # - 受け口関数 - 一般化を行うと,実行時コストが大きく増大してしまうことが 32 68 # 確認されている.このため,一般化は行わない.EntryPropertyにも含めない. 33 # - セルインデックス - CELLIDX型で,型の規定はないが," ポインタ値であったり34 # 整数値 であったりする。" (TECS 5.3.6) より,インデックスかポインタある69 # - セルインデックス - CELLIDX型で,型の規定はないが,"ホ゜インタ値て゛あったり 70 # 整数値て゛あったりする。" (TECS 5.3.6) より,インデックスかポインタある 35 71 # ことが分かる.インデックスだとすると,この値はセルCBのアドレッシングに 36 72 # 使用されるので,intptr_tに収まる筈である.ポインタの場合,当然intptr_t … … 58 94 # - アダプタ関数へののポインタ 59 95 # - アダプタ関数の引数 96 # 97 # $Id$ 60 98 61 99 # @private … … 126 164 # @param [Cell, Symbol] cell セル.セルについて一般化する場合は `:generic` 127 165 # @param [Integer, Symbol, nil] subscript 添字.添字について一般化する場合は `:generic` 166 # @param [Celltype] 呼び先のセルタイプ、cell==:generic の場合のみ有効 128 167 # @private 129 def generate_inner(context, fn_name, cell, subscript )168 def generate_inner(context, fn_name, cell, subscript, callee_ct=nil) 130 169 source_file = context.source_file 131 170 header_file = context.header_file … … 139 178 unless ct.is_singleton? 140 179 if cell == :generic 141 params << "(CELLIDX)extinf" 180 params << "(#{callee_ct.get_global_name}_IDX)extinf" 181 # params << "(CELLIDX)extinf" 142 182 else 143 183 # セルのCELLIDXを得る … … 231 271 232 272 generate_inner context, fn_name, 233 :generic, subscript 273 :generic, subscript, ct 234 274 235 275 props.each { |prop| … … 443 483 # join:: Join : 結合 (declarationがPortであるもの) 444 484 def validate_join(handler, cell, join) 445 485 return !generate_attr_map(handler, cell).nil? 446 486 end 447 487 … … 870 910 parse_plugin_arg 871 911 unless @factory 872 cdl_error(" ASP1003 celltype $1: option factory is not specified",912 cdl_error("NTF1003 celltype $1: option factory is not specified", 873 913 celltype.get_name) 874 914 end 875 915 unless @output_file 876 cdl_error(" ASP1003 celltype $1: option output_file is not specified",916 cdl_error("NTF1003 celltype $1: option output_file is not specified", 877 917 celltype.get_name) 878 918 end … … 881 921 def set_factory(template_string) 882 922 unless @factory.nil? 883 cdl_error(" ASP1003 celltype $1: option factory was specified more than once",923 cdl_error("NTF1003 celltype $1: option factory was specified more than once", 884 924 celltype.get_name) 885 925 end … … 889 929 def set_factory_output_file(output_file) 890 930 unless @output_file.nil? 891 cdl_error(" ASP1003 celltype $1: option output_file was specified more than once",931 cdl_error("NTF1003 celltype $1: option output_file was specified more than once", 892 932 celltype.get_name) 893 933 end … … 896 936 897 937 def gen_factory file 898 puts "===== begin #{@celltype.get_name.to_s} plugin ====="938 # puts "===== begin #{@celltype.get_name.to_s} plugin =====" 899 939 900 940 kernelCfg = AppFile.open( "#{$gen}/#{@output_file}" ) … … 920 960 subst_attr = @celltype.find(name) 921 961 unless subst_attr 922 cdl_error( " ASP1007 celltype $1: additional_param: attribute $2 does not exist.",962 cdl_error( "NTF1007 celltype $1: additional_param: attribute $2 does not exist.", 923 963 @celltype.get_name, name) 924 964 end … … 933 973 934 974 kernelCfg.close 935 puts "===== end #{@celltype.get_name.to_s} plugin ====="975 # puts "===== end #{@celltype.get_name.to_s} plugin =====" 936 976 end 937 977 938 978 def gen_factory_for_cell(kernelCfg, cell) 979 # print "########## gen_factory_for_cell cell=#{cell.get_name}\n" 939 980 handler_flags = [] 940 981 handler_args = [] … … 957 998 when 'false' then ignoreErrors = false 958 999 else 959 cdl_warning ( "ASP1005 cell $1: unrecognized value '$2' specified for ignoreErrors",1000 cdl_warning2( cell.get_locale, "NTF1005 cell $1: unrecognized value '$2' specified for ignoreErrors", 960 1001 cell.get_name, ignoreErrors ) 961 1002 ignoreErrors = false 962 1003 end 963 1004 1005 # ドメイン指定用文字列 1006 pre_text = "" 1007 post_text = "\n" 1008 indent = "" 1009 964 1010 [EVENT_HANDLER, ERROR_HANDLER].each { |handler| 965 1011 # 呼び口の結合を取得 966 1012 call_join = cell.get_join_list.get_item(handler.call_port_name.to_sym) 1013 domain_root = cell.get_region.get_domain_root 1014 if cell.get_region.get_domain_root.get_domain_type then 1015 # print "cell=#{cell.get_name} domain_root=#{domain_root.get_name} domain_type=#{domain_root.get_domain_type.get_name} domain_option=#{domain_root.get_domain_type.get_option}\n" 1016 else 1017 # print "cell=#{cell.get_name} domain_root=#{cell.get_region.get_domain_root.get_name}\n" 1018 end 1019 if call_join 1020 # print "validate_join: hanlder=#{handler.class.name} cell=#{cell.get_name} join=#{call_join.get_name} rhs_cell=#{call_join.get_cell}\n" 1021 else 1022 # print "validate_join: hanlder=#{handler.class.name} cell=#{cell.get_name}\n" 1023 end 967 1024 968 1025 # ハンドラタイプを判別する … … 972 1029 973 1030 if matches.length == 0 974 cdl_error ( "ASP1001 cell $1: no matching handler type found for $2", cell.get_name, handler.call_port_name )1031 cdl_error2( cell.get_locale, "NTF1001 cell $1: no matching handler type found for $2", cell.get_name, handler.call_port_name ) 975 1032 next 976 1033 end 977 1034 978 1035 # 最初に見つかった有効なハンドラタイプを使用 979 1036 ht = matches[0] 1037 1038 # ドメインプラグインが指定されている場合、所属ドメインのチェック 1039 domain_root = cell.get_region.get_domain_root 1040 if domain_root.get_domain_type then 1041 if domain_root.get_domain_type.get_name == :HRP then 1042 option = domain_root.get_domain_type.get_option 1043 matches.each{ |match| 1044 # p "match:#{match}" 1045 case match 1046 when ActivateTaskHandlerType, WakeUpTaskHandlerType, 1047 SetVariableHandlerType, SetVariableToErrorCodeHandlerType, 1048 IncrementVariableHandlerType, SignalSemaphoreHandlerType, 1049 SetEventflagHandlerType, SendToDataqueueHandlerType, 1050 SendErrorCodeToDataqueueHandlerType 1051 if option == "OutOfDomain" then 1052 cdl_error2( cell.get_locale, "NTF9999: NotifierPlugin: $1 cannot be placed out of domain", cell.get_name ) 1053 elsif call_join.get_cell.get_region.get_domain_root == nil || 1054 call_join.get_cell.get_region.get_domain_root != domain_root then 1055 cdl_error2( cell.get_locale, "NTF9999: NotifierPlugin: $1 and $2 must be placed in same domain", cell.get_name, call_join.get_cell.get_name ) 1056 end 1057 dbgPrint "#{self.class.name}: match pattern 1.\n" 1058 when UserHandlerType 1059 if option != "kernel" then 1060 cdl_error2( cell.get_locale, "NTF9999: NotifierPlugin: $1 can be placed in kernel domain only, because notify target is handler", cell.get_name ) 1061 elsif call_join.get_cell.get_region.get_domain_root == nil || 1062 call_join.get_cell.get_region.get_domain_root != domain_root then 1063 cdl_error2( cell.get_locale, "NTF9999: NotifierPlugin: $1 and $2 must be placed in same domain", cell.get_name, call_join.get_cell.get_name ) 1064 end 1065 dbgPrint "#{self.class.name}: match pattern 2.\n" 1066 when NullHandlerType.new # エラー通知を指定していない 1067 dbgPrint "#{self.class.name}: match pattern 3.\n" 1068 end 1069 } 1070 1071 # if cell.get_region.get_param == :KERNEL_DOMAIN 1072 if option == "kernel" 1073 pre_text = "KERNEL_DOMAIN{\n" 1074 post_text = "}\n" 1075 indent = "\t" 1076 elsif option != "OutOfDomain" then 1077 pre_text = "DOMAIN(#{domain_root.get_name.to_s}){\n" 1078 post_text = "}\n" 1079 indent = "\t" 1080 end 1081 else 1082 cdl_error( "NTF9999: NotifierPlugin: unknown domain type $1", domain_root.get_domain_type.get_name ) 1083 end 1084 1085 end 980 1086 981 1087 # 通知ハンドラで「エラーが発生するはずがない」のに「エラーハンドラが指定されている」 … … 984 1090 # なため、検出は行わない。) 985 1091 if handler == ERROR_HANDLER && !ht.is_a?(NullHandlerType) && !event_handler_might_fail 986 cdl_error ( "ASP1004 cell $1: handler type $2 which never raises an error was inferred for the normal notification handler, but an error notification handler was specified.",1092 cdl_error2( cell.get_locale, "NTF1004 cell $1: handler type $2 which never raises an error was inferred for the normal notification handler, but an error notification handler was specified.", 987 1093 cell.get_name, handler_flag) 988 1094 end 989 1095 if handler == ERROR_HANDLER && ht.is_a?(NullHandlerType) && event_handler_might_fail && !ignoreErrors 990 cdl_warning ( "ASP1006 cell $1: handler type $2 which might raise an error was inferred for the normal notificaton handler, but an error notification handler was not specified.",1096 cdl_warning2( cell.get_locale, "NTF1006 cell $1: handler type $2 which might raise an error was inferred for the normal notificaton handler, but an error notification handler was not specified.", 991 1097 cell.get_name, handler_flag) 992 1098 end … … 1055 1161 # $id$等の置換 1056 1162 cell.get_celltype.subst_name(subst, name_array) 1057 } 1058 1059 # 出力 1060 kernelCfg.puts text 1061 1062 end 1063 private :gen_factory_for_cell 1163 } 1164 1165 # 出力 (CRE_xxx) 1166 kernelCfg.print pre_text 1167 kernelCfg.print indent, text, "\n" 1168 gen_sac kernelCfg, cell, indent 1169 kernelCfg.print post_text 1170 end 1171 1172 def gen_sac file, cell, indent 1173 domain_root = cell.get_region.get_domain_root 1174 if domain_root.get_domain_type then 1175 id = (cell.get_attr_initializer :id).to_s 1176 name_array = cell.get_celltype.get_name_array(cell) 1177 case cell.get_celltype.get_name 1178 when :tCyclicNotifier 1179 obj_type = "CYC" 1180 when :tAlarmNotifier 1181 obj_type = "ALM" 1182 else 1183 raise "NotifierPlugin: unknown celltype #{cell.get_celltype.get_name}" 1184 end 1185 id = cell.get_celltype.subst_name(id, name_array) 1186 # p obj_type 1187 # p HRPPlugin.get_sac_str cell 1188 file.print indent, "SAC_#{obj_type}( #{id}, #{HRPPlugin.get_sac_str cell} );\n" 1189 end 1190 end 1191 private :gen_factory_for_cell 1064 1192 1065 1193 end -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueRPCPlugin.rb
r321 r429 56 56 #=== RPCPlugin の initialize 57 57 # 説明は ThroughPlugin (plugin.rb) を参照 58 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )58 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 59 59 super 60 60 @b_noClientSemaphore = false … … 254 254 nest = @end_region.gen_region_str_pre file 255 255 nest_str = " " * nest 256 if @next_cell_port_subscript then 257 subscript = '[' + @next_cell_port_subscript.to_s + ']' 258 else 259 subscript = "" 260 end 256 261 257 262 if @serverErrorHandler then … … 282 287 #{nest_str} cell #{@rpc_server_channel_celltype_name} #{@serverChannelCell}_Unmarshaler { 283 288 #{nest_str} cChannel = #{@serverChannelCell}.eC1; 284 #{nest_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name} ;289 #{nest_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name}#{subscript}; 285 290 #{serverErrorHandler_str}#{nest_str} }; 286 291 EOT -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/RPCPlugin.rb
r321 r429 65 65 #=== RPCPlugin の initialize 66 66 # 説明は ThroughPlugin (plugin.rb) を参照 67 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )67 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 68 68 super 69 69 @b_noClientSemaphore = false … … 197 197 nest = @region.gen_region_str_pre file 198 198 indent_str = " " * nest 199 if @next_cell_port_subscript then 200 subscript = '[' + @next_cell_port_subscript.to_s + ']' 201 else 202 subscript = "" 203 end 199 204 200 205 file.print <<EOT … … 233 238 file.print <<EOT 234 239 #{indent_str}cell #{@rpc_channel_celltype_name} #{@cell_name} { 235 #{indent_str} #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name} ;240 #{indent_str} #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name}#{subscript}; 236 241 #{indent_str} cTDR = #{@channelCellName}.eTDR; 237 242 #{indent_str} cEventflag = #{@channelCellName}.eEventflag; -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedOpaqueRPCPlugin.rb
r321 r429 68 68 #=== RPCPlugin の initialize 69 69 # 説明は ThroughPlugin (plugin.rb) を参照 70 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )70 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 71 71 super 72 72 initialize_opaque_marshaler … … 221 221 nest = @start_region.gen_region_str_pre file 222 222 indent_str = " " * nest 223 nest_str = " " * nest 224 if @next_cell_port_subscript then 225 subscript = '[' + @next_cell_port_subscript.to_s + ']' 226 else 227 subscript = "" 228 end 223 229 224 230 # セルを探す … … 303 309 #{indent_str}cell #{@unmarshaler_celltype_name} #{@cell_name}_Server { 304 310 #{indent_str} cTDR = #{@shared_channel_cell}_Server.eTDR; 305 #{indent_str} cServerCall = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name} ;311 #{indent_str} cServerCall = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name}#{subscript}; 306 312 #{ppallocator_join}#{indent_str}}; 307 313 EOT -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedRPCPlugin.rb
r321 r429 62 62 #=== RPCPlugin の initialize 63 63 # 説明は ThroughPlugin (plugin.rb) を参照 64 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )64 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 65 65 66 66 # mikan プラグインオプション指定の不一致のチェック task_priority, … … 236 236 nest = @region.gen_region_str_pre file 237 237 indent_str = " " * nest 238 if @next_cell_port_subscript then 239 subscript = '[' + @next_cell_port_subscript.to_s + ']' 240 else 241 subscript = "" 242 end 238 243 239 244 # セルを探す … … 291 296 file.print <<EOT 292 297 #{indent_str}cell #{@rpc_channel_celltype_name} #{@cell_name} { 293 #{indent_str} #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name} ;298 #{indent_str} #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name}#{subscript}; 294 299 #{indent_str} cTDR = #{@shared_channel_cell}.eTDR; 295 300 #{indent_str} cEventflag = #{@shared_channel_cell}.eEventflag; -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ThroughPlugin.rb
r321 r429 47 47 #@next_cell:: Cell 呼び口を結合するセル 48 48 #@next_cell_port_name:: Symbol 呼び口を結合する受口の名前 49 #@next_cell_port_subscript::Nil|Integer 呼び口を結合する受口の配列添数.受け口配列でない場合 nil 49 50 #@signature:: Signature シグニチャ 50 51 #@celltype:: Celltype 呼び先のセルのセルタイプ. through が連接する場合、最終的な呼び先のセルのセルタイプ … … 74 75 #next_cell:: Cell 呼び口を接続するセル 75 76 #next_cell_port_name:: Symbol 呼び口を接続する受口の名前 77 #next_cell_port_subscript:: Nil|Integer 呼び口を接続する受口配列添数 76 78 #signature:: Signature シグニチャ 77 79 #celltype:: Celltype セルタイプ (呼び先のセルのセルタイプ) 78 80 #caller_cell:: Cell 呼び元のセル.@caller_cell の項を参照 79 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )81 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 80 82 super() 81 83 @cell_name = cell_name # 生成すべきセル名(受け口側のセル名) … … 83 85 @next_cell = next_cell # 呼び先のセル 84 86 @next_cell_port_name = next_cell_port_name 87 @next_cell_port_subscript = next_cell_port_subscript 85 88 @signature = signature 86 89 @entry_port_name = :"eThroughEntry" … … 136 139 def get_through_entry_port_name 137 140 @entry_port_name 141 end 142 143 #=== 生成されたセルの受け口配列添数を得る 144 def get_through_entry_port_subscript 145 @entry_port_subscript 138 146 end 139 147 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TracePlugin.rb
r321 r429 44 44 #=== TracePlugin の initialize 45 45 # 説明は ThroughPlugin (plugin.rb) を参照 46 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )46 def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, next_cell_port_subscript, signature, celltype, caller_cell ) 47 47 48 48 @maxArrayDisplay = 16 … … 141 141 nest = @region.gen_region_str_pre file 142 142 indent_str = " " * nest 143 if @next_cell_port_subscript then 144 subscript = '[' + @next_cell_port_subscript.to_s + ']' 145 else 146 subscript = "" 147 end 143 148 144 149 if @probeName then … … 155 160 file.print <<EOT 156 161 #{indent_str}cell #{@ct_name} #{@cell_name} { 157 #{indent_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name} ;162 #{indent_str} #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name}#{subscript}; 158 163 #{probeName_str}#{caller_cell_str}#{indent_str}}; 159 164 EOT … … 210 215 } 211 216 file.print( " );\n" ) 217 if @next_cell_port_subscript then 218 subscript = '[' + @next_cell_port_subscript.to_s + ']' 219 else 220 subscript = "" 221 end 212 222 213 223 file.print <<EOT 214 224 \tgetMicroTime( &utime ); 215 \tsyslog( LOG_INFO, \"Leave: %sTime=%d: #{@next_cell.get_name}.#{@next_cell_port_name} .#{func_name}\", ATTR_probeName_str, utime );225 \tsyslog( LOG_INFO, \"Leave: %sTime=%d: #{@next_cell.get_name}.#{@next_cell_port_name}#{subscript}.#{func_name}\", ATTR_probeName_str, utime ); 216 226 EOT 217 227 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenOpaqueMarshaler.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 464 464 /* Channel Lock */ 465 465 SET_RPC_STATE( state_, RPCSTATE_CLIENT_GET_SEM ); 466 if( is_cLockChannel_joined() ) 467 cLockChannel_wait(); 466 if( is_cLockChannel_joined() ){ 467 if( (ercd_=cLockChannel_wait()) != E_OK ) 468 goto error_reset; 469 } 468 470 EOT 469 471 … … 554 556 /* Channel Unlock */ 555 557 SET_RPC_STATE( state_, RPCSTATE_CLIENT_RELEASE_SEM ); 556 if( is_cLockChannel_joined() ) 557 cLockChannel_signal(); 558 if( is_cLockChannel_joined() ){ 559 if( (ercd_=cLockChannel_signal()) != E_OK ) 560 goto error_reset; 561 } 562 EOT 563 564 file.print <<EOT 565 /* state_ is not used in normal case */ 566 /* below is to avoid 'set but not used' warnning */ 567 (void)state_; 558 568 EOT 559 569 … … 630 640 file.print <<EOT 631 641 }else{ 632 return ;642 return E_ID; 633 643 } 634 644 EOT -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenTransparentMarshaler.rb
r321 r429 388 388 }; 389 389 #{ppallocator_dealloc_str} 390 return ;390 return E_OK; 391 391 392 392 error_reset: … … 394 394 (void)cTDR_reset(); 395 395 #{ppallocator_dealloc_str} 396 return E_OK; 396 397 EOT 397 398 -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/version.rb
r321 r429 1 1 $package = "tecsgen" 2 $version = "1. 3.1.5"2 $version = "1.6.4" -
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge.rb
r321 r429 6 6 # Merger for TECS generated templates 7 7 # 8 # Copyright (C) 2008-201 5by TOPPERS Project8 # Copyright (C) 2008-2017 by TOPPERS Project 9 9 #-- 10 10 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 37 37 # の責任を負わない. 38 38 # 39 # $Id $39 # $Id: tecsmerge.rb 2633 2017-04-02 06:02:05Z okuma-top $ 40 40 #++ 41 41 … … 44 44 #Authors:: 大山 博司 45 45 #Version:: 46 #Copyright:: Copyright (C) TOPPERS Project, 2008-201 5. All rights reserved.46 #Copyright:: Copyright (C) TOPPERS Project, 2008-2017. All rights reserved. 47 47 #License:: TOPPERS ライセンスに準拠 48 48 … … 285 285 286 286 next if next_stat == :HEAD || ( next_stat == :EOF && line != nil ) 287 # #1002 tecsmerge の非受け口関数 (POSTAMBLE部) の行頭に '{' があるとエラーになる 288 if (! $old_mode) && ( /^\{/ =~ line ) && ( stat == :PREAMBLE_BODY || stat == :POSTAMBLE_BODY ) 289 p line + " next_stat=" + next_stat.to_s + "stat=" + stat.to_s 290 next 291 end 287 292 288 293 # p "R: #{stat_info[0]}"
Note:
See TracChangeset
for help on using the changeset viewer.