Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

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  
    2525tecslib/core/tecs_lang.rb
    2626tecslib/core/tecsgen.rb
     27tecslib/core/tecsinfo.rb
     28tecslib/core/tool_info.rb
    2729tecslib/core/types.rb
     30tecslib/core/unjoin_plugin.rb
    2831tecslib/core/value.rb
    2932
     
    3639tecslib/plugin/CellPlugin.rb
    3740tecslib/plugin/CelltypePlugin.rb
     41tecslib/plugin/CompositePlugin.rb
    3842tecslib/plugin/DomainPlugin.rb
    3943tecslib/plugin/Mruby2CBridgePlugin.rb
    4044tecslib/plugin/MrubyBridgePlugin.rb
     45tecslib/plugin/MultiPlugin.rb
    4146tecslib/plugin/NotifierPlugin.rb
    4247tecslib/plugin/RPCPlugin.rb
     
    97102tecs/rpc/tTDR_inline.h
    98103tecs/rpc/tecs_rpc.h
     104tecs/rpc/tMessageBufferCEP.cdl
     105tecs/rpc/tMessageBufferCEP_inline.h
     106tecs/rpc/tMessageBufferChannel.cdl
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_tecsgen_body

    r270 r429  
    22
    33Makefile
    4 
     4tecscde
     5tecscde.rb
    56tecsgen
    67tecsgen.rb
     8tecsgen_rcov.rb
    79tecsmerge
    810tecsmerge.rb
    9 tecslib/version.rb
    10 
     11cdelib/Makefile
     12cdelib/cell_plugin_dialog.rb
     13cdelib/cell_plugin_dialog_ui_definition.rb
     14cdelib/palette.rb
     15cdelib/saveload.rb
     16cdelib/tcontrol.rb
     17cdelib/tmodel.rb
     18cdelib/tview.rb
     19cdelib/version.rb
     20tecs/TECSInfo/TECSInfo.cdl
     21tecs/TECSInfo/TECSInfoAccessor.cdl
     22tecs/TECSInfo/nTECSInfo_tArrayTypeInfo.c
     23tecs/TECSInfo/nTECSInfo_tBoolTypeInfo.c
     24tecs/TECSInfo/nTECSInfo_tCallInfo.c
     25tecs/TECSInfo/nTECSInfo_tCellInfo.c
     26tecs/TECSInfo/nTECSInfo_tCelltypeInfo.c
     27tecs/TECSInfo/nTECSInfo_tDefinedTypeInfo.c
     28tecs/TECSInfo/nTECSInfo_tDescriptorTypeInfo.c
     29tecs/TECSInfo/nTECSInfo_tEntryInfo.c
     30tecs/TECSInfo/nTECSInfo_tFloatTypeInfo.c
     31tecs/TECSInfo/nTECSInfo_tFunctionInfo.c
     32tecs/TECSInfo/nTECSInfo_tIntTypeInfo.c
     33tecs/TECSInfo/nTECSInfo_tNamespaceInfo.c
     34tecs/TECSInfo/nTECSInfo_tParamInfo.c
     35tecs/TECSInfo/nTECSInfo_tPtrTypeInfo.c
     36tecs/TECSInfo/nTECSInfo_tRawEntryDescriptorInfo.c
     37tecs/TECSInfo/nTECSInfo_tRegionInfo.c
     38tecs/TECSInfo/nTECSInfo_tSignatureInfo.c
     39tecs/TECSInfo/nTECSInfo_tStructTypeInfo.c
     40tecs/TECSInfo/nTECSInfo_tTECSInfoAccessor.c
     41tecs/TECSInfo/nTECSInfo_tTECSInfoSub.c
     42tecs/TECSInfo/nTECSInfo_tTECSInfo_inline.h
     43tecs/TECSInfo/nTECSInfo_tTypeInfo.c
     44tecs/TECSInfo/nTECSInfo_tVarDeclInfo.c
     45tecs/TECSInfo/nTECSInfo_tVoidTypeInfo.c
     46tecs/TECSInfo/tTECSInfoAccessor.c
     47tecs/TLSFMalloc/README-TLSF.txt
     48tecs/TLSFMalloc/tTLSFMalloc.cdl
     49tecs/TLSFMalloc/tTLSFMalloc_inline.h
     50tecs/mruby/README-mruby.txt
     51tecs/mruby/TECSPointer.h
     52tecs/mruby/TECSStruct.h
     53tecs/mruby/mruby.cdl
     54tecs/mruby/mrubyBridge.txt
     55tecs/mruby/mrubyInitializer.cdl
     56tecs/mruby/mrubyPointers.cdl
     57tecs/mruby/mrubyTECSPointer.txt
     58tecs/mruby/mrubyTECSStruct.txt
     59tecs/mruby/mrubyVMs.cdl
     60tecs/mruby/nMruby_tBoolPointer.c
     61tecs/mruby/nMruby_tCharPointer.c
     62tecs/mruby/nMruby_tDouble64Pointer.c
     63tecs/mruby/nMruby_tFloat32Pointer.c
     64tecs/mruby/nMruby_tInt16Pointer.c
     65tecs/mruby/nMruby_tInt32Pointer.c
     66tecs/mruby/nMruby_tInt64Pointer.c
     67tecs/mruby/nMruby_tInt8Pointer.c
     68tecs/mruby/nMruby_tIntPointer.c
     69tecs/mruby/nMruby_tLongPointer.c
     70tecs/mruby/nMruby_tMruby.c
     71tecs/mruby/nMruby_tMrubyCyclicTaskBody.c
     72tecs/mruby/nMruby_tMrubyProc.c
     73tecs/mruby/nMruby_tMrubyTaskBody.c
     74tecs/mruby/nMruby_tMrubyVM.c
     75tecs/mruby/nMruby_tSCharPointer.c
     76tecs/mruby/nMruby_tShortPointer.c
     77tecs/mruby/nMruby_tTECSInitializer.c
     78tecs/mruby/nMruby_tUCharPointer.c
     79tecs/mruby/nMruby_tUInt16Pointer.c
     80tecs/mruby/nMruby_tUInt32Pointer.c
     81tecs/mruby/nMruby_tUInt64Pointer.c
     82tecs/mruby/nMruby_tUInt8Pointer.c
     83tecs/mruby/nMruby_tUIntPointer.c
     84tecs/mruby/nMruby_tULongPointer.c
     85tecs/mruby/nMruby_tUShortPointer.c
     86tecs/mruby/sMruby.cdl
     87tecs/mruby/tMruby.cdl
     88tecs/mruby/tecs_mruby.h
     89tecs/posix/posix.cdl
     90tecs/rpc/PPAllocator.cdl
     91tecs/rpc/RPCTask.cdl
     92tecs/rpc/TDR.cdl
     93tecs/rpc/rpc.cdl
     94tecs/rpc/rpc_string.h
     95tecs/rpc/sChannel.cdl
     96tecs/rpc/sRPCErrorHandler.cdl
     97tecs/rpc/tDataqueueAdaptor_inline.h
     98tecs/rpc/tDataqueueOWChannel.cdl
     99tecs/rpc/tMessageBufferCEP.cdl
     100tecs/rpc/tMessageBufferCEP_inline.h
     101tecs/rpc/tMessageBufferChannel.cdl
     102tecs/rpc/tNBOTDR_inline.h
     103tecs/rpc/tPPAllocator.c
     104tecs/rpc/tRPCDedicatedTaskMain.c
     105tecs/rpc/tRPCDedicatedTaskMainWithOpener.c
     106tecs/rpc/tRPCSharedChannelMan.c
     107tecs/rpc/tRPCSharedTaskMain.c
     108tecs/rpc/tRPCSharedTaskMainWithOpener.c
     109tecs/rpc/tSocketChannel.cdl
     110tecs/rpc/tSocketClient.c
     111tecs/rpc/tSocketServer.c
     112tecs/rpc/tTDR_inline.h
     113tecs/rpc/tTINETChannel.cdl
     114tecs/rpc/tTINETClient.c
     115tecs/rpc/tTINETServer.c
     116tecs/rpc/tecs_rpc.h
     117tecs/sMalloc.cdl
     118tecs/tecs.h
     119tecs/tecs.xsd
    11120tecslib/core/C_parser.tab.rb
    12121tecslib/core/C_parser.y.rb
     
    26135tecslib/core/tecs_lang.rb
    27136tecslib/core/tecsgen.rb
     137tecslib/core/tecsinfo.rb
     138tecslib/core/tool_info.rb
    28139tecslib/core/types.rb
     140tecslib/core/unjoin_plugin.rb
    29141tecslib/core/value.rb
    30 
    31142tecslib/messages/messages_console_en_US.rb
    32143tecslib/messages/messages_console_ja_JP.rb
    33144tecslib/messages/messages_file_en_US.rb
    34145tecslib/messages/messages_file_ja_JP.rb
    35 
    36146tecslib/plugin/ATK1AlarmPlugin.rb
    37147tecslib/plugin/ATK1DelayTaskPlugin.rb
     
    44154tecslib/plugin/CellPlugin.rb
    45155tecslib/plugin/CelltypePlugin.rb
     156tecslib/plugin/CompositePlugin.rb
    46157tecslib/plugin/DomainPlugin.rb
    47158tecslib/plugin/HRP2AlarmHandlerPlugin.rb
     
    61172tecslib/plugin/HRP2SemaphorePlugin.rb
    62173tecslib/plugin/HRP2TaskPlugin.rb
     174tecslib/plugin/HRPHandlerPlugin.rb
     175tecslib/plugin/HRPKernelObjectManager.rb
     176tecslib/plugin/HRPKernelObjectPlugin.rb
     177tecslib/plugin/HRPObjectPlugin.rb
     178tecslib/plugin/HRPPlugin.rb
     179tecslib/plugin/HRPRPCPlugin.rb
     180tecslib/plugin/HRPSVCPlugin.rb
     181tecslib/plugin/HRPTaskPlugin.rb
    63182tecslib/plugin/Mruby2CBridgePlugin.rb
     183tecslib/plugin/MrubyBridgeCellPlugin.rb
     184tecslib/plugin/MrubyBridgeCelltypePlugin.rb
     185tecslib/plugin/MrubyBridgeCompositePlugin.rb
    64186tecslib/plugin/MrubyBridgePlugin.rb
     187tecslib/plugin/MrubyBridgeSignaturePlugin.rb
     188tecslib/plugin/MultiPlugin.rb
    65189tecslib/plugin/NotifierPlugin.rb
    66190tecslib/plugin/OpaqueMarshalerPlugin.rb
    67191tecslib/plugin/OpaqueRPCPlugin.rb
    68192tecslib/plugin/RPCPlugin.rb
     193tecslib/plugin/RepeatCellPlugin.rb
     194tecslib/plugin/RepeatJoinPlugin.rb
    69195tecslib/plugin/SharedOpaqueRPCPlugin.rb
    70196tecslib/plugin/SharedRPCPlugin.rb
    71197tecslib/plugin/SignaturePlugin.rb
    72198tecslib/plugin/TECS2CBridgePlugin.rb
     199tecslib/plugin/TECSInfoPlugin.rb
    73200tecslib/plugin/ThroughPlugin.rb
    74201tecslib/plugin/TracePlugin.rb
     
    77204tecslib/plugin/lib/GenParamCopy.rb
    78205tecslib/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
     206tecslib/plugin/lib/MrubyBridgeCelltypePluginModule.rb
     207tecslib/version.rb
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/Makefile

    r321 r429  
    3434#   の責任を負わない.
    3535
    36 #   $Id$
     36#   $Id: Makefile 2640 2017-06-03 11:27:12Z okuma-top $
    3737#++
    3838
     
    7676C_TAB = $(LIB_PATH)/C_parser.tab.rb
    7777EXERB_EXE = tecsgen.exe
    78 EXERB_EXY = tecsgen.exy
    7978
    8079all: generator
     
    105104        racc -v -g -o $(GEN_TAB_DEB) $(BNF)     # yydebug を有効にする
    106105
    107 # exerb : $(EXERB_EXE)
    108 exerb :
    109         @echo "!!! please build using ActiveScriptRuby !!!"
    110         exit 1
    111 
    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 
    122106print_error :   # エラーメッセージを拾い出す
    123107        grep -e "Generator\.error" -e cdl_error $(LIB_PATH)/*.rb \
    124108                | 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/).*$$//"
    126110
    127111print_error2 :  # エラーメッセージを拾い出す
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/in_exerb.rb

    r321 r429  
    3535#   の責任を負わない.
    3636
    37 #   $Id$
     37#   $Id: in_exerb.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
    3838#++
    3939
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h

    r321 r429  
    102102        {                                                                                                                                       \
    103103                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 )         \
    106106                                /* '=' unecessary for negative value    */                              \
    107107                                /* ignore warning on int32_t */                                                 \
     
    126126        {                                                                                                                                       \
    127127                if( sizeof( type ) > sizeof( mrb_int ) ){                                               \
    128                         if( val >= (((type)1) << (sizeof(mrb_int)*8)))                          \
     128      if( val > TYPE ## _MAX )                        \
    129129                                /* '=' unecessary for negative value    */                              \
    130130                                /* ignore warning on int32_t */                                                 \
     
    148148VALCHECK_MRB_INT( Int16, INT16, int16_t )
    149149VALCHECK_UINT( UInt8, UINT8, uint8_t )
    150 #define VALCHECK_MRB_UInt8
     150#define VALCHECK_MRB_UInt8(mrb,val)
    151151VALCHECK_UINT( UInt16, UINT16, uint16_t )
    152 #define VALCHECK_MRB_UInt16
     152#define VALCHECK_MRB_UInt16(mrb,val)
    153153VALCHECK_INT( Int32, INT32, int32_t )
    154 #define VALCHECK_MRB_Int32
     154#define VALCHECK_MRB_Int32(mrb,val)
    155155VALCHECK_UINT( UInt32, UINT32, uint32_t )
    156 #define VALCHECK_MRB_UInt32
     156#define VALCHECK_MRB_UInt32(mrb,val)
    157157
    158158VALCHECK_INT( Int64, INT64, int64_t )
     
    163163VALCHECK_MRB_UINT( UInt64, UINT64, uint64_t )
    164164#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)      // 範囲チェックが無意味であるため、警告が出るのを回避する
    167167#endif
    168168
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSStruct.h

    r321 r429  
    105105        Struct_ ## TAG ## _initialize( mrb_state *mrb, mrb_value self)          \
    106106        {                                                                                                                                       \
    107                 mrb_int length;                                                                                                 \
    108                 struct  TAG *structBody;                                                                                \
    109107                                                                                                                                                \
    110108                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
    136import_C( "tecs_mruby.h" );
    237
  • 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 */
    135
    236namespace 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
    136// Pointer celltypes
    237
  • 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
    136import( <posix.cdl> );
    237
    338/*
    4  * tools/mruby/mruby.c から cInit_initializeBridge( mrb ) を呼び出すように変更したもの
     39 * POSIX 環境用の VM
     40 * mrbgems の mrbgems/mruby-bin-mruby/tools/mruby/mruby.c を参考に作成したもの
    541 */
    642namespace 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    137/* #[<PREAMBLE>]#
    238 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc.c

    r321 r429  
    11/*
    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
    63 *
    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$
    1134 */
    1235
    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 */
    1442
    1543#include <stdio.h>
     
    1745#include <string.h>
    1846#include "mruby.h"
     47#include "mruby/string.h"
    1948#include "mruby/array.h"
    2049#include "mruby/compile.h"
     
    2251#include "mruby/variable.h"
    2352
    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 */
    3473#endif
    3574
    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>]# */
    3881
    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>]# */
     87int
     88eMain_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) */
    49100
    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   NULL
    63   };
    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  }
    65116
    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 ----------*/
     160error_free:
     161  mrbc_context_free(mrb, context);
     162error_close:
     163  mrb_close( mrb );
     164error_return:
     165
     166  return -1;
    69167}
    70168
    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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • 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
    136/* #[<PREAMBLE>]#
    237 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tMruby.cdl

    r321 r429  
    1 
    21/*
    32 *  Copyright (C) 2012 by Ubiquitous Computing and Networking Laboratory
     
    3837
    3938import(<mruby.cdl>);
     39import(<sMruby.cdl>);
     40import(<tTLSFMalloc.cdl>);
    4041
    4142namespace nMruby{
    42   celltype tMruby{
    43     entry sTaskBody eMrubyBody;
     43
     44/*** mruby VM ***/
     45  celltype tMrubyVM{
     46    entry sMrubyVM eMrubyVM;
    4447    attr{
    4548      [omit]char_t *mrubyFile;
    46       char_t *irep=C_EXP("&$cell_global$_irep");
     49      const uint8_t *irep=C_EXP("$cell_global$_irep");
    4750    };
    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 へ結合する */
    5158    [optional]  call sInitializeBridge cInit;
    52    
     59    /*
     60     * アロケータ
     61     *  他と共有しないのであれば、このアロケータは排他制御される必要はない
     62     */
     63    call sMalloc cMalloc;
     64
    5365    FACTORY{
    5466      write("Makefile.tecsgen", "clean_mrb_c :");
     
    6173      write("Makefile.tecsgen", "TECS_COBJS := $(TECS_COBJS) $cell_global$_mrb.o");
    6274      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[];");
    6476    };
    6577  };
     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  };
    66148};
  • 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
    136#ifndef tecs_mruby_h__
    237#define tecs_mruby_h__
     
    944#include "mruby/data.h"
    1045#include "mruby/string.h"
     46#include "mruby/irep.h"
     47#include "mruby/dump.h"
     48#include "mruby/proc.h"
    1149
    1250#include "TECSPointer.h"
    1351#include "TECSStruct.h"
    1452
    15 #if  ! defined( MRUBY_RELEASE_MAJOR ) || MRUBY_RELEASE_MAJOR == 1 && MRUBY_RELEASE_MINOR < 2
    16 #ifndef MRB_ARGS_REQ
    17 #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 #endif
    2853
    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 */
    3455
    3556/*
    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.
    3758 *   types:   long long, long long int
    3859 *   special keyword __attribute__(x), __extension__
    3960 */
    4061typedef int mrb_state;
    41 struct  RClass {int dummy;};
     62typedef int mrb_irep;
     63typedef int mrb_context;
     64struct  RClass {uint32_t gcnext;};  // actual definition: struct RBasic *gcnext
     65struct  RProc  {uint32_t gcnext;};  // actual definition: struct RBasic *gcnext
    4266
    4367typedef 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 )
    4475
    4576#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
    136
    237namespace nPosix {
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/TDR.cdl

    r321 r429  
    6868        ER      sendSOP( [in]bool_t b_client );     /* StartOfPacket magic を送信 */
    6969        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 を受信 */
    7570                                                 /* b_client: クライアント側なら true, サーバー側なら false */
    7671
     
    150145};
    151146
    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)
    153148celltype tTDR {
    154149        call    sChannel        cChannel;
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sChannel.cdl

    r321 r429  
    5858};
    5959
     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  
    7575                return(E_ID);
    7676        }
     77  (void)p_cellcb;   // to avoid unused warning
    7778
    7879        syslog( LOG_INFO, "TDR: resetting channel" );
     
    102103                return(E_ID);
    103104        }
     105  (void)p_cellcb;   // to avoid unused warning
    104106
    105107        /* ここに処理本体を記述します #_TEFB_# */
     
    151153                return(E_ID);
    152154        }
     155  (void)p_cellcb;   // to avoid unused warning
    153156
    154157        /* ここに処理本体を記述します #_TEFB_# */
     
    157160#endif
    158161
    159     if( b_client )
     162  if( b_client )
    160163                p_sopMagic = &SOP_MAGIC2;
    161164        else
     
    198201                return(E_ID);
    199202        }
     203  (void)p_cellcb;   // to avoid unused warning
    200204
    201205        /* ここに処理本体を記述します #_TEFB_# */
     
    234238                return(E_ID);
    235239        }
     240  (void)p_cellcb;   // to avoid unused warning
    236241
    237242        /* ここに処理本体を記述します #_TEFB_# */
     
    267272                return(E_ID);
    268273        }
     274  (void)p_cellcb;   // to avoid unused warning
    269275
    270276        /* ここに処理本体を記述します #_TEFB_# */
     
    287293                return(E_ID);
    288294        }
     295  (void)p_cellcb;   // to avoid unused warning
    289296
    290297        /* ここに処理本体を記述します #_TEFB_# */
     
    307314                return(E_ID);
    308315        }
     316  (void)p_cellcb;   // to avoid unused warning
    309317
    310318        /* ここに処理本体を記述します #_TEFB_# */
     
    327335                return(E_ID);
    328336        }
     337  (void)p_cellcb;   // to avoid unused warning
    329338
    330339        /* ここに処理本体を記述します #_TEFB_# */
     
    347356                return(E_ID);
    348357        }
     358  (void)p_cellcb;   // to avoid unused warning
    349359
    350360        /* ここに処理本体を記述します #_TEFB_# */
     
    368378                return(E_ID);
    369379        }
     380  (void)p_cellcb;   // to avoid unused warning
    370381
    371382        /* ここに処理本体を記述します #_TEFB_# */
     
    390401                return(E_ID);
    391402        }
     403  (void)p_cellcb;   // to avoid unused warning
    392404
    393405        /* ここに処理本体を記述します #_TEFB_# */
     
    412424                return(E_ID);
    413425        }
     426  (void)p_cellcb;   // to avoid unused warning
    414427
    415428        /* ここに処理本体を記述します #_TEFB_# */
     
    434447                return(E_ID);
    435448        }
     449  (void)p_cellcb;   // to avoid unused warning
    436450
    437451        /* ここに処理本体を記述します #_TEFB_# */
     
    456470                return(E_ID);
    457471        }
     472  (void)p_cellcb;   // to avoid unused warning
    458473
    459474        /* ここに処理本体を記述します #_TEFB_# */
     
    477492                return(E_ID);
    478493        } /* end if VALID_IDX(idx) */
     494  (void)p_cellcb;   // to avoid unused warning
    479495
    480496        /* ここに処理本体を記述します #_TEFB_# */
     
    497513                return(E_ID);
    498514        } /* end if VALID_IDX(idx) */
     515  (void)p_cellcb;   // to avoid unused warning
    499516
    500517        /* ここに処理本体を記述します #_TEFB_# */
     
    517534                return(E_ID);
    518535        } /* end if VALID_IDX(idx) */
     536  (void)p_cellcb;   // to avoid unused warning
    519537
    520538        /* ここに処理本体を記述します #_TEFB_# */
     
    537555                return(E_ID);
    538556        } /* end if VALID_IDX(idx) */
     557  (void)p_cellcb;   // to avoid unused warning
    539558
    540559        /* ここに処理本体を記述します #_TEFB_# */
     
    557576                return(E_ID);
    558577        } /* end if VALID_IDX(idx) */
     578  (void)p_cellcb;   // to avoid unused warning
    559579
    560580        /* ここに処理本体を記述します #_TEFB_# */
     
    578598                return(E_ID);
    579599        } /* end if VALID_IDX(idx) */
     600  (void)p_cellcb;   // to avoid unused warning
    580601
    581602        /* ここに処理本体を記述します #_TEFB_# */
     
    600621                return(E_ID);
    601622        } /* end if VALID_IDX(idx) */
     623  (void)p_cellcb;   // to avoid unused warning
    602624
    603625        /* ここに処理本体を記述します #_TEFB_# */
     
    622644                return(E_ID);
    623645        } /* end if VALID_IDX(idx) */
     646  (void)p_cellcb;   // to avoid unused warning
    624647
    625648        /* ここに処理本体を記述します #_TEFB_# */
     
    644667                return(E_ID);
    645668        } /* end if VALID_IDX(idx) */
     669  (void)p_cellcb;   // to avoid unused warning
    646670
    647671        /* ここに処理本体を記述します #_TEFB_# */
     
    666690                return(E_ID);
    667691        } /* end if VALID_IDX(idx) */
     692  (void)p_cellcb;   // to avoid unused warning
    668693
    669694        /* ここに処理本体を記述します #_TEFB_# */
     
    688713                return(E_ID);
    689714        } /* end if VALID_IDX(idx) */
     715  (void)p_cellcb;   // to avoid unused warning
    690716
    691717        /* ここに処理本体を記述します #_TEFB_# */
     
    705731        ER              ercd = E_OK;
    706732        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
    714741
    715742        /* ここに処理本体を記述します #_TEFB_# */
     
    737764                return(E_ID);
    738765        }
     766  (void)p_cellcb;   // to avoid unused warning
    739767
    740768        /* ここに処理本体を記述します #_TEFB_# */
     
    757785                return(E_ID);
    758786        }
     787  (void)p_cellcb;   // to avoid unused warning
    759788
    760789        /* ここに処理本体を記述します #_TEFB_# */
     
    778807                return(E_ID);
    779808        }
     809  (void)p_cellcb;   // to avoid unused warning
    780810
    781811        /* ここに処理本体を記述します #_TEFB_# */
     
    800830                return(E_ID);
    801831        }
     832  (void)p_cellcb;   // to avoid unused warning
    802833
    803834        /* ここに処理本体を記述します #_TEFB_# */
     
    821852                return(E_ID);
    822853        }
     854  (void)p_cellcb;   // to avoid unused warning
    823855
    824856        /* ここに処理本体を記述します #_TEFB_# */
     
    863895                return(E_ID);
    864896        } /* end if VALID_IDX(idx) */
     897  (void)p_cellcb;   // to avoid unused warning
    865898
    866899        /* ここに処理本体を記述します #_TEFB_# */
     
    883916                return(E_ID);
    884917        }
     918  (void)p_cellcb;   // to avoid unused warning
    885919
    886920        /* ここに処理本体を記述します #_TEFB_# */
     
    903937                return(E_ID);
    904938        }
     939  (void)p_cellcb;   // to avoid unused warning
    905940
    906941        /* ここに処理本体を記述します #_TEFB_# */
     
    923958                return(E_ID);
    924959        }
     960  (void)p_cellcb;   // to avoid unused warning
    925961
    926962        /* ここに処理本体を記述します #_TEFB_# */
     
    944980                return(E_ID);
    945981        } /* end if VALID_IDX(idx) */
     982  (void)p_cellcb;   // to avoid unused warning
    946983
    947984        /* ここに処理本体を記述します #_TEFB_# */
     
    9661003                return(E_ID);
    9671004        }
     1005  (void)p_cellcb;   // to avoid unused warning
    9681006
    9691007        /* ここに処理本体を記述します #_TEFB_# */
     
    9881026                return(E_ID);
    9891027        }
     1028  (void)p_cellcb;   // to avoid unused warning
    9901029
    9911030        /* ここに処理本体を記述します #_TEFB_# */
     
    10101049                return(E_ID);
    10111050        }
     1051  (void)p_cellcb;   // to avoid unused warning
    10121052
    10131053        /* ここに処理本体を記述します #_TEFB_# */
     
    10311071                return(E_ID);
    10321072        } /* end if VALID_IDX(idx) */
     1073  (void)p_cellcb;   // to avoid unused warning
    10331074
    10341075        /* ここに処理本体を記述します #_TEFB_# */
     
    10511092                return(E_ID);
    10521093        } /* end if VALID_IDX(idx) */
     1094  (void)p_cellcb;   // to avoid unused warning
    10531095
    10541096        /* ここに処理本体を記述します #_TEFB_# */
     
    10711113                return(E_ID);
    10721114        } /* end if VALID_IDX(idx) */
     1115  (void)p_cellcb;   // to avoid unused warning
    10731116
    10741117        /* ここに処理本体を記述します #_TEFB_# */
     
    10911134                return(E_ID);
    10921135        } /* end if VALID_IDX(idx) */
     1136  (void)p_cellcb;   // to avoid unused warning
    10931137
    10941138        /* ここに処理本体を記述します #_TEFB_# */
     
    11121156                return(E_ID);
    11131157        } /* end if VALID_IDX(idx) */
     1158  (void)p_cellcb;   // to avoid unused warning
    11141159
    11151160        /* ここに処理本体を記述します #_TEFB_# */
     
    11341179                return(E_ID);
    11351180        } /* end if VALID_IDX(idx) */
     1181  (void)p_cellcb;   // to avoid unused warning
    11361182
    11371183        /* ここに処理本体を記述します #_TEFB_# */
     
    11561202                return(E_ID);
    11571203        } /* end if VALID_IDX(idx) */
     1204  (void)p_cellcb;   // to avoid unused warning
    11581205
    11591206        /* ここに処理本体を記述します #_TEFB_# */
     
    11781225                return(E_ID);
    11791226        } /* end if VALID_IDX(idx) */
     1227  (void)p_cellcb;   // to avoid unused warning
    11801228
    11811229        /* ここに処理本体を記述します #_TEFB_# */
     
    11991247                return(E_ID);
    12001248        }
     1249  (void)p_cellcb;   // to avoid unused warning
    12011250
    12021251        /* ここに処理本体を記述します #_TEFB_# */
     
    12201269                return(E_ID);
    12211270        }
     1271  (void)p_cellcb;   // to avoid unused warning
    12221272
    12231273        /* ここに処理本体を記述します #_TEFB_# */
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen

    r321 r429  
    77#
    88#   ä¸Šè¨˜è‘—作権è€
    9 ã¯ï¼Œä»¥ä¸‹ã®(1)〜(4)の条件を満たす場合に限り,本ソフトウェ
     9は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
    1010#   ã‚¢ï¼ˆæœ¬ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã‚’改変したものを含む.以下同じ)を使用・複製・改
    1111#   å¤‰ãƒ»å†é
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen.rb

    r321 r429  
    55#      Generator for TOPPERS Embedded Component System
    66
    7 #   Copyright (C) 2008-2016 by TOPPERS Project
     7#   Copyright (C) 2008-2019 by TOPPERS Project
    88#--
    99#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    5454#  Authors list is in i-ro-ha order.
    5555#Version::   see version.rb
    56 $Copyright = "Copyright(c) 2008-2016, TOPPERS project. All rights reserved."
     56$Copyright = "Copyright(c) 2008-2019, TOPPERS project. All rights reserved."
    5757$License   = "TOPPERS License"
    5858
     
    223223    analyze_option addtional_option_parser
    224224    load_modules
    225     setup
     225    if ! $TECSFLOW then
     226      setup
     227    end
    226228       
    227229    dbgPrint  "tecspath: #{$tecsgen_base_path}, __FILE__=#{__FILE__}\n"
     
    284286    ARGV.each { |a| $arguments += " " + a }
    285287
    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
    287290    $gen_base  = "gen"     # string: folder path to place generated files
    288291    $gen       = $gen_base # string: folder path to place generated files
     
    385388        $unopt = true
    386389      }
     390      parser.on('--unoptimize-entry', 'unoptimize entry port') {
     391        $unopt_entry = true
     392      }
    387393      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' ){
    388394        |arg|
     
    465471    }
    466472
    467     if ARGV.empty? && ! $print_version && ! $unit_test
     473    if ARGV.empty? && ! $print_version && ! $unit_test && ! $TECSFLOW
    468474      ARGV.options{|parser|
    469475        puts parser.help
     
    482488    # このファイルを誤って読み込むと、異なるバージョン名を表示してしまう
    483489    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
    485493      STDERR << "tecsgen  version #{$version}  #{$Copyright}\n"
    486494    end
     
    488496      STDERR << "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]\n"
    489497    end
    490     if $print_version && ARGV.empty?
     498    if $print_version && ARGV.empty? && ! $TECSFLOW
    491499      exit
    492500    end
     
    514522    require_tecsgen_lib 'tecslib/core/generate.rb'
    515523    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'
    517527    require_tecsgen_lib 'tecslib/plugin/CelltypePlugin.rb'
     528    require_tecsgen_lib 'tecslib/plugin/CompositePlugin.rb'
    518529    require_tecsgen_lib 'tecslib/plugin/CellPlugin.rb'
    519530    require_tecsgen_lib 'tecslib/plugin/SignaturePlugin.rb'
    520531    require_tecsgen_lib 'tecslib/plugin/ThroughPlugin.rb'
    521532    require_tecsgen_lib 'tecslib/plugin/DomainPlugin.rb'
     533    require_tecsgen_lib 'tecslib/plugin/MultiPlugin.rb'
    522534
    523535    # C 言語パーサ
     
    596608#  クラス変数のリセットを確実に行う必要がある
    597609
    598 if $TECSCDE != true then
     610if $TECSCDE != true && $TECSFLOW != true then
    599611  begin
    600612    TECSGEN.init
     
    602614    tecsgen.run1
    603615    tecsgen.run2
     616    tecsgen.dump_tecsgen_rbdmp
    604617  rescue => evar
    605618    print_exception( evar )
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov.rb

    r321 r429  
    4444# Usage: tecsgen_rcov.rb [options] CDL-file.cdl
    4545#
     46
     47$:.unshift(File.dirname(__FILE__))
     48
    4649require 'simplecov'
    47 SimpleCov.command_name "tecsgen#{$$}"
     50SimpleCov.command_name "tecsgen#{Time.now.to_f}"
    4851SimpleCov.root File.dirname( File.expand_path __FILE__ )
    4952SimpleCov.at_exit do
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.tab.rb

    r321 r429  
    11#
    22# DO NOT MODIFY!!!!
    3 # This file is automatically generated by Racc 1.4.12
     3# This file is automatically generated by Racc 1.4.9
    44# from Racc grammer file "".
    55#
     
    88class C_parser < Racc::Parser
    99
    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
     10module_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
    288306
    289307...end C_parser.y.rb/module_eval...
     
    291309
    292310clist = [
    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)
    417452        idx = 0
    418453        clist.each do |str|
     
    424459
    425460clist = [
    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)
    555604        idx = 0
    556605        clist.each do |str|
     
    562611
    563612racc_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 ]
    604658
    605659racc_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 ]
    646705
    647706racc_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,
    678740   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    679741   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,
    714743   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    715744   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
     745   306 ]
     746
     747racc_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,
    716776   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 ]
    718787
    719788racc_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 ]
    728798
    729799racc_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 ]
    738809
    739810racc_reduce_table = [
    740811  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,
    761823  1, 104, :_reduce_none,
     824  4, 104, :_reduce_13,
    762825  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,
    777836  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,
    784848  1, 112, :_reduce_none,
    785   3, 112, :_reduce_45,
    786   3, 112, :_reduce_46,
     849  4, 112, :_reduce_38,
    787850  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,
    792854  1, 114, :_reduce_none,
    793   3, 114, :_reduce_53,
    794   3, 114, :_reduce_54,
     855  3, 114, :_reduce_44,
     856  3, 114, :_reduce_45,
    795857  1, 115, :_reduce_none,
    796   3, 115, :_reduce_56,
     858  3, 115, :_reduce_47,
     859  3, 115, :_reduce_48,
    797860  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,
    799865  1, 117, :_reduce_none,
    800   3, 117, :_reduce_60,
     866  3, 117, :_reduce_55,
     867  3, 117, :_reduce_56,
    801868  1, 118, :_reduce_none,
    802   3, 118, :_reduce_62,
     869  3, 118, :_reduce_58,
    803870  1, 119, :_reduce_none,
    804   3, 119, :_reduce_64,
     871  3, 119, :_reduce_60,
    805872  1, 120, :_reduce_none,
    806   5, 120, :_reduce_66,
    807   1, 102, :_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,
    811878  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,
    818899  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,
    851933  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,
    859938  2, 143, :_reduce_none,
    860939  2, 143, :_reduce_none,
    861   1, 144, :_reduce_none,
    862   3, 144, :_reduce_none,
     940  2, 145, :_reduce_129,
    863941  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,
    870953  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,
    887957  1, 151, :_reduce_none,
    888   5, 151, :_reduce_none,
     958  3, 151, :_reduce_none,
    889959  1, 152, :_reduce_none,
     960  2, 152, :_reduce_none,
    890961  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,
    893970  1, 153, :_reduce_none,
    894   1, 109, :_reduce_none,
    895   2, 109, :_reduce_none,
     971  3, 153, :_reduce_none,
    896972  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,
    916997  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,
    9181004  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,
    9301012  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,
    9311028  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,
    9521051  3, 171, :_reduce_none,
    953   2, 171, :_reduce_none,
    954   2, 171, :_reduce_none,
     1052  4, 171, :_reduce_none,
    9551053  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,
    9571061  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
     1081racc_reduce_n = 269
     1082
     1083racc_shift_n = 447
    9851084
    9861085racc_token_table = {
     
    10021101  "++" => 15,
    10031102  "--" => 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
     1184racc_nt_base = 97
    10851185
    10861186racc_use_result_var = true
     
    11201220  "\"++\"",
    11211221  "\"--\"",
     1222  "\"{\"",
     1223  "\"}\"",
    11221224  "\",\"",
    11231225  "SIZEOF",
     
    11441246  "\"?\"",
    11451247  "\":\"",
    1146   "\";\"",
    11471248  "\"=\"",
    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",
    11821249  "\"+=\"",
    11831250  "\"-=\"",
     
    11901257  "\"|=\"",
    11911258  "\"^=\"",
     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",
    11921281  "__INLINE__",
    11931282  "INLINE",
    11941283  "__INLINE",
    11951284  "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",
    12001300  "\"::\"",
     1301  "_ASM",
    12011302  "$start",
    12021303  "all",
     
    12071308  "expression",
    12081309  "postfix_expression",
    1209   "argument_list",
     1310  "argument_expression_list",
    12101311  "type_qualifier",
     1312  "type_name",
     1313  "initializer_list",
     1314  "assignment_expression",
    12111315  "unary_expression",
    12121316  "unary_operator",
    12131317  "cast_expression",
    1214   "type_name",
    12151318  "multiplicative_expression",
    12161319  "additive_expression",
     
    12241327  "logical_or_expression",
    12251328  "conditional_expression",
     1329  "assignment_operator",
    12261330  "constant_expression",
    12271331  "declaration",
    12281332  "declaration_specifiers",
    12291333  "init_declarator_list",
    1230   "storage_class",
     1334  "storage_class_specifier",
    12311335  "type_specifier",
     1336  "function_specifier",
    12321337  "init_declarator",
    12331338  "declarator",
     
    12361341  "union_specifier",
    12371342  "enum_specifier",
     1343  "struct_term",
    12381344  "struct_tag",
    12391345  "struct_declaration_list",
     
    12421348  "struct_declaration",
    12431349  "struct_declarator_list",
    1244   "type_specifier_qualifier_list",
     1350  "specifier_qualifier_list",
    12451351  "struct_declarator",
     1352  "union_term",
    12461353  "union_tag",
    12471354  "union_declaration_list",
     
    12491356  "union_declarator_list",
    12501357  "union_declarator",
    1251   "enum_type",
    12521358  "enumerator_list",
    12531359  "enumerator",
     
    12551361  "direct_declarator",
    12561362  "parameter_type_list",
     1363  "identifier_list",
     1364  "type_qualifier_list",
    12571365  "parameter_list",
    12581366  "parameter_declaration",
    12591367  "abstract_declarator",
    12601368  "direct_abstract_declarator",
    1261   "initializer_list",
    12621369  "extension_statement",
    1263   "statement",
     1370  "cdl_statement",
    12641371  "typedef",
    12651372  "func_def",
    12661373  "declarator_list",
    1267   "compoundstatement",
    1268   "infunc_statement_list",
    1269   "infunc_statement",
     1374  "compound_statement",
     1375  "statement",
     1376  "labeled_statement",
     1377  "expression_statement",
    12701378  "ifstatement",
    12711379  "whilestatement",
     
    12731381  "forstatement",
    12741382  "switchstatement",
    1275   "labelstatement",
    1276   "gotostatement",
    1277   "expressionstatement",
    1278   "assignment_operator" ]
     1383  "jump_statement",
     1384  "asm_statement",
     1385  "block_item_list",
     1386  "block_item" ]
    12791387
    12801388Racc_debug_parser = false
     
    12861394# reduce 1 omitted
    12871395
    1288 module_eval(<<'.,.,', 'C_parser.y.rb', 52)
     1396module_eval(<<'.,.,', 'C_parser.y.rb', 57)
    12891397  def _reduce_2(val, _values, result)
    12901398     result = [ :IDENTIFIER, val[0] ]
     
    12931401.,.,
    12941402
    1295 module_eval(<<'.,.,', 'C_parser.y.rb', 60)
     1403module_eval(<<'.,.,', 'C_parser.y.rb', 65)
    12961404  def _reduce_3(val, _values, result)
    12971405     result = [ :INTEGER_CONSTANT, val[0] ]
     
    13001408.,.,
    13011409
    1302 module_eval(<<'.,.,', 'C_parser.y.rb', 62)
     1410module_eval(<<'.,.,', 'C_parser.y.rb', 67)
    13031411  def _reduce_4(val, _values, result)
    13041412     result = [ :FLOATING_CONSTANT, val[0] ]
     
    13071415.,.,
    13081416
    1309 module_eval(<<'.,.,', 'C_parser.y.rb', 64)
     1417module_eval(<<'.,.,', 'C_parser.y.rb', 69)
    13101418  def _reduce_5(val, _values, result)
    13111419     result = [ :OCTAL_CONSTANT, val[0] ]
     
    13141422.,.,
    13151423
    1316 module_eval(<<'.,.,', 'C_parser.y.rb', 66)
     1424module_eval(<<'.,.,', 'C_parser.y.rb', 71)
    13171425  def _reduce_6(val, _values, result)
    13181426     result = [ :HEX_CONSTANT, val[0] ]
     
    13211429.,.,
    13221430
    1323 module_eval(<<'.,.,', 'C_parser.y.rb', 68)
     1431module_eval(<<'.,.,', 'C_parser.y.rb', 73)
    13241432  def _reduce_7(val, _values, result)
    13251433     result = [ :CHARACTER_LITERAL, val[0] ]
     
    13281436.,.,
    13291437
    1330 module_eval(<<'.,.,', 'C_parser.y.rb', 70)
     1438module_eval(<<'.,.,', 'C_parser.y.rb', 75)
    13311439  def _reduce_8(val, _values, result)
    13321440     result = [ :STRING_LITERAL_LIST, val[0] ]
     
    13351443.,.,
    13361444
    1337 module_eval(<<'.,.,', 'C_parser.y.rb', 72)
     1445module_eval(<<'.,.,', 'C_parser.y.rb', 77)
    13381446  def _reduce_9(val, _values, result)
    13391447     result = [ :PARENTHESES, val[1].get_elements ]
     
    13421450.,.,
    13431451
    1344 module_eval(<<'.,.,', 'C_parser.y.rb', 76)
     1452module_eval(<<'.,.,', 'C_parser.y.rb', 81)
    13451453  def _reduce_10(val, _values, result)
    13461454     result = [val[0]]
     
    13491457.,.,
    13501458
    1351 module_eval(<<'.,.,', 'C_parser.y.rb', 78)
     1459module_eval(<<'.,.,', 'C_parser.y.rb', 83)
    13521460  def _reduce_11(val, _values, result)
    13531461     result << val[1]
     
    13581466# reduce 12 omitted
    13591467
    1360 # reduce 13 omitted
     1468module_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.,.,
    13611474
    13621475# reduce 14 omitted
    13631476
    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
     1481module_eval(<<'.,.,', 'C_parser.y.rb', 94)
     1482  def _reduce_17(val, _values, result)
    13731483     result = [ :OP_DOT, val[0], val[2] ]
    13741484    result
     
    13761486.,.,
    13771487
    1378 module_eval(<<'.,.,', 'C_parser.y.rb', 90)
    1379   def _reduce_17(val, _values, result)
     1488module_eval(<<'.,.,', 'C_parser.y.rb', 96)
     1489  def _reduce_18(val, _values, result)
    13801490     result = [ :OP_REF, val[0], val[2] ]
    13811491    result
     
    13831493.,.,
    13841494
    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)
     1495module_eval(<<'.,.,', 'C_parser.y.rb', 97)
    13931496  def _reduce_19(val, _values, result)
    13941497     result = val[0]
     
    13971500.,.,
    13981501
    1399 # reduce 20 omitted
     1502module_eval(<<'.,.,', 'C_parser.y.rb', 98)
     1503  def _reduce_20(val, _values, result)
     1504     result = val[0]
     1505    result
     1506  end
     1507.,.,
    14001508
    14011509# reduce 21 omitted
     
    14051513# reduce 23 omitted
    14061514
    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
     1519module_eval(<<'.,.,', 'C_parser.y.rb', 111)
     1520  def _reduce_26(val, _values, result)
    14091521     result = [ val[0], val[1] ]
    14101522    result
     
    14121524.,.,
    14131525
    1414 module_eval(<<'.,.,', 'C_parser.y.rb', 106)
    1415   def _reduce_25(val, _values, result)
     1526module_eval(<<'.,.,', 'C_parser.y.rb', 113)
     1527  def _reduce_27(val, _values, result)
    14161528     result = [ :OP_SIZEOF_EXPR, val[1] ]
    14171529    result
     
    14191531.,.,
    14201532
    1421 module_eval(<<'.,.,', 'C_parser.y.rb', 108)
    1422   def _reduce_26(val, _values, result)
     1533module_eval(<<'.,.,', 'C_parser.y.rb', 115)
     1534  def _reduce_28(val, _values, result)
    14231535     result = [ :OP_SIZEOF_TYPE, val[1] ]
    14241536    result
     
    14261538.,.,
    14271539
    1428 module_eval(<<'.,.,', 'C_parser.y.rb', 109)
    1429   def _reduce_27(val, _values, result)
     1540module_eval(<<'.,.,', 'C_parser.y.rb', 116)
     1541  def _reduce_29(val, _values, result)
    14301542     result = val[1]
    14311543    result
     
    14331545.,.,
    14341546
    1435 module_eval(<<'.,.,', 'C_parser.y.rb', 110)
    1436   def _reduce_28(val, _values, result)
     1547module_eval(<<'.,.,', 'C_parser.y.rb', 117)
     1548  def _reduce_30(val, _values, result)
    14371549     result = val[1]
    14381550    result
     
    14401552.,.,
    14411553
    1442 module_eval(<<'.,.,', 'C_parser.y.rb', 113)
    1443   def _reduce_29(val, _values, result)
     1554module_eval(<<'.,.,', 'C_parser.y.rb', 120)
     1555  def _reduce_31(val, _values, result)
    14441556     result = :OP_U_AMP
    14451557    result
     
    14471559.,.,
    14481560
    1449 module_eval(<<'.,.,', 'C_parser.y.rb', 114)
    1450   def _reduce_30(val, _values, result)
     1561module_eval(<<'.,.,', 'C_parser.y.rb', 121)
     1562  def _reduce_32(val, _values, result)
    14511563     result = :OP_U_ASTER
    14521564    result
     
    14541566.,.,
    14551567
    1456 module_eval(<<'.,.,', 'C_parser.y.rb', 115)
    1457   def _reduce_31(val, _values, result)
     1568module_eval(<<'.,.,', 'C_parser.y.rb', 122)
     1569  def _reduce_33(val, _values, result)
    14581570     result = :OP_U_PLUS
    14591571    result
     
    14611573.,.,
    14621574
    1463 module_eval(<<'.,.,', 'C_parser.y.rb', 116)
    1464   def _reduce_32(val, _values, result)
     1575module_eval(<<'.,.,', 'C_parser.y.rb', 123)
     1576  def _reduce_34(val, _values, result)
    14651577     result = :OP_U_MINUS
    14661578    result
     
    14681580.,.,
    14691581
    1470 module_eval(<<'.,.,', 'C_parser.y.rb', 117)
    1471   def _reduce_33(val, _values, result)
     1582module_eval(<<'.,.,', 'C_parser.y.rb', 124)
     1583  def _reduce_35(val, _values, result)
    14721584     result = :OP_U_TILDE
    14731585    result
     
    14751587.,.,
    14761588
    1477 module_eval(<<'.,.,', 'C_parser.y.rb', 118)
    1478   def _reduce_34(val, _values, result)
     1589module_eval(<<'.,.,', 'C_parser.y.rb', 125)
     1590  def _reduce_36(val, _values, result)
    14791591     result = :OP_U_EXCLAM
    14801592    result
     
    14821594.,.,
    14831595
    1484 # reduce 35 omitted
    1485 
    1486 module_eval(<<'.,.,', 'C_parser.y.rb', 123)
    1487   def _reduce_36(val, _values, result)
     1596# reduce 37 omitted
     1597
     1598module_eval(<<'.,.,', 'C_parser.y.rb', 130)
     1599  def _reduce_38(val, _values, result)
    14881600      result = [ :CAST, val[1], val[3] ]
    14891601    result
     
    14911603.,.,
    14921604
    1493 # reduce 37 omitted
    1494 
    1495 module_eval(<<'.,.,', 'C_parser.y.rb', 128)
    1496   def _reduce_38(val, _values, result)
     1605# reduce 39 omitted
     1606
     1607module_eval(<<'.,.,', 'C_parser.y.rb', 135)
     1608  def _reduce_40(val, _values, result)
    14971609     result = [ :OP_MULT, val[0], val[2] ] 
    14981610    result
     
    15001612.,.,
    15011613
    1502 module_eval(<<'.,.,', 'C_parser.y.rb', 130)
    1503   def _reduce_39(val, _values, result)
     1614module_eval(<<'.,.,', 'C_parser.y.rb', 137)
     1615  def _reduce_41(val, _values, result)
    15041616     result = [ :OP_DIV, val[0], val[2] ] 
    15051617    result
     
    15071619.,.,
    15081620
    1509 module_eval(<<'.,.,', 'C_parser.y.rb', 132)
    1510   def _reduce_40(val, _values, result)
     1621module_eval(<<'.,.,', 'C_parser.y.rb', 139)
     1622  def _reduce_42(val, _values, result)
    15111623     result = [ :OP_REMAIN, val[0], val[2] ] 
    15121624    result
     
    15141626.,.,
    15151627
    1516 # reduce 41 omitted
    1517 
    1518 module_eval(<<'.,.,', 'C_parser.y.rb', 137)
    1519   def _reduce_42(val, _values, result)
     1628# reduce 43 omitted
     1629
     1630module_eval(<<'.,.,', 'C_parser.y.rb', 144)
     1631  def _reduce_44(val, _values, result)
    15201632     result = [ :OP_ADD, val[0], val[2] ] 
    15211633    result
     
    15231635.,.,
    15241636
    1525 module_eval(<<'.,.,', 'C_parser.y.rb', 139)
    1526   def _reduce_43(val, _values, result)
     1637module_eval(<<'.,.,', 'C_parser.y.rb', 146)
     1638  def _reduce_45(val, _values, result)
    15271639     result = [ :OP_SUB, val[0], val[2] ] 
    15281640    result
     
    15301642.,.,
    15311643
    1532 # reduce 44 omitted
    1533 
    1534 module_eval(<<'.,.,', 'C_parser.y.rb', 144)
    1535   def _reduce_45(val, _values, result)
     1644# reduce 46 omitted
     1645
     1646module_eval(<<'.,.,', 'C_parser.y.rb', 151)
     1647  def _reduce_47(val, _values, result)
    15361648     result = [ :OP_LSFT, val[0], val[2] ] 
    15371649    result
     
    15391651.,.,
    15401652
    1541 module_eval(<<'.,.,', 'C_parser.y.rb', 146)
    1542   def _reduce_46(val, _values, result)
     1653module_eval(<<'.,.,', 'C_parser.y.rb', 153)
     1654  def _reduce_48(val, _values, result)
    15431655     result = [ :OP_RSFT, val[0], val[2] ] 
    15441656    result
     
    15461658.,.,
    15471659
    1548 # reduce 47 omitted
    1549 
    1550 module_eval(<<'.,.,', 'C_parser.y.rb', 151)
    1551   def _reduce_48(val, _values, result)
     1660# reduce 49 omitted
     1661
     1662module_eval(<<'.,.,', 'C_parser.y.rb', 158)
     1663  def _reduce_50(val, _values, result)
    15521664     result = [ :OP_LT, val[0], val[2] ] 
    15531665    result
     
    15551667.,.,
    15561668
    1557 module_eval(<<'.,.,', 'C_parser.y.rb', 153)
    1558   def _reduce_49(val, _values, result)
     1669module_eval(<<'.,.,', 'C_parser.y.rb', 160)
     1670  def _reduce_51(val, _values, result)
    15591671     result = [ :OP_GT, val[0], val[2] ] 
    15601672    result
     
    15621674.,.,
    15631675
    1564 module_eval(<<'.,.,', 'C_parser.y.rb', 155)
    1565   def _reduce_50(val, _values, result)
     1676module_eval(<<'.,.,', 'C_parser.y.rb', 162)
     1677  def _reduce_52(val, _values, result)
    15661678     result = [ :OP_LE, val[0], val[2] ] 
    15671679    result
     
    15691681.,.,
    15701682
    1571 module_eval(<<'.,.,', 'C_parser.y.rb', 157)
    1572   def _reduce_51(val, _values, result)
     1683module_eval(<<'.,.,', 'C_parser.y.rb', 164)
     1684  def _reduce_53(val, _values, result)
    15731685     result = [ :OP_GE, val[0], val[2] ] 
    15741686    result
     
    15761688.,.,
    15771689
    1578 # reduce 52 omitted
    1579 
    1580 module_eval(<<'.,.,', 'C_parser.y.rb', 162)
    1581   def _reduce_53(val, _values, result)
     1690# reduce 54 omitted
     1691
     1692module_eval(<<'.,.,', 'C_parser.y.rb', 169)
     1693  def _reduce_55(val, _values, result)
    15821694     result = [ :OP_EQ, val[0], val[2] ] 
    15831695    result
     
    15851697.,.,
    15861698
    1587 module_eval(<<'.,.,', 'C_parser.y.rb', 164)
    1588   def _reduce_54(val, _values, result)
     1699module_eval(<<'.,.,', 'C_parser.y.rb', 171)
     1700  def _reduce_56(val, _values, result)
    15891701     result = [ :OP_NE, val[0], val[2] ] 
    15901702    result
     
    15921704.,.,
    15931705
    1594 # reduce 55 omitted
    1595 
    1596 module_eval(<<'.,.,', 'C_parser.y.rb', 169)
    1597   def _reduce_56(val, _values, result)
     1706# reduce 57 omitted
     1707
     1708module_eval(<<'.,.,', 'C_parser.y.rb', 176)
     1709  def _reduce_58(val, _values, result)
    15981710     result = [ :OP_AND, val[0], val[2] ] 
    15991711    result
     
    16011713.,.,
    16021714
    1603 # reduce 57 omitted
    1604 
    1605 module_eval(<<'.,.,', 'C_parser.y.rb', 174)
    1606   def _reduce_58(val, _values, result)
     1715# reduce 59 omitted
     1716
     1717module_eval(<<'.,.,', 'C_parser.y.rb', 181)
     1718  def _reduce_60(val, _values, result)
    16071719     result = [ :OP_EOR, val[0], val[2] ] 
    16081720    result
     
    16101722.,.,
    16111723
    1612 # reduce 59 omitted
    1613 
    1614 module_eval(<<'.,.,', 'C_parser.y.rb', 179)
    1615   def _reduce_60(val, _values, result)
     1724# reduce 61 omitted
     1725
     1726module_eval(<<'.,.,', 'C_parser.y.rb', 186)
     1727  def _reduce_62(val, _values, result)
    16161728     result = [ :OP_OR, val[0], val[2] ] 
    16171729    result
     
    16191731.,.,
    16201732
    1621 # reduce 61 omitted
    1622 
    1623 module_eval(<<'.,.,', 'C_parser.y.rb', 184)
    1624   def _reduce_62(val, _values, result)
     1733# reduce 63 omitted
     1734
     1735module_eval(<<'.,.,', 'C_parser.y.rb', 191)
     1736  def _reduce_64(val, _values, result)
    16251737     result = [ :OP_LAND, val[0], val[2] ] 
    16261738    result
     
    16281740.,.,
    16291741
    1630 # reduce 63 omitted
    1631 
    1632 module_eval(<<'.,.,', 'C_parser.y.rb', 189)
    1633   def _reduce_64(val, _values, result)
     1742# reduce 65 omitted
     1743
     1744module_eval(<<'.,.,', 'C_parser.y.rb', 196)
     1745  def _reduce_66(val, _values, result)
    16341746     result = [ :OP_LOR, val[0], val[2] ] 
    16351747    result
     
    16371749.,.,
    16381750
    1639 # reduce 65 omitted
    1640 
    1641 module_eval(<<'.,.,', 'C_parser.y.rb', 194)
    1642   def _reduce_66(val, _values, result)
     1751# reduce 67 omitted
     1752
     1753module_eval(<<'.,.,', 'C_parser.y.rb', 201)
     1754  def _reduce_68(val, _values, result)
    16431755     result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ] 
    16441756    result
     
    16461758.,.,
    16471759
    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
     1786module_eval(<<'.,.,', 'C_parser.y.rb', 223)
     1787  def _reduce_82(val, _values, result)
    16501788                        result = Expression.new( val[0] )
    16511789                        # result.print
     
    16551793.,.,
    16561794
    1657 module_eval(<<'.,.,', 'C_parser.y.rb', 208)
    1658   def _reduce_68(val, _values, result)
     1795module_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
     1803module_eval(<<'.,.,', 'C_parser.y.rb', 234)
     1804  def _reduce_84(val, _values, result)
    16591805                        result = Expression.new( val[0] )
    16601806                        # result.print
     
    16711817.,.,
    16721818
    1673 # reduce 69 omitted
    1674 
    1675 module_eval(<<'.,.,', 'C_parser.y.rb', 237)
    1676   def _reduce_70(val, _values, result)
     1819# reduce 85 omitted
     1820
     1821module_eval(<<'.,.,', 'C_parser.y.rb', 261)
     1822  def _reduce_86(val, _values, result)
    16771823                        result = CIntType.new( -3 )    # storage class は無視
    16781824               
     
    16811827.,.,
    16821828
    1683 # reduce 71 omitted
    1684 
    1685 module_eval(<<'.,.,', 'C_parser.y.rb', 242)
    1686   def _reduce_72(val, _values, result)
     1829module_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
     1839module_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
     1847module_eval(<<'.,.,', 'C_parser.y.rb', 274)
     1848  def _reduce_90(val, _values, result)
    16871849                        result = CIntType.new( -3 )
    16881850                        result.set_qualifier val[0]
     
    16921854.,.,
    16931855
    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)
     1856module_eval(<<'.,.,', 'C_parser.y.rb', 279)
     1857  def _reduce_91(val, _values, result)
    17121858                        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
     1869module_eval(<<'.,.,', 'C_parser.y.rb', 287)
     1870  def _reduce_94(val, _values, result)
    17211871     result = [val[0]]
    17221872    result
     
    17241874.,.,
    17251875
    1726 module_eval(<<'.,.,', 'C_parser.y.rb', 264)
    1727   def _reduce_77(val, _values, result)
     1876module_eval(<<'.,.,', 'C_parser.y.rb', 289)
     1877  def _reduce_95(val, _values, result)
    17281878     result << val[2]
    17291879    result
     
    17311881.,.,
    17321882
    1733 # reduce 78 omitted
    1734 
    1735 module_eval(<<'.,.,', 'C_parser.y.rb', 269)
    1736   def _reduce_79(val, _values, result)
     1883# reduce 96 omitted
     1884
     1885module_eval(<<'.,.,', 'C_parser.y.rb', 294)
     1886  def _reduce_97(val, _values, result)
    17371887     val[0].set_initializer( val[2] )
    17381888    result
     
    17401890.,.,
    17411891
    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
     1900module_eval(<<'.,.,', 'C_parser.y.rb', 304)
     1901  def _reduce_102(val, _values, result)
    17441902     set_no_type_name true; result = CVoidType.new
    17451903    result
     
    17471905.,.,
    17481906
    1749 module_eval(<<'.,.,', 'C_parser.y.rb', 273)
    1750   def _reduce_81(val, _values, result)
     1907module_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
     1914module_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
     1921module_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
     1928module_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
     1935module_eval(<<'.,.,', 'C_parser.y.rb', 314)
     1936  def _reduce_107(val, _values, result)
    17511937     set_no_type_name true; result = CFloatType.new(-32)
    17521938    result
     
    17541940.,.,
    17551941
    1756 module_eval(<<'.,.,', 'C_parser.y.rb', 274)
    1757   def _reduce_82(val, _values, result)
     1942module_eval(<<'.,.,', 'C_parser.y.rb', 316)
     1943  def _reduce_108(val, _values, result)
    17581944     set_no_type_name true; result = CFloatType.new(-64)
    17591945    result
     
    17611947.,.,
    17621948
    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)
     1949module_eval(<<'.,.,', 'C_parser.y.rb', 319)
     1950  def _reduce_109(val, _values, result)
    18281951                        set_no_type_name true
    18291952                        result = CIntType.new( -3 )
     
    18341957.,.,
    18351958
    1836 module_eval(<<'.,.,', 'C_parser.y.rb', 293)
    1837   def _reduce_93(val, _values, result)
     1959module_eval(<<'.,.,', 'C_parser.y.rb', 325)
     1960  def _reduce_110(val, _values, result)
    18381961                        set_no_type_name true
    18391962                        result = CIntType.new( -3 )
     
    18441967.,.,
    18451968
    1846 module_eval(<<'.,.,', 'C_parser.y.rb', 301)
    1847   def _reduce_94(val, _values, result)
     1969module_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
     1976module_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
     1983module_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
     1990module_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
     1997module_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
     2004module_eval(<<'.,.,', 'C_parser.y.rb', 344)
     2005  def _reduce_116(val, _values, result)
    18482006     StructType.set_define( true ) 
    18492007    result
     
    18512009.,.,
    18522010
    1853 module_eval(<<'.,.,', 'C_parser.y.rb', 304)
    1854   def _reduce_95(val, _values, result)
     2011module_eval(<<'.,.,', 'C_parser.y.rb', 347)
     2012  def _reduce_117(val, _values, result)
    18552013                        StructType.end_of_parse
    18562014                        result = val[1]
     
    18602018.,.,
    18612019
    1862 module_eval(<<'.,.,', 'C_parser.y.rb', 309)
    1863   def _reduce_96(val, _values, result)
     2020module_eval(<<'.,.,', 'C_parser.y.rb', 353)
     2021  def _reduce_118(val, _values, result)
    18642022                        result = CStructType.new()
    18652023                        StructType.set_define( true )
     
    18692027.,.,
    18702028
    1871 module_eval(<<'.,.,', 'C_parser.y.rb', 314)
    1872   def _reduce_97(val, _values, result)
     2029module_eval(<<'.,.,', 'C_parser.y.rb', 358)
     2030  def _reduce_119(val, _values, result)
    18732031                        StructType.end_of_parse
    18742032                        result = val[1]
     
    18782036.,.,
    18792037
    1880 module_eval(<<'.,.,', 'C_parser.y.rb', 319)
    1881   def _reduce_98(val, _values, result)
     2038module_eval(<<'.,.,', 'C_parser.y.rb', 364)
     2039  def _reduce_120(val, _values, result)
    18822040                        StructType.set_define( false )
    18832041                        StructType.end_of_parse
     
    18882046.,.,
    18892047
    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)
     2048module_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
     2059module_eval(<<'.,.,', 'C_parser.y.rb', 379)
     2060  def _reduce_124(val, _values, result)
    18962061                        result = CStructType.new( val[0].val )
    18972062                        set_no_type_name true
     
    19012066.,.,
    19022067
    1903 module_eval(<<'.,.,', 'C_parser.y.rb', 340)
    1904   def _reduce_102(val, _values, result)
     2068module_eval(<<'.,.,', 'C_parser.y.rb', 388)
     2069  def _reduce_125(val, _values, result)
    19052070                        val[1].each { |i|       # i: Decl
    19062071                                i.set_type( val[0] )
     
    19152080.,.,
    19162081
    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)
     2082module_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
     2100module_eval(<<'.,.,', 'C_parser.y.rb', 417)
     2101  def _reduce_129(val, _values, result)
    19252102                        result = val[1].merge val[0]
    19262103               
     
    19292106.,.,
    19302107
    1931 module_eval(<<'.,.,', 'C_parser.y.rb', 363)
    1932   def _reduce_107(val, _values, result)
     2108# reduce 130 omitted
     2109
     2110module_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
     2119module_eval(<<'.,.,', 'C_parser.y.rb', 427)
     2120  def _reduce_132(val, _values, result)
    19332121                        result = CIntType.new( -3 )
    19342122                        result.set_qualifier val[0]
     
    19382126.,.,
    19392127
    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)
     2128module_eval(<<'.,.,', 'C_parser.y.rb', 433)
     2129  def _reduce_133(val, _values, result)
    19512130     result = [ val[0] ]
    19522131    result
     
    19542133.,.,
    19552134
    1956 module_eval(<<'.,.,', 'C_parser.y.rb', 376)
    1957   def _reduce_110(val, _values, result)
     2135module_eval(<<'.,.,', 'C_parser.y.rb', 435)
     2136  def _reduce_134(val, _values, result)
    19582137     result << val[2]
    19592138    result
     
    19612140.,.,
    19622141
    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
     2150module_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
     2203module_eval(<<'.,.,', 'C_parser.y.rb', 495)
     2204  def _reduce_163(val, _values, result)
    20122205     result = :CONST
    20132206    result
     
    20152208.,.,
    20162209
    2017 module_eval(<<'.,.,', 'C_parser.y.rb', 435)
    2018   def _reduce_133(val, _values, result)
     2210# reduce 164 omitted
     2211
     2212module_eval(<<'.,.,', 'C_parser.y.rb', 498)
     2213  def _reduce_165(val, _values, result)
    20192214     result = :VOLATILE
    20202215    result
     
    20222217.,.,
    20232218
    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
     2227module_eval(<<'.,.,', 'C_parser.y.rb', 509)
     2228  def _reduce_170(val, _values, result)
    20262229                        val[1].set_type( val[0] )
    20272230                        result = val[1]
     
    20312234.,.,
    20322235
    2033 # reduce 135 omitted
    2034 
    2035 module_eval(<<'.,.,', 'C_parser.y.rb', 446)
    2036   def _reduce_136(val, _values, result)
     2236# reduce 171 omitted
     2237
     2238module_eval(<<'.,.,', 'C_parser.y.rb', 515)
     2239  def _reduce_172(val, _values, result)
    20372240                        result = Decl.new( val[1].val )
    20382241                        result.set_type( val[0] )
     
    20422245.,.,
    20432246
    2044 module_eval(<<'.,.,', 'C_parser.y.rb', 452)
    2045   def _reduce_137(val, _values, result)
     2247module_eval(<<'.,.,', 'C_parser.y.rb', 521)
     2248  def _reduce_173(val, _values, result)
    20462249     result = Decl.new( val[0].val )
    20472250    result
     
    20492252.,.,
    20502253
    2051 module_eval(<<'.,.,', 'C_parser.y.rb', 454)
    2052   def _reduce_138(val, _values, result)
     2254module_eval(<<'.,.,', 'C_parser.y.rb', 523)
     2255  def _reduce_174(val, _values, result)
    20532256     result = val[1]
    20542257    result
     
    20562259.,.,
    20572260
    2058 module_eval(<<'.,.,', 'C_parser.y.rb', 457)
    2059   def _reduce_139(val, _values, result)
     2261module_eval(<<'.,.,', 'C_parser.y.rb', 526)
     2262  def _reduce_175(val, _values, result)
    20602263                        val[0].set_type( CArrayType.new( val[2] ) )
    20612264                        result = val[0]
     
    20652268.,.,
    20662269
    2067 module_eval(<<'.,.,', 'C_parser.y.rb', 462)
    2068   def _reduce_140(val, _values, result)
     2270module_eval(<<'.,.,', 'C_parser.y.rb', 531)
     2271  def _reduce_176(val, _values, result)
    20692272                        val[0].set_type( CArrayType.new )
    20702273                        result = val[0]
     
    20742277.,.,
    20752278
    2076 module_eval(<<'.,.,', 'C_parser.y.rb', 467)
    2077   def _reduce_141(val, _values, result)
     2279module_eval(<<'.,.,', 'C_parser.y.rb', 536)
     2280  def _reduce_177(val, _values, result)
    20782281                #       Generator.warning( "W6001 need 'void' for no parameter"  )
    20792282                        val[0].set_type( CFuncType.new )
     
    20842287.,.,
    20852288
    2086 module_eval(<<'.,.,', 'C_parser.y.rb', 475)
    2087   def _reduce_142(val, _values, result)
     2289# reduce 178 omitted
     2290
     2291module_eval(<<'.,.,', 'C_parser.y.rb', 543)
     2292  def _reduce_179(val, _values, result)
    20882293                #       Generator.warning( "W6002 need 'void' for no parameter"  )
    20892294                        val[0].set_type( CFuncType.new )
     
    20942299.,.,
    20952300
    2096 module_eval(<<'.,.,', 'C_parser.y.rb', 482)
    2097   def _reduce_143(val, _values, result)
     2301module_eval(<<'.,.,', 'C_parser.y.rb', 550)
     2302  def _reduce_180(val, _values, result)
    20982303     result = CPtrType.new
    20992304    result
     
    21012306.,.,
    21022307
    2103 module_eval(<<'.,.,', 'C_parser.y.rb', 485)
    2104   def _reduce_144(val, _values, result)
     2308module_eval(<<'.,.,', 'C_parser.y.rb', 553)
     2309  def _reduce_181(val, _values, result)
    21052310                        result = CPtrType.new
    21062311                        result.set_qualifier( val[1] )
     
    21102315.,.,
    21112316
    2112 module_eval(<<'.,.,', 'C_parser.y.rb', 490)
    2113   def _reduce_145(val, _values, result)
     2317module_eval(<<'.,.,', 'C_parser.y.rb', 558)
     2318  def _reduce_182(val, _values, result)
    21142319                        val[1].set_type(CPtrType.new)
    21152320                        result = val[1]
     
    21192324.,.,
    21202325
    2121 module_eval(<<'.,.,', 'C_parser.y.rb', 495)
    2122   def _reduce_146(val, _values, result)
     2326module_eval(<<'.,.,', 'C_parser.y.rb', 563)
     2327  def _reduce_183(val, _values, result)
    21232328                        ptrtype = CPtrType.new
    21242329                        ptrtype.set_qualifier( val[1] )
     
    21302335.,.,
    21312336
    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
     2379module_eval(<<'.,.,', 'C_parser.y.rb', 630)
     2380  def _reduce_205(val, _values, result)
    21682381                        Generator.warning( "W6003 need 'void' for no parameter"  )
    21692382               
     
    21722385.,.,
    21732386
    2174 # reduce 165 omitted
    2175 
    2176 module_eval(<<'.,.,', 'C_parser.y.rb', 564)
    2177   def _reduce_166(val, _values, result)
     2387# reduce 206 omitted
     2388
     2389module_eval(<<'.,.,', 'C_parser.y.rb', 635)
     2390  def _reduce_207(val, _values, result)
    21782391                        Generator.warning( "W6004 need 'void' for no parameter"  )
    21792392               
     
    21822395.,.,
    21832396
    2184 # reduce 167 omitted
    2185 
    2186 module_eval(<<'.,.,', 'C_parser.y.rb', 571)
    2187   def _reduce_168(val, _values, result)
     2397# reduce 208 omitted
     2398
     2399module_eval(<<'.,.,', 'C_parser.y.rb', 642)
     2400  def _reduce_209(val, _values, result)
    21882401     result = val[0]
    21892402    result
     
    21912404.,.,
    21922405
    2193 module_eval(<<'.,.,', 'C_parser.y.rb', 573)
    2194   def _reduce_169(val, _values, result)
     2406module_eval(<<'.,.,', 'C_parser.y.rb', 644)
     2407  def _reduce_210(val, _values, result)
    21952408     result = val[1]
    21962409    result
     
    21982411.,.,
    21992412
    2200 module_eval(<<'.,.,', 'C_parser.y.rb', 575)
    2201   def _reduce_170(val, _values, result)
     2413module_eval(<<'.,.,', 'C_parser.y.rb', 646)
     2414  def _reduce_211(val, _values, result)
    22022415     result = val[1]
    22032416    result
     
    22052418.,.,
    22062419
    2207 module_eval(<<'.,.,', 'C_parser.y.rb', 577)
    2208   def _reduce_171(val, _values, result)
     2420module_eval(<<'.,.,', 'C_parser.y.rb', 648)
     2421  def _reduce_212(val, _values, result)
    22092422     result = C_EXP.new( val[2] )
    22102423    result
     
    22122425.,.,
    22132426
    2214 module_eval(<<'.,.,', 'C_parser.y.rb', 582)
    2215   def _reduce_172(val, _values, result)
     2427module_eval(<<'.,.,', 'C_parser.y.rb', 653)
     2428  def _reduce_213(val, _values, result)
    22162429                        result = [ val[0] ]
    22172430               
     
    22202433.,.,
    22212434
    2222 module_eval(<<'.,.,', 'C_parser.y.rb', 586)
    2223   def _reduce_173(val, _values, result)
     2435module_eval(<<'.,.,', 'C_parser.y.rb', 657)
     2436  def _reduce_214(val, _values, result)
    22242437                        val[0] << val[2]
    22252438                        result = val[0]
     
    22292442.,.,
    22302443
    2231 # reduce 174 omitted
    2232 
    2233 # reduce 175 omitted
    2234 
    2235 # reduce 176 omitted
    2236 
    2237 # reduce 177 omitted
    2238 
    2239 # reduce 178 omitted
    2240 
    2241 # reduce 179 omitted
    2242 
    2243 # reduce 180 omitted
    2244 
    2245 # reduce 181 omitted
    2246 
    2247 # reduce 182 omitted
    2248 
    2249 # reduce 183 omitted
    2250 
    2251 # reduce 184 omitted
    2252 
    2253 module_eval(<<'.,.,', 'C_parser.y.rb', 614)
    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
     2466module_eval(<<'.,.,', 'C_parser.y.rb', 685)
     2467  def _reduce_226(val, _values, result)
    22552468                        val[2].each{ |i|
    22562469                           i.set_kind( :TYPEDEF )
     
    22632476.,.,
    22642477
    2265 module_eval(<<'.,.,', 'C_parser.y.rb', 623)
    2266   def _reduce_186(val, _values, result)
     2478module_eval(<<'.,.,', 'C_parser.y.rb', 694)
     2479  def _reduce_227(val, _values, result)
    22672480     result = [ val[0] ]
    22682481    result
     
    22702483.,.,
    22712484
    2272 module_eval(<<'.,.,', 'C_parser.y.rb', 625)
    2273   def _reduce_187(val, _values, result)
     2485module_eval(<<'.,.,', 'C_parser.y.rb', 696)
     2486  def _reduce_228(val, _values, result)
    22742487     result << val[2]
    22752488    result
     
    22772490.,.,
    22782491
    2279 # reduce 188 omitted
    2280 
    2281 # reduce 189 omitted
    2282 
    2283 # reduce 190 omitted
    2284 
    2285 # reduce 191 omitted
    2286 
    2287 # reduce 192 omitted
    2288 
    2289 # reduce 193 omitted
    2290 
    2291 # reduce 194 omitted
    2292 
    2293 # reduce 195 omitted
    2294 
    2295 # reduce 196 omitted
    2296 
    2297 # reduce 197 omitted
    2298 
    2299 # reduce 198 omitted
    2300 
    2301 # reduce 199 omitted
    2302 
    2303 # reduce 200 omitted
    2304 
    2305 # reduce 201 omitted
    2306 
    2307 # reduce 202 omitted
    2308 
    2309 # reduce 203 omitted
    2310 
    2311 # reduce 204 omitted
    2312 
    2313 # reduce 205 omitted
    2314 
    2315 # reduce 206 omitted
    2316 
    2317 # reduce 207 omitted
    2318 
    2319 # reduce 208 omitted
    2320 
    2321 # reduce 209 omitted
    2322 
    2323 # reduce 210 omitted
    2324 
    2325 # reduce 211 omitted
    2326 
    2327 # reduce 212 omitted
    2328 
    2329 # reduce 213 omitted
    2330 
    2331 # reduce 214 omitted
    2332 
    2333 # reduce 215 omitted
    2334 
    2335 # reduce 216 omitted
    2336 
    2337 # reduce 217 omitted
    2338 
    2339 # reduce 218 omitted
    2340 
    2341 # reduce 219 omitted
    2342 
    2343 # reduce 220 omitted
    2344 
    2345 # reduce 221 omitted
    2346 
    2347 # reduce 222 omitted
    2348 
    2349 # reduce 223 omitted
    2350 
    2351 # reduce 224 omitted
    2352 
    2353 # reduce 225 omitted
    2354 
    2355 # reduce 226 omitted
    2356 
    2357 # reduce 227 omitted
    2358 
    2359 # reduce 228 omitted
    2360 
    23612492# reduce 229 omitted
    23622493
     
    23772508# reduce 237 omitted
    23782509
    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
     2564module_eval(<<'.,.,', 'C_parser.y.rb', 761)
     2565  def _reduce_265(val, _values, result)
    23812566     result = NamespacePath.new( val[0].val, false )
    23822567    result
     
    23842569.,.,
    23852570
    2386 module_eval(<<'.,.,', 'C_parser.y.rb', 707)
    2387   def _reduce_239(val, _values, result)
     2571module_eval(<<'.,.,', 'C_parser.y.rb', 762)
     2572  def _reduce_266(val, _values, result)
    23882573     result = NamespacePath.new( val[1].val, true )
    23892574    result
     
    23912576.,.,
    23922577
    2393 module_eval(<<'.,.,', 'C_parser.y.rb', 709)
    2394   def _reduce_240(val, _values, result)
     2578module_eval(<<'.,.,', 'C_parser.y.rb', 764)
     2579  def _reduce_267(val, _values, result)
    23952580     result = val[0].append!( val[2].val )
     2581    result
     2582  end
     2583.,.,
     2584
     2585module_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               
    23962598    result
    23972599  end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.y.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    8 #   上記著作権者は,以下の(1)(4)の条件を満たす場合に限り,本ソフトウェ
     8#   上記著作権者は,以下の(1)(4)の条件を満たす場合に限り,本ソフトウェ
    99#   ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
    1010#   変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
     
    3535#   の責任を負わない.
    3636
    37 #   $Id$
     37#   $Id: C_parser.y.rb 2810 2018-03-11 13:20:03Z okuma-top $
    3838#++
    3939
     
    4848# argument_expression_list(関数引数), assignment_expression(代入)がない
    4949# 式の result は、すべて配列で第一要素が識別シンボル、第二要素以下が引数
     50#
     51# 2019/3/28 長島 下記のC99の構文に近づくよう変更
     52#(読めないヘッダーファイルがあったため)
     53# http://www.quut.com/c/ANSI-C-grammar-y-1999.html
     54# 元々のコメントと合わなくなっています
    5055
    5156primary_expression
    52         : namespace_identifier
     57                : namespace_identifier
    5358                { result = [ :IDENTIFIER, val[0] ] }     #1ok
    5459#        : IDENTIFIER   # mikan namespace への対応
     
    5863#        | FALSE
    5964#               { result = [ :BOOL_CONSTANT, false ] }
    60         | INTEGER_CONSTANT
     65                | INTEGER_CONSTANT
    6166                { result = [ :INTEGER_CONSTANT, val[0] ] }
    62         | FLOATING_CONSTANT
     67                | FLOATING_CONSTANT
    6368                { result = [ :FLOATING_CONSTANT, val[0] ] }
    64         | OCTAL_CONSTANT
     69                | OCTAL_CONSTANT
    6570                { result = [ :OCTAL_CONSTANT, val[0] ] }
    66         | HEX_CONSTANT
     71                | HEX_CONSTANT
    6772                { result = [ :HEX_CONSTANT, val[0] ] }
    68         | CHARACTER_LITERAL
     73                | CHARACTER_LITERAL
    6974                { result = [ :CHARACTER_LITERAL, val[0] ] }
    70         | string_literal_list
     75                | string_literal_list
    7176                { result = [ :STRING_LITERAL_LIST, val[0] ] }
    72         | '(' expression ')'
     77                | '(' expression ')'
    7378                { result = [ :PARENTHESES, val[1].get_elements ] }
    7479
    7580string_literal_list
    76         : STRING_LITERAL
     81                : STRING_LITERAL
    7782                { result = [val[0]] }
    78         | string_literal_list STRING_LITERAL
     83                | string_literal_list STRING_LITERAL
    7984                { result << val[1] }
    8085
    8186# 関数呼び出しと後置インクリメント、デクリメント演算子がない
    8287postfix_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 ']'
    8790                { 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
    8995                { result = [ :OP_DOT, val[0], val[2] ] }
    90         | postfix_expression '->' IDENTIFIER
     96                | postfix_expression '->' IDENTIFIER
    9197                { 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
     103argument_expression_list
     104                : assignment_expression
     105                | argument_expression_list ',' assignment_expression
    99106
    100107
    101108# 前置インクリメント、デクリメント演算子がない
    102109unary_expression
    103         : postfix_expression
    104         | unary_operator cast_expression
     110                : postfix_expression
     111                | unary_operator cast_expression
    105112                { result = [ val[0], val[1] ] }
    106         | SIZEOF unary_expression
     113                | SIZEOF unary_expression
    107114                { result = [ :OP_SIZEOF_EXPR, val[1] ] }
    108         | SIZEOF '(' type_name ')'
     115                | SIZEOF '(' type_name ')'
    109116                { result = [ :OP_SIZEOF_TYPE, val[1] ] }
    110117                | '++' unary_expression                 { result = val[1] }   # ++, -- は無視する
     
    112119
    113120unary_operator
    114         : '&'   { result = :OP_U_AMP }
    115         | '*'   { result = :OP_U_ASTER }
    116         | '+'   { result = :OP_U_PLUS }
    117         | '-'   { result = :OP_U_MINUS }
    118         | '~'   { result = :OP_U_TILDE }
    119         | '!'   { result = :OP_U_EXCLAM }
     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 }
    120127
    121128cast_expression
    122         : unary_expression
    123         | '(' type_name ')' cast_expression
     129                : unary_expression
     130                | '(' type_name ')' cast_expression
    124131                {  result = [ :CAST, val[1], val[3] ] }
    125132
    126133multiplicative_expression
    127         : cast_expression
    128         | multiplicative_expression '*' cast_expression
     134                : cast_expression
     135                | multiplicative_expression '*' cast_expression
    129136                { result = [ :OP_MULT, val[0], val[2] ]  }
    130         | multiplicative_expression '/' cast_expression
     137                | multiplicative_expression '/' cast_expression
    131138                { result = [ :OP_DIV, val[0], val[2] ]  }
    132         | multiplicative_expression '%' cast_expression
     139                | multiplicative_expression '%' cast_expression
    133140                { result = [ :OP_REMAIN, val[0], val[2] ]  }
    134141
    135142additive_expression
    136         : multiplicative_expression
    137         | additive_expression '+' multiplicative_expression
     143                : multiplicative_expression
     144                | additive_expression '+' multiplicative_expression
    138145                { result = [ :OP_ADD, val[0], val[2] ]  }
    139         | additive_expression '-' multiplicative_expression
     146                | additive_expression '-' multiplicative_expression
    140147                { result = [ :OP_SUB, val[0], val[2] ]  }
    141148
    142149shift_expression
    143         : additive_expression
    144         | shift_expression '<<' additive_expression
     150                : additive_expression
     151                | shift_expression '<<' additive_expression
    145152                { result = [ :OP_LSFT, val[0], val[2] ]  }
    146         | shift_expression '>>' additive_expression
     153                | shift_expression '>>' additive_expression
    147154                { result = [ :OP_RSFT, val[0], val[2] ]  }
    148155
    149156relational_expression
    150         : shift_expression
    151         | relational_expression '<' shift_expression
     157                : shift_expression
     158                | relational_expression '<' shift_expression
    152159                { result = [ :OP_LT, val[0], val[2] ]  }
    153         | relational_expression '>' shift_expression
     160                | relational_expression '>' shift_expression
    154161                { result = [ :OP_GT, val[0], val[2] ]  }
    155         | relational_expression '<=' shift_expression
     162                | relational_expression '<=' shift_expression
    156163                { result = [ :OP_LE, val[0], val[2] ]  }
    157         | relational_expression '>=' shift_expression
     164                | relational_expression '>=' shift_expression
    158165                { result = [ :OP_GE, val[0], val[2] ]  }
    159166
    160167equality_expression
    161         : relational_expression
    162         | equality_expression '==' relational_expression
     168                : relational_expression
     169                | equality_expression '==' relational_expression
    163170                { result = [ :OP_EQ, val[0], val[2] ]  }
    164         | equality_expression '!=' relational_expression
     171                | equality_expression '!=' relational_expression
    165172                { result = [ :OP_NE, val[0], val[2] ]  }
    166173
    167174and_expression
    168         : equality_expression
    169         | and_expression '&' equality_expression
     175                : equality_expression
     176                | and_expression '&' equality_expression
    170177                { result = [ :OP_AND, val[0], val[2] ]  }
    171178
    172179exclusive_or_expression
    173         : and_expression
    174         | exclusive_or_expression '^' and_expression
     180                : and_expression
     181                | exclusive_or_expression '^' and_expression
    175182                { result = [ :OP_EOR, val[0], val[2] ]  }
    176183
    177184inclusive_or_expression
    178         : exclusive_or_expression
    179         | inclusive_or_expression '|' exclusive_or_expression
     185                : exclusive_or_expression
     186                | inclusive_or_expression '|' exclusive_or_expression
    180187                { result = [ :OP_OR, val[0], val[2] ]  }
    181188
    182189logical_and_expression
    183         : inclusive_or_expression
    184         | logical_and_expression '&&' inclusive_or_expression
     190                : inclusive_or_expression
     191                | logical_and_expression '&&' inclusive_or_expression
    185192                { result = [ :OP_LAND, val[0], val[2] ]  }
    186193
    187194logical_or_expression
    188         : logical_and_expression
    189         | logical_or_expression '||' logical_and_expression
     195                : logical_and_expression
     196                | logical_or_expression '||' logical_and_expression
    190197                { result = [ :OP_LOR, val[0], val[2] ]  }
    191198
    192199conditional_expression
    193         : logical_or_expression
    194         | logical_or_expression '?' expression ':' conditional_expression
     200                : logical_or_expression
     201                | logical_or_expression '?' expression ':' conditional_expression
    195202                { result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ]  }
    196203
    197 
    198 # コンマ演算子が使えない
     204assignment_expression
     205                : conditional_expression
     206                | unary_expression assignment_operator assignment_expression
     207
     208assignment_operator
     209                : '='
     210                | '+='
     211                | '-='
     212                | '*='
     213                | '/='
     214                | '%='
     215                | '<<='
     216                | '>>='
     217                | '&='
     218                | '|='
     219                | '^='
     220
    199221expression
    200         : conditional_expression
     222                : assignment_expression
    201223                {
    202224                        result = Expression.new( val[0] )
    203225                        # result.print
    204226                }
     227                | expression ',' assignment_expression
     228                {
     229                        result = Expression.new( val[2] )    # ',' の後ろを採用
     230                }
    205231
    206232constant_expression
    207         : conditional_expression
     233                : conditional_expression
    208234                {
    209235                        result = Expression.new( val[0] )
     
    218244                }
    219245
    220 
    221 
    222246# Types
    223247##########################  宣言  ##########################
     
    227251# K&Rとの違い: storage classが指定できない、型が省略できない
    228252declaration
    229         : declaration_specifiers init_declarator_list ';'
    230 #        : type_specifier_qualifier_list init_declarator_list ';'
     253                : declaration_specifiers init_declarator_list ';'
     254#        : specifier_qualifier_list init_declarator_list ';'
    231255
    232256# declaration_specifiersは関数のパラメータで使われるが、
    233 # type_specifier_qualifier_listで十分かもしれない
     257# specifier_qualifier_listで十分かもしれない
    234258
    235259declaration_specifiers
    236         : storage_class
     260                : storage_class_specifier
    237261                {
    238262                        result = CIntType.new( -3 )    # storage class は無視
    239263                }
    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
    242274                {
    243275                        result = CIntType.new( -3 )
    244276                        result.set_qualifier val[0]
    245277                }
    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
    255279                {
    256280                        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
    260285
    261286init_declarator_list
    262         : init_declarator
     287                : init_declarator
    263288                { result = [val[0]] }
    264         | init_declarator_list ',' init_declarator
     289                | init_declarator_list ',' init_declarator
    265290                { result << val[2] }
    266291
    267292init_declarator
    268         : declarator
    269         | declarator '=' initializer
     293                : declarator
     294                | declarator '=' initializer
    270295                { val[0].set_initializer( val[2] ) }
    271296
     297storage_class_specifier
     298                : EXTERN
     299                | STATIC
     300                | AUTO
     301                | REGISTER
     302
    272303type_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
    287319                {
    288320                        set_no_type_name true
     
    290322                        result.set_sign :SIGNED
    291323                }
    292         | UNSIGNED
     324                | UNSIGNED
    293325                {
    294326                        set_no_type_name true
     
    296328                        result.set_sign :UNSIGNED
    297329                }
     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 ) }
    298340
    299341# mikan K&Rのstruct_or_union_specifierに相当するが、unionは使えない, bit field にも対応しない
    300342struct_specifier                # mikan
    301         : STRUCT struct_tag '{'
     343#        : STRUCT struct_tag '{'
     344                : struct_term struct_tag '{'
    302345                { StructType.set_define( true )  }
    303            struct_declaration_list '}'
     346                struct_declaration_list '}'
    304347                {
    305348                        StructType.end_of_parse
    306349                        result = val[1]
    307350                }
    308         | STRUCT
     351#        | STRUCT
     352                | struct_term
    309353                {
    310354                        result = CStructType.new()
    311355                        StructType.set_define( true )
    312356                }
    313            '{' struct_declaration_list '}'
     357                '{' struct_declaration_list '}'
    314358                {
    315359                        StructType.end_of_parse
    316360                        result = val[1]
    317361                }
    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 対応が必要
    319364                {
    320365                        StructType.set_define( false )
     
    323368                }
    324369
     370struct_term
     371                : STRUCT { set_no_type_name true }
     372
    325373struct_declaration_list
    326         : struct_declaration
    327         | struct_declaration_list struct_declaration
     374                : struct_declaration
     375                | struct_declaration_list struct_declaration
    328376
    329377struct_tag:
    330         IDENTIFIER
     378                IDENTIFIER
    331379                {
    332380                        result = CStructType.new( val[0].val )
     
    336384# ポインタ修飾子を追加
    337385struct_declaration
    338         : declaration_specifiers struct_declarator_list ';'
    339 #        :                                type_specifier_qualifier_list struct_declarator_list ';'
     386                : declaration_specifiers struct_declarator_list ';'
     387#        :                                specifier_qualifier_list struct_declarator_list ';'
    340388                {
    341389                        val[1].each { |i|       # i: Decl
     
    347395                        result = val[1]
    348396                }
    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 ';'                       # 無名
    351410
    352411
     
    354413# K&Rのspecifier_qualifier_listと同じ
    355414# 名前がまぎらわしかったのでtype_を付けた
    356 type_specifier_qualifier_list
    357         : type_specifier
    358         | type_specifier type_specifier_qualifier_list
     415specifier_qualifier_list
     416                : type_specifier specifier_qualifier_list
    359417                {
    360418                        result = val[1].merge val[0]
    361419                }
    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
    363427                {
    364428                        result = CIntType.new( -3 )
    365429                        result.set_qualifier val[0]
    366430                }
    367         | type_qualifier type_specifier_qualifier_list
    368                 {
    369                         val[1].set_qualifier val[0]
    370                         result = val[1]
    371                 }
    372431
    373432struct_declarator_list
    374         : struct_declarator
     433                : struct_declarator
    375434                { result = [ val[0] ] }
    376         | struct_declarator_list ',' struct_declarator
     435                | struct_declarator_list ',' struct_declarator
    377436                { result << val[2] }
    378437
    379438# ビットフィールドは使えない
    380439struct_declarator
    381         : declarator
    382 
    383 
     440                : declarator
     441#               | ':' constant_expression
     442#               | declarator ':' constant_expression
    384443
    385444union_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
     452union_term
     453                : UNION { set_no_type_name true }
    389454
    390455union_declaration_list
    391         : union_declaration
    392         | union_declaration_list union_declaration
     456                : union_declaration
     457                | union_declaration_list union_declaration
    393458
    394459union_tag:
     
    396461
    397462union_declaration
    398         : declaration_specifiers union_declarator_list ';'
     463                : declaration_specifiers union_declarator_list ';'
    399464                | union_specifier ';'                       # 無名
    400465                | struct_specifier ';'                      # 無名
    401466
    402467union_declarator_list
    403         : union_declarator
    404         | union_declarator_list ',' union_declarator
    405 
    406 # ビットフィールドは使えない
     468                : union_declarator
     469                | union_declarator_list ',' union_declarator
     470
    407471union_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
     476enum_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
    425485
    426486enumerator_list
    427         : enumerator
    428         | enumerator_list ',' enumerator
     487                : enumerator
     488                | enumerator_list ',' enumerator
    429489
    430490enumerator
    431         : IDENTIFIER
    432         | IDENTIFIER '=' constant_expression
     491                : IDENTIFIER
     492                | IDENTIFIER '=' constant_expression
    433493
    434494type_qualifier
    435         : CONST { result = :CONST }
    436         | VOLATILE      { result = :VOLATILE }
     495                : CONST
     496                { result = :CONST }
     497                | RESTRICT
     498                | VOLATILE
     499                { result = :VOLATILE }
     500
     501function_specifier
     502                : __INLINE__
     503                | INLINE
     504                | __INLINE
     505                | CINLINE
    437506
    438507declarator
    439         : pointer direct_declarator
     508                : pointer direct_declarator
    440509                {
    441510                        val[1].set_type( val[0] )
    442511                        result = val[1]
    443512                }
    444         | direct_declarator
    445         | pointer TYPE_NAME     # 関数ポインタの typedef が二重定義の場合
     513                | direct_declarator
     514                | pointer TYPE_NAME     # 関数ポインタの typedef が二重定義の場合
    446515                {
    447516                        result = Decl.new( val[1].val )
     
    450519
    451520direct_declarator               # mikan
    452         : IDENTIFIER
     521                : IDENTIFIER
    453522                { result = Decl.new( val[0].val ) }
    454         | '(' declarator ')'
     523                | '(' declarator ')'
    455524                { result = val[1] }
    456         | direct_declarator '[' constant_expression ']'
     525                | direct_declarator '[' constant_expression ']'
    457526                {
    458527                        val[0].set_type( CArrayType.new( val[2] ) )
    459528                        result = val[0]
    460529                }
    461         | direct_declarator '[' ']'
     530                | direct_declarator '[' ']'
    462531                {
    463532                        val[0].set_type( CArrayType.new )
    464533                        result = val[0]
    465534                }
    466         | direct_declarator '(' parameter_type_list ')'
     535                | direct_declarator '(' parameter_type_list ')'
    467536                {
    468537                #       Generator.warning( "W6001 need 'void' for no parameter"  )
     
    470539                        result = val[0]
    471540                }
    472 
    473 #        | direct_declarator '(' identifier_list ')'  # これは何のために必要? 060211
    474         | direct_declarator '(' ')'
     541                | direct_declarator '(' identifier_list ')'  # これは何のために必要? 060211
     542                | direct_declarator '(' ')'
    475543                {
    476544                #       Generator.warning( "W6002 need 'void' for no parameter"  )
     
    480548
    481549pointer
    482         : '*'
     550                : '*'
    483551                { result = CPtrType.new }
    484         | '*' type_qualifier
     552                | '*' type_qualifier_list
    485553                {
    486554                        result = CPtrType.new
    487555                        result.set_qualifier( val[1] )
    488556                }
    489         | '*' pointer
     557                | '*' pointer
    490558                {
    491559                        val[1].set_type(CPtrType.new)
    492560                        result = val[1]
    493561                }
    494         | '*' type_qualifier pointer
     562                | '*' type_qualifier_list pointer
    495563                {
    496564                        ptrtype = CPtrType.new
     
    500568                }
    501569
     570type_qualifier_list
     571                : type_qualifier
     572                | type_qualifier_list type_qualifier
    502573
    503574parameter_type_list
    504         : parameter_list
    505         | parameter_list ',' '.' '.' '.'
     575                : parameter_list
     576                | parameter_list ',' '.' '.' '.'
    506577                # mikan 可変長パラメータ,  ... の間のスペースが許される(手抜き)
    507578
    508579parameter_list
    509         : parameter_declaration
     580                : parameter_declaration
    510581#               { result = ParamList.new( val[0] ) }
    511         | parameter_list ',' parameter_declaration
     582                | parameter_list ',' parameter_declaration
    512583#               {
    513584#                       val[0].add_param( val[2] )
     
    518589# パラメータ修飾子を追加
    519590parameter_declaration
    520         : declaration_specifiers declarator
     591                : declaration_specifiers declarator
    521592#               {
    522593#                       decl = ParamDecl.new( val[1], val[0], [] )
     
    533604#                       result = nil
    534605#               }
    535         | declaration_specifiers abstract_declarator    # 仮引数なし
    536         | declaration_specifiers                                                # 仮引数なし
    537 
    538 
    539 #identifier_list       # 060211  不用になった
    540 #        : IDENTIFIER
    541 #        | identifier_list ',' IDENTIFIER
     606                | declaration_specifiers abstract_declarator    # 仮引数なし
     607                | declaration_specifiers                                                # 仮引数なし
     608
     609
     610identifier_list       # 060211  不用になった
     611        : IDENTIFIER
     612        | identifier_list ',' IDENTIFIER
    542613
    543614type_name
    544         : type_specifier_qualifier_list
    545         | type_specifier_qualifier_list abstract_declarator
     615                : specifier_qualifier_list
     616                | specifier_qualifier_list abstract_declarator
    546617
    547618abstract_declarator             # mikan
    548         : pointer
    549         | direct_abstract_declarator
    550         | pointer direct_abstract_declarator
     619                : pointer
     620                | direct_abstract_declarator
     621                | pointer direct_abstract_declarator
    551622
    552623direct_abstract_declarator
    553         : '(' abstract_declarator ')'
    554         | '[' ']'
    555         | '[' constant_expression ']'
    556         | direct_abstract_declarator '[' ']'
    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                | '(' ')'
    559630                {
    560631                        Generator.warning( "W6003 need 'void' for no parameter"  )
    561632                }
    562         | '(' parameter_type_list ')'
    563         | direct_abstract_declarator '(' ')'
     633                | '(' parameter_type_list ')'
     634                | direct_abstract_declarator '(' ')'
    564635                {
    565636                        Generator.warning( "W6004 need 'void' for no parameter"  )
    566637                }
    567         | direct_abstract_declarator '(' parameter_type_list ')'
     638                | direct_abstract_declarator '(' parameter_type_list ')'
    568639
    569640# assignment_expressionをconstant_expressionに変更
    570641initializer                     # mikan
    571         : constant_expression
     642                : assignment_expression
    572643                { result = val[0] }
    573         | '{' initializer_list '}'
     644                | '{' initializer_list '}'
    574645                { result = val[1] }
    575         | '{' initializer_list ',' '}'
     646                | '{' initializer_list ',' '}'
    576647                { result = val[1] }
    577         | C_EXP '(' STRING_LITERAL ')'
     648                | C_EXP '(' STRING_LITERAL ')'
    578649                { result = C_EXP.new( val[2] ) }
    579650
    580651initializer_list
    581         : initializer
     652                : initializer
    582653                {
    583654                        result = [ val[0] ]
    584655                }
    585         | initializer_list ',' initializer
     656                | initializer_list ',' initializer
    586657                {
    587658                        val[0] << val[2]
     
    594665#トップレベルの構文規則
    595666C_parser
    596         :
    597         | C_parser extension_statement
     667                :
     668                | C_parser extension_statement
    598669
    599670extension_statement
    600         : statement
    601         | EXTENSION statement
    602 
    603 statement
    604         : typedef
    605         | func_def
    606         | enum_specifier ';'
    607         | struct_specifier ';'
    608         | declaration
    609         | ';'
    610         | error   # エラー回復ポイント
     671                : cdl_statement
     672                | EXTENSION cdl_statement
     673
     674cdl_statement
     675                : typedef
     676                | func_def
     677                | enum_specifier ';'
     678                | struct_specifier ';'
     679                | declaration
     680                | ';'
     681                | error   # エラー回復ポイント
    611682
    612683typedef
    613         : TYPEDEF type_specifier_qualifier_list declarator_list ';'
     684        : TYPEDEF specifier_qualifier_list declarator_list ';'
    614685                {
    615686                        val[2].each{ |i|
     
    621692
    622693declarator_list
    623         : declarator
     694                : declarator
    624695                { result = [ val[0] ] }
    625         | declarator_list ',' declarator
     696                | declarator_list ',' declarator
    626697                { result << val[2] }
    627698
    628699func_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
     702statement
     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
     714labeled_statement
     715                : IDENTIFIER ':' statement
     716                | CASE constant_expression ':' statement
     717                | DEFAULT ':' statement
     718
     719compound_statement
     720                : '{' '}'
     721                | '{' block_item_list '}'
     722
     723block_item_list
     724                : block_item
     725                | block_item_list block_item
     726
     727block_item
     728                : declaration
     729                | statement
     730
     731expression_statement
     732                : ';'
     733                | expression ';'
    647734
    648735ifstatement
    649         : IF '(' expression ')' infunc_statement
    650         | IF '(' expression ')' infunc_statement ELSE infunc_statement
     736                : IF '(' expression ')' statement
     737                | IF '(' expression ')' statement ELSE statement
     738
     739switchstatement
     740                : SWITCH '(' expression ')' compound_statement
    651741
    652742whilestatement
    653         : WHILE '(' expression ')' infunc_statement
     743                : WHILE '(' expression ')' statement
    654744
    655745dowhilestatement
    656         : DO infunc_statement WHILE '(' expression ')' ';'
     746                : DO statement WHILE '(' expression ')' ';'
    657747
    658748forstatement
    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
     754jump_statement
     755                : GOTO IDENTIFIER ';'
     756                | CONTINUE ';'
     757                | BREAK ';'
     758                | RETURN ';'
     759                | RETURN expression ';'
    705760
    706761namespace_identifier
    707         : IDENTIFIER            { result = NamespacePath.new( val[0].val, false ) }
    708         | '::' IDENTIFIER       { result = NamespacePath.new( val[1].val, true ) }
    709         | namespace_identifier '::' IDENTIFIER
     762                : IDENTIFIER            { result = NamespacePath.new( val[0].val, false ) }
     763                | '::' IDENTIFIER       { result = NamespacePath.new( val[1].val, true ) }
     764                | namespace_identifier '::' IDENTIFIER
    710765                { result = val[0].append!( val[2].val ) }
    711766
     767asm_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
    712781end
    713782
    714783---- inner
    715784
    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
    9921079
    9931080---- footer
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.tab.rb

    r321 r429  
    11#
    22# DO NOT MODIFY!!!!
    3 # This file is automatically generated by Racc 1.4.12
     3# This file is automatically generated by Racc 1.4.14
    44# from Racc grammer file "".
    55#
     
    88class Generator < Racc::Parser
    99
    10 module_eval(<<'...end bnf.y.rb/module_eval...', 'bnf.y.rb', 1504)
     10module_eval(<<'...end bnf.y.rb/module_eval...', 'bnf.y.rb', 1534)
    1111
    1212  RESERVED = {
     
    3030    'import_C' => :IMPORT_C,
    3131    'generate' => :GENERATE,
     32    '__tool_info__' => :TOOL_INFO,
    3233
    3334    # types
     
    165166  # すべての構文解析が完了した
    166167  @@b_end_all_parse = false
     168
     169  # tag なし struct
     170  @@no_struct_tag_num = 0
    167171
    168172  def self.parse( file_name, plugin = nil, b_reuse = false )
     
    280284                  string += line
    281285                  # この位置では 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"
    283287                  @@n_error += 1
    284288                end
     
    321325                  b_in_string = true
    322326                  # この位置では 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"
    324328                  @@n_error += 1
    325329                # 山括弧で囲まれた文字列
    326                 when /\A<[0-9A-Za-z_\. \/]+>/   # AB: angle bracke
     330                # when /\A<[0-9A-Za-z_\. \/]+>/   # AB: angle bracke
     331                when /\A<(?:[^>\\]|\\.)*>/   # これはうまく行くようだ
    327332                  @q << [:AB_STRING_LITERAL, Token.new($&, file, lineno, col)]
    328333                # 行コメント
     
    420425  @@n_error = 0
    421426  @@n_warning = 0
     427  @@n_info = 0
    422428
    423429  # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切)
     
    453459      end
    454460      if locale then
    455         Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}"
     461        Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: error: #{msg}"
    456462      else
    457463        Console.puts "error: #{msg}"
     
    486492      end
    487493      if locale then
    488         Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}"
     494        Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: warning: #{msg}"
    489495      else
    490496        Console.puts "warning: #{msg}"
     
    493499  end
    494500
     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
    495534  def self.get_n_error
    496535    @@n_error
     
    501540  end
    502541
     542  def self.get_n_info
     543    @@n_info
     544  end
     545
    503546  def self.get_nest
    504547    @@generator_nest
     548  end
     549
     550  def self.parsing_C?
     551    @@import_C
    505552  end
    506553
     
    543590
    544591clist = [
    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',
    676733'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 '10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34',
    679 '35,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 '18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,,,,,42,43',
    683 '44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20',
    684 '21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,422,,,,42,43,44,45',
    685 '46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22',
    686 '23,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',
    687744'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,77,,,,,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,77,,,,,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,,,,,,,',
    691748',,,,,,,,,,,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',
    700753'5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32',
    701754'33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18',
     
    707760'23,24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47,48',
    708761'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)
    714764        idx = 0
    715765        clist.each do |str|
     
    721771
    722772clist = [
    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)
    908961        idx = 0
    909962        clist.each do |str|
     
    915968
    916969racc_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,
    919972   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 ]
    10041062
    10051063racc_action_default = [
    1006   -194,  -418,    -1,  -418,  -418,   -69,   -70,   -71,   -72,   -73,
    1007    -74,   -75,   -76,   -77,   -78,   -79,  -418,   -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,
    10081066   -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 ]
    10931156
    10941157racc_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,
    11351199   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,
    11411204   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,
    11461210   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,
    11541226   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,
    11641230   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    11651231   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    11661232   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
     1237racc_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,
    11681279   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,
    12121284   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,
    12181290   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,
    12231306   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,
    12411310   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    12421311   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    12431312   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
     1317racc_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
     1337racc_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,
    12451349   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 ]
    12851356
    12861357racc_reduce_table = [
    12871358  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,
    13051372  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, 149, :_reduce_26,
    1314   1, 149, :_reduce_27,
    1315   1, 150, :_reduce_none,
    1316   4, 150, :_reduce_29,
    1317   1, 152, :_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,
    13211388  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,
    13241392  1, 154, :_reduce_none,
    1325   3, 154, :_reduce_38,
    1326   3, 154, :_reduce_39,
     1393  3, 154, :_reduce_35,
     1394  3, 154, :_reduce_36,
    13271395  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,
    13321398  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,
    13351403  1, 157, :_reduce_none,
    1336   3, 157, :_reduce_49,
     1404  3, 157, :_reduce_46,
     1405  3, 157, :_reduce_47,
    13371406  1, 158, :_reduce_none,
    1338   3, 158, :_reduce_51,
     1407  3, 158, :_reduce_49,
    13391408  1, 159, :_reduce_none,
    1340   3, 159, :_reduce_53,
     1409  3, 159, :_reduce_51,
    13411410  1, 160, :_reduce_none,
    1342   3, 160, :_reduce_55,
     1411  3, 160, :_reduce_53,
    13431412  1, 161, :_reduce_none,
    1344   3, 161, :_reduce_57,
     1413  3, 161, :_reduce_55,
    13451414  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,
    13591421  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,
    14211490  1, 192, :_reduce_none,
    14221491  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,
    15351601  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,
    15521620  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,
    16381707  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,
    16421710  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,
    16691744  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
     1801racc_reduce_n = 442
     1802
     1803racc_shift_n = 911
    17091804
    17101805racc_token_table = {
     
    18481943  :__LOCATION_INFORMATION__ => 137,
    18491944  :__CELL__ => 138,
    1850   :__JOIN__ => 139 }
    1851 
    1852 racc_nt_base = 140
     1945  :__JOIN__ => 139,
     1946  :TOOL_INFO => 140 }
     1947
     1948racc_nt_base = 141
    18531949
    18541950racc_use_result_var = true
     
    20112107  "__CELL__",
    20122108  "__JOIN__",
     2109  "TOOL_INFO",
    20132110  "$start",
    20142111  "all",
     
    20772174  "specified_statement",
    20782175  "location_information",
     2176  "tool_info",
    20792177  "statement",
    20802178  "statement_specifier_list",
     
    20892187  "import",
    20902188  "import_C",
    2091   "signature_plugin",
     2189  "generate_statement",
    20922190  "statement_specifier",
    20932191  "alloc_list",
     
    21762274  "port_location_list",
    21772275  "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" ]
    21792284
    21802285Racc_debug_parser = false
     
    28382943module_eval(<<'.,.,', 'bnf.y.rb', 379)
    28392944  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
    28412948                        StructType.set_define( true )
    28422949               
     
    28452952.,.,
    28462953
    2847 module_eval(<<'.,.,', 'bnf.y.rb', 384)
     2954module_eval(<<'.,.,', 'bnf.y.rb', 386)
    28482955  def _reduce_105(val, _values, result)
    28492956                        StructType.end_of_parse
     
    28542961.,.,
    28552962
    2856 module_eval(<<'.,.,', 'bnf.y.rb', 389)
     2963module_eval(<<'.,.,', 'bnf.y.rb', 391)
    28572964  def _reduce_106(val, _values, result)
    28582965                        StructType.set_define( false )
     
    28682975# reduce 108 omitted
    28692976
    2870 module_eval(<<'.,.,', 'bnf.y.rb', 400)
     2977module_eval(<<'.,.,', 'bnf.y.rb', 402)
    28712978  def _reduce_109(val, _values, result)
    28722979     result = StructType.new( val[0].val )
     
    28752982.,.,
    28762983
    2877 module_eval(<<'.,.,', 'bnf.y.rb', 406)
     2984module_eval(<<'.,.,', 'bnf.y.rb', 408)
    28782985  def _reduce_110(val, _values, result)
    28792986                        val[1].each { |i|       # i: Decl
     
    28892996.,.,
    28902997
    2891 module_eval(<<'.,.,', 'bnf.y.rb', 416)
     2998module_eval(<<'.,.,', 'bnf.y.rb', 418)
    28922999  def _reduce_111(val, _values, result)
    28933000                        val[4].each { |i|       # i: Decl
     
    29043011.,.,
    29053012
    2906 module_eval(<<'.,.,', 'bnf.y.rb', 427)
     3013module_eval(<<'.,.,', 'bnf.y.rb', 429)
    29073014  def _reduce_112(val, _values, result)
    29083015     result = [ val[0] ]
     
    29113018.,.,
    29123019
    2913 module_eval(<<'.,.,', 'bnf.y.rb', 428)
     3020module_eval(<<'.,.,', 'bnf.y.rb', 430)
    29143021  def _reduce_113(val, _values, result)
    29153022     result <<  val[2]
     
    29183025.,.,
    29193026
    2920 module_eval(<<'.,.,', 'bnf.y.rb', 431)
     3027module_eval(<<'.,.,', 'bnf.y.rb', 433)
    29213028  def _reduce_114(val, _values, result)
    29223029     result = [:STRING,-1]
     
    29253032.,.,
    29263033
    2927 module_eval(<<'.,.,', 'bnf.y.rb', 432)
     3034module_eval(<<'.,.,', 'bnf.y.rb', 434)
    29283035  def _reduce_115(val, _values, result)
    29293036     result = [:STRING,val[2]]
     
    29323039.,.,
    29333040
    2934 module_eval(<<'.,.,', 'bnf.y.rb', 433)
     3041module_eval(<<'.,.,', 'bnf.y.rb', 435)
    29353042  def _reduce_116(val, _values, result)
    29363043     result = [:SIZE_IS,val[2]]
     
    29393046.,.,
    29403047
    2941 module_eval(<<'.,.,', 'bnf.y.rb', 434)
     3048module_eval(<<'.,.,', 'bnf.y.rb', 436)
    29423049  def _reduce_117(val, _values, result)
    29433050     result = [:COUNT_IS,val[2]]
     
    29483055# reduce 118 omitted
    29493056
    2950 module_eval(<<'.,.,', 'bnf.y.rb', 445)
     3057module_eval(<<'.,.,', 'bnf.y.rb', 447)
    29513058  def _reduce_119(val, _values, result)
    29523059                        val[1].set_qualifier( val[0] )
     
    29573064.,.,
    29583065
    2959 module_eval(<<'.,.,', 'bnf.y.rb', 454)
     3066module_eval(<<'.,.,', 'bnf.y.rb', 456)
    29603067  def _reduce_120(val, _values, result)
    29613068     result = [ val[0] ]
     
    29643071.,.,
    29653072
    2966 module_eval(<<'.,.,', 'bnf.y.rb', 456)
     3073module_eval(<<'.,.,', 'bnf.y.rb', 458)
    29673074  def _reduce_121(val, _values, result)
    29683075     result << val[2]
     
    29793086# reduce 125 omitted
    29803087
    2981 module_eval(<<'.,.,', 'bnf.y.rb', 469)
     3088module_eval(<<'.,.,', 'bnf.y.rb', 471)
    29823089  def _reduce_126(val, _values, result)
    29833090     result = EnumType.new( -1 )
     
    29863093.,.,
    29873094
    2988 module_eval(<<'.,.,', 'bnf.y.rb', 470)
     3095module_eval(<<'.,.,', 'bnf.y.rb', 472)
    29893096  def _reduce_127(val, _values, result)
    29903097     result = EnumType.new( 8 )
     
    29933100.,.,
    29943101
    2995 module_eval(<<'.,.,', 'bnf.y.rb', 471)
     3102module_eval(<<'.,.,', 'bnf.y.rb', 473)
    29963103  def _reduce_128(val, _values, result)
    29973104     result = EnumType.new( 16 )
     
    30003107.,.,
    30013108
    3002 module_eval(<<'.,.,', 'bnf.y.rb', 472)
     3109module_eval(<<'.,.,', 'bnf.y.rb', 474)
    30033110  def _reduce_129(val, _values, result)
    30043111     result = EnumType.new( 32 )
     
    30073114.,.,
    30083115
    3009 module_eval(<<'.,.,', 'bnf.y.rb', 473)
     3116module_eval(<<'.,.,', 'bnf.y.rb', 475)
    30103117  def _reduce_130(val, _values, result)
    30113118     result = EnumType.new( 64 )
     
    30143121.,.,
    30153122
    3016 module_eval(<<'.,.,', 'bnf.y.rb', 474)
     3123module_eval(<<'.,.,', 'bnf.y.rb', 476)
    30173124  def _reduce_131(val, _values, result)
    30183125     result = EnumType.new( 128 )
     
    30293136# reduce 135 omitted
    30303137
    3031 module_eval(<<'.,.,', 'bnf.y.rb', 485)
     3138module_eval(<<'.,.,', 'bnf.y.rb', 487)
    30323139  def _reduce_136(val, _values, result)
    30333140     result = :CONST
     
    30363143.,.,
    30373144
    3038 module_eval(<<'.,.,', 'bnf.y.rb', 486)
     3145module_eval(<<'.,.,', 'bnf.y.rb', 488)
    30393146  def _reduce_137(val, _values, result)
    30403147     result = :VOLATILE
     
    30433150.,.,
    30443151
    3045 module_eval(<<'.,.,', 'bnf.y.rb', 491)
     3152module_eval(<<'.,.,', 'bnf.y.rb', 493)
    30463153  def _reduce_138(val, _values, result)
    30473154                        val[1].set_type( val[0] )
     
    30543161# reduce 139 omitted
    30553162
    3056 module_eval(<<'.,.,', 'bnf.y.rb', 498)
     3163module_eval(<<'.,.,', 'bnf.y.rb', 500)
    30573164  def _reduce_140(val, _values, result)
    30583165     result = Decl.new( val[0].val )
     
    30613168.,.,
    30623169
    3063 module_eval(<<'.,.,', 'bnf.y.rb', 500)
     3170module_eval(<<'.,.,', 'bnf.y.rb', 502)
    30643171  def _reduce_141(val, _values, result)
    30653172     result = val[1]
     
    30683175.,.,
    30693176
    3070 module_eval(<<'.,.,', 'bnf.y.rb', 503)
     3177module_eval(<<'.,.,', 'bnf.y.rb', 505)
    30713178  def _reduce_142(val, _values, result)
    30723179                        val[0].set_type( ArrayType.new( val[2] ) )
     
    30773184.,.,
    30783185
    3079 module_eval(<<'.,.,', 'bnf.y.rb', 508)
     3186module_eval(<<'.,.,', 'bnf.y.rb', 510)
    30803187  def _reduce_143(val, _values, result)
    30813188                        val[0].set_type( ArrayType.new )
     
    30863193.,.,
    30873194
    3088 module_eval(<<'.,.,', 'bnf.y.rb', 513)
     3195module_eval(<<'.,.,', 'bnf.y.rb', 515)
    30893196  def _reduce_144(val, _values, result)
    30903197                        val[0].set_type( FuncType.new( val[2] ) )
     
    30953202.,.,
    30963203
    3097 module_eval(<<'.,.,', 'bnf.y.rb', 519)
     3204module_eval(<<'.,.,', 'bnf.y.rb', 521)
    30983205  def _reduce_145(val, _values, result)
    30993206                        Generator.warning( "W5010 need 'void' for no parameter"  )
     
    31053212.,.,
    31063213
    3107 module_eval(<<'.,.,', 'bnf.y.rb', 526)
     3214module_eval(<<'.,.,', 'bnf.y.rb', 528)
    31083215  def _reduce_146(val, _values, result)
    31093216     result = PtrType.new
     
    31123219.,.,
    31133220
    3114 module_eval(<<'.,.,', 'bnf.y.rb', 529)
     3221module_eval(<<'.,.,', 'bnf.y.rb', 531)
    31153222  def _reduce_147(val, _values, result)
    31163223                        result = PtrType.new
     
    31213228.,.,
    31223229
    3123 module_eval(<<'.,.,', 'bnf.y.rb', 534)
     3230module_eval(<<'.,.,', 'bnf.y.rb', 536)
    31243231  def _reduce_148(val, _values, result)
    31253232                        val[1].set_type(PtrType.new)
     
    31303237.,.,
    31313238
    3132 module_eval(<<'.,.,', 'bnf.y.rb', 539)
     3239module_eval(<<'.,.,', 'bnf.y.rb', 541)
    31333240  def _reduce_149(val, _values, result)
    31343241                        ptrtype = PtrType.new
     
    31453252# reduce 151 omitted
    31463253
    3147 module_eval(<<'.,.,', 'bnf.y.rb', 553)
     3254module_eval(<<'.,.,', 'bnf.y.rb', 555)
    31483255  def _reduce_152(val, _values, result)
    31493256     result = ParamList.new( val[0] )
     
    31523259.,.,
    31533260
    3154 module_eval(<<'.,.,', 'bnf.y.rb', 556)
     3261module_eval(<<'.,.,', 'bnf.y.rb', 558)
    31553262  def _reduce_153(val, _values, result)
    31563263                        val[0].add_param( val[2] )
     
    31613268.,.,
    31623269
    3163 module_eval(<<'.,.,', 'bnf.y.rb', 566)
     3270module_eval(<<'.,.,', 'bnf.y.rb', 568)
    31643271  def _reduce_154(val, _values, result)
    31653272                        val[2].set_kind( :PARAMETER )
     
    31723279.,.,
    31733280
    3174 module_eval(<<'.,.,', 'bnf.y.rb', 575)
     3281module_eval(<<'.,.,', 'bnf.y.rb', 577)
    31753282  def _reduce_155(val, _values, result)
    31763283                        Generator.error( "G1001 need specifier for \'$1\'" , val[1].get_name )
     
    31813288.,.,
    31823289
    3183 module_eval(<<'.,.,', 'bnf.y.rb', 580)
     3290module_eval(<<'.,.,', 'bnf.y.rb', 582)
    31843291  def _reduce_156(val, _values, result)
    31853292                        unless val[0].instance_of?( VoidType ) then
     
    31923299.,.,
    31933300
    3194 module_eval(<<'.,.,', 'bnf.y.rb', 588)
     3301module_eval(<<'.,.,', 'bnf.y.rb', 590)
    31953302  def _reduce_157(val, _values, result)
    31963303                        unless val[1].instance_of?( VoidType ) then
     
    32033310.,.,
    32043311
    3205 module_eval(<<'.,.,', 'bnf.y.rb', 595)
     3312module_eval(<<'.,.,', 'bnf.y.rb', 597)
    32063313  def _reduce_158(val, _values, result)
    32073314     result = val[1]
     
    32103317.,.,
    32113318
    3212 module_eval(<<'.,.,', 'bnf.y.rb', 599)
     3319module_eval(<<'.,.,', 'bnf.y.rb', 601)
    32133320  def _reduce_159(val, _values, result)
    32143321     result = val[0]
     
    32173324.,.,
    32183325
    3219 module_eval(<<'.,.,', 'bnf.y.rb', 601)
     3326module_eval(<<'.,.,', 'bnf.y.rb', 603)
    32203327  def _reduce_160(val, _values, result)
    32213328     result = result + val[2]
     
    32243331.,.,
    32253332
    3226 module_eval(<<'.,.,', 'bnf.y.rb', 604)
     3333module_eval(<<'.,.,', 'bnf.y.rb', 606)
    32273334  def _reduce_161(val, _values, result)
    32283335     result = [ [:IN]  ]
     
    32313338.,.,
    32323339
    3233 module_eval(<<'.,.,', 'bnf.y.rb', 605)
     3340module_eval(<<'.,.,', 'bnf.y.rb', 607)
    32343341  def _reduce_162(val, _values, result)
    32353342     result = [ [:OUT] ]
     
    32383345.,.,
    32393346
    3240 module_eval(<<'.,.,', 'bnf.y.rb', 606)
     3347module_eval(<<'.,.,', 'bnf.y.rb', 608)
    32413348  def _reduce_163(val, _values, result)
    32423349     result = [ [:INOUT] ]
     
    32453352.,.,
    32463353
    3247 module_eval(<<'.,.,', 'bnf.y.rb', 607)
     3354module_eval(<<'.,.,', 'bnf.y.rb', 609)
    32483355  def _reduce_164(val, _values, result)
    32493356     result = [ [:SEND,   val[2]] ]
     
    32523359.,.,
    32533360
    3254 module_eval(<<'.,.,', 'bnf.y.rb', 608)
     3361module_eval(<<'.,.,', 'bnf.y.rb', 610)
    32553362  def _reduce_165(val, _values, result)
    32563363     result = [ [:RECEIVE,val[2]] ]
     
    32593366.,.,
    32603367
    3261 module_eval(<<'.,.,', 'bnf.y.rb', 609)
     3368module_eval(<<'.,.,', 'bnf.y.rb', 611)
    32623369  def _reduce_166(val, _values, result)
    32633370     result = [ [:STRING,nil] ]
     
    32663373.,.,
    32673374
    3268 module_eval(<<'.,.,', 'bnf.y.rb', 610)
     3375module_eval(<<'.,.,', 'bnf.y.rb', 612)
    32693376  def _reduce_167(val, _values, result)
    32703377     result = [ [:STRING,  val[2]] ]
     
    32733380.,.,
    32743381
    3275 module_eval(<<'.,.,', 'bnf.y.rb', 611)
     3382module_eval(<<'.,.,', 'bnf.y.rb', 613)
    32763383  def _reduce_168(val, _values, result)
    32773384     result = [ [:SIZE_IS, val[2]] ]
     
    32803387.,.,
    32813388
    3282 module_eval(<<'.,.,', 'bnf.y.rb', 614)
     3389module_eval(<<'.,.,', 'bnf.y.rb', 616)
    32833390  def _reduce_169(val, _values, result)
    32843391                        result = [ [:SIZE_IS,val[2]], [:MAX_IS, val[4]] ]
     
    32883395.,.,
    32893396
    3290 module_eval(<<'.,.,', 'bnf.y.rb', 616)
     3397module_eval(<<'.,.,', 'bnf.y.rb', 618)
    32913398  def _reduce_170(val, _values, result)
    32923399     result = [ [:COUNT_IS,val[2]] ]
     
    32953402.,.,
    32963403
    3297 module_eval(<<'.,.,', 'bnf.y.rb', 617)
     3404module_eval(<<'.,.,', 'bnf.y.rb', 619)
    32983405  def _reduce_171(val, _values, result)
    32993406     result = [ [:NULLABLE] ]
     
    33043411# reduce 172 omitted
    33053412
    3306 module_eval(<<'.,.,', 'bnf.y.rb', 623)
     3413module_eval(<<'.,.,', 'bnf.y.rb', 625)
    33073414  def _reduce_173(val, _values, result)
    33083415                        if val[1] then
     
    33243431# reduce 176 omitted
    33253432
    3326 module_eval(<<'.,.,', 'bnf.y.rb', 640)
     3433module_eval(<<'.,.,', 'bnf.y.rb', 642)
    33273434  def _reduce_177(val, _values, result)
    33283435     result = val[1]
     
    33313438.,.,
    33323439
    3333 module_eval(<<'.,.,', 'bnf.y.rb', 643)
     3440module_eval(<<'.,.,', 'bnf.y.rb', 645)
    33343441  def _reduce_178(val, _values, result)
    33353442                        Generator.error( "G1004 impossible array type"  )
     
    33403447.,.,
    33413448
    3342 module_eval(<<'.,.,', 'bnf.y.rb', 648)
     3449module_eval(<<'.,.,', 'bnf.y.rb', 650)
    33433450  def _reduce_179(val, _values, result)
    33443451                        Generator.error( "G1005 impossible array type"  )
     
    33493456.,.,
    33503457
    3351 module_eval(<<'.,.,', 'bnf.y.rb', 653)
     3458module_eval(<<'.,.,', 'bnf.y.rb', 655)
    33523459  def _reduce_180(val, _values, result)
    33533460                        Generator.error( "G1006 impossible array type"  )
     
    33583465.,.,
    33593466
    3360 module_eval(<<'.,.,', 'bnf.y.rb', 658)
     3467module_eval(<<'.,.,', 'bnf.y.rb', 660)
    33613468  def _reduce_181(val, _values, result)
    33623469                        Generator.error( "G1007 impossible array type"  )
     
    33673474.,.,
    33683475
    3369 module_eval(<<'.,.,', 'bnf.y.rb', 663)
     3476module_eval(<<'.,.,', 'bnf.y.rb', 665)
    33703477  def _reduce_182(val, _values, result)
    33713478                        Generator.error( "G1008 impossible function type"  )
     
    33783485# reduce 183 omitted
    33793486
    3380 module_eval(<<'.,.,', 'bnf.y.rb', 669)
     3487module_eval(<<'.,.,', 'bnf.y.rb', 671)
    33813488  def _reduce_184(val, _values, result)
    33823489                        Generator.warning( "W5011 need 'void' for no parameter"  )
     
    33883495.,.,
    33893496
    3390 module_eval(<<'.,.,', 'bnf.y.rb', 675)
     3497module_eval(<<'.,.,', 'bnf.y.rb', 677)
    33913498  def _reduce_185(val, _values, result)
    33923499                        val[0].set_type( FuncType.new( val[2] ) )
     
    33973504.,.,
    33983505
    3399 module_eval(<<'.,.,', 'bnf.y.rb', 682)
     3506module_eval(<<'.,.,', 'bnf.y.rb', 684)
    34003507  def _reduce_186(val, _values, result)
    34013508     result = val[0]
     
    34043511.,.,
    34053512
    3406 module_eval(<<'.,.,', 'bnf.y.rb', 684)
     3513module_eval(<<'.,.,', 'bnf.y.rb', 686)
    34073514  def _reduce_187(val, _values, result)
    34083515     result = val[1]
     
    34113518.,.,
    34123519
    3413 module_eval(<<'.,.,', 'bnf.y.rb', 686)
     3520module_eval(<<'.,.,', 'bnf.y.rb', 688)
    34143521  def _reduce_188(val, _values, result)
    34153522     result = val[1]
     
    34183525.,.,
    34193526
    3420 module_eval(<<'.,.,', 'bnf.y.rb', 689)
     3527module_eval(<<'.,.,', 'bnf.y.rb', 691)
    34213528  def _reduce_189(val, _values, result)
    34223529     result = C_EXP.new( val[2] )
     
    34253532.,.,
    34263533
    3427 module_eval(<<'.,.,', 'bnf.y.rb', 694)
     3534module_eval(<<'.,.,', 'bnf.y.rb', 696)
    34283535  def _reduce_190(val, _values, result)
    34293536                        result = [ val[0] ]
     
    34333540.,.,
    34343541
    3435 module_eval(<<'.,.,', 'bnf.y.rb', 698)
     3542module_eval(<<'.,.,', 'bnf.y.rb', 700)
    34363543  def _reduce_191(val, _values, result)
    34373544                        val[0] << val[2]
     
    34503557# reduce 195 omitted
    34513558
    3452 module_eval(<<'.,.,', 'bnf.y.rb', 716)
    3453   def _reduce_196(val, _values, result)
     3559# reduce 196 omitted
     3560
     3561module_eval(<<'.,.,', 'bnf.y.rb', 719)
     3562  def _reduce_197(val, _values, result)
    34543563                        obj = val[3]
    34553564                        if obj.kind_of?( Cell ) || obj.kind_of?( Signature ) || obj.kind_of?( Celltype ) || obj.kind_of?( CompositeCelltype )then
     
    34643573.,.,
    34653574
    3466 # reduce 197 omitted
    3467 
    34683575# reduce 198 omitted
    34693576
     
    34923599# reduce 210 omitted
    34933600
    3494 module_eval(<<'.,.,', 'bnf.y.rb', 745)
    3495   def _reduce_211(val, _values, result)
     3601# reduce 211 omitted
     3602
     3603module_eval(<<'.,.,', 'bnf.y.rb', 748)
     3604  def _reduce_212(val, _values, result)
    34963605     Generator.add_statement_specifier val[0]   
    34973606    result
     
    34993608.,.,
    35003609
    3501 module_eval(<<'.,.,', 'bnf.y.rb', 747)
    3502   def _reduce_212(val, _values, result)
     3610module_eval(<<'.,.,', 'bnf.y.rb', 750)
     3611  def _reduce_213(val, _values, result)
    35033612     Generator.add_statement_specifier val[2]
    35043613    result
     
    35063615.,.,
    35073616
    3508 module_eval(<<'.,.,', 'bnf.y.rb', 751)
    3509   def _reduce_213(val, _values, result)
     3617module_eval(<<'.,.,', 'bnf.y.rb', 754)
     3618  def _reduce_214(val, _values, result)
    35103619     result = [ :ALLOCATOR, val[2] ]
    35113620    result
     
    35133622.,.,
    35143623
    3515 module_eval(<<'.,.,', 'bnf.y.rb', 753)
    3516   def _reduce_214(val, _values, result)
     3624module_eval(<<'.,.,', 'bnf.y.rb', 756)
     3625  def _reduce_215(val, _values, result)
    35173626     result = [ :CALLBACK ]
    35183627    result
     
    35203629.,.,
    35213630
    3522 module_eval(<<'.,.,', 'bnf.y.rb', 755)
    3523   def _reduce_215(val, _values, result)
     3631module_eval(<<'.,.,', 'bnf.y.rb', 758)
     3632  def _reduce_216(val, _values, result)
    35243633     result = [ :CONTEXT, val[2].val ]
    35253634    result
     
    35273636.,.,
    35283637
    3529 module_eval(<<'.,.,', 'bnf.y.rb', 757)
    3530   def _reduce_216(val, _values, result)
     3638module_eval(<<'.,.,', 'bnf.y.rb', 760)
     3639  def _reduce_217(val, _values, result)
    35313640     result = [ :DEVIATE ]
    35323641    result
     
    35343643.,.,
    35353644
    3536 module_eval(<<'.,.,', 'bnf.y.rb', 759)
    3537   def _reduce_217(val, _values, result)
     3645module_eval(<<'.,.,', 'bnf.y.rb', 762)
     3646  def _reduce_218(val, _values, result)
    35383647     result = [ :ID, val[2] ]
    35393648    result
     
    35413650.,.,
    35423651
    3543 module_eval(<<'.,.,', 'bnf.y.rb', 761)
    3544   def _reduce_218(val, _values, result)
     3652module_eval(<<'.,.,', 'bnf.y.rb', 764)
     3653  def _reduce_219(val, _values, result)
    35453654     result = [ :PROTOTYPE ]
    35463655    result
     
    35483657.,.,
    35493658
    3550 module_eval(<<'.,.,', 'bnf.y.rb', 763)
    3551   def _reduce_219(val, _values, result)
     3659module_eval(<<'.,.,', 'bnf.y.rb', 766)
     3660  def _reduce_220(val, _values, result)
    35523661     result = [ :RESTRICT, val[2] ]
    35533662    result
     
    35553664.,.,
    35563665
    3557 module_eval(<<'.,.,', 'bnf.y.rb', 764)
    3558   def _reduce_220(val, _values, result)
     3666module_eval(<<'.,.,', 'bnf.y.rb', 767)
     3667  def _reduce_221(val, _values, result)
    35593668     result = [:SINGLETON]
    35603669    result
     
    35623671.,.,
    35633672
    3564 module_eval(<<'.,.,', 'bnf.y.rb', 765)
    3565   def _reduce_221(val, _values, result)
     3673module_eval(<<'.,.,', 'bnf.y.rb', 768)
     3674  def _reduce_222(val, _values, result)
    35663675     result = [:IDX_IS_ID]
    35673676    result
     
    35693678.,.,
    35703679
    3571 module_eval(<<'.,.,', 'bnf.y.rb', 766)
    3572   def _reduce_222(val, _values, result)
     3680module_eval(<<'.,.,', 'bnf.y.rb', 769)
     3681  def _reduce_223(val, _values, result)
    35733682     result = [:ACTIVE]
    3574     result
    3575   end
    3576 .,.,
    3577 
    3578 module_eval(<<'.,.,', 'bnf.y.rb', 768)
    3579   def _reduce_223(val, _values, result)
    3580      result = [:GENERATE, val[2].val, val[4].val]
    35813683    result
    35823684  end
     
    35853687module_eval(<<'.,.,', 'bnf.y.rb', 771)
    35863688  def _reduce_224(val, _values, result)
     3689     result = [:GENERATE, val[2].val, val[4].val]
     3690    result
     3691  end
     3692.,.,
     3693
     3694module_eval(<<'.,.,', 'bnf.y.rb', 774)
     3695  def _reduce_225(val, _values, result)
    35873696     result = [ val[0] ]
    35883697    result
     
    35903699.,.,
    35913700
    3592 module_eval(<<'.,.,', 'bnf.y.rb', 772)
    3593   def _reduce_225(val, _values, result)
     3701module_eval(<<'.,.,', 'bnf.y.rb', 775)
     3702  def _reduce_226(val, _values, result)
    35943703     result << val[2]
    35953704    result
     
    35973706.,.,
    35983707
    3599 module_eval(<<'.,.,', 'bnf.y.rb', 776)
    3600   def _reduce_226(val, _values, result)
     3708module_eval(<<'.,.,', 'bnf.y.rb', 779)
     3709  def _reduce_227(val, _values, result)
    36013710      result = [ :NORMAL_ALLOC, val[0], nil, val[2], val[4], val[6] ]
    36023711    result
     
    36043713.,.,
    36053714
    3606 module_eval(<<'.,.,', 'bnf.y.rb', 778)
    3607   def _reduce_227(val, _values, result)
     3715module_eval(<<'.,.,', 'bnf.y.rb', 781)
     3716  def _reduce_228(val, _values, result)
    36083717      result = [ :NORMAL_ALLOC, val[0], val[2], val[5], val[7], val[9] ]
    36093718    result
     
    36113720.,.,
    36123721
    3613 module_eval(<<'.,.,', 'bnf.y.rb', 787)
    3614   def _reduce_228(val, _values, result)
     3722module_eval(<<'.,.,', 'bnf.y.rb', 790)
     3723  def _reduce_229(val, _values, result)
    36153724        result = [val[0]]               
    36163725    result
     
    36183727.,.,
    36193728
    3620 module_eval(<<'.,.,', 'bnf.y.rb', 789)
    3621   def _reduce_229(val, _values, result)
     3729module_eval(<<'.,.,', 'bnf.y.rb', 792)
     3730  def _reduce_230(val, _values, result)
    36223731        result << val[2]               
    36233732    result
     
    36253734.,.,
    36263735
    3627 module_eval(<<'.,.,', 'bnf.y.rb', 793)
    3628   def _reduce_230(val, _values, result)
     3736module_eval(<<'.,.,', 'bnf.y.rb', 796)
     3737  def _reduce_231(val, _values, result)
    36293738        result = [ val[0].val, nil, val[3] ]           
    36303739    result
     
    36323741.,.,
    36333742
    3634 module_eval(<<'.,.,', 'bnf.y.rb', 795)
    3635   def _reduce_231(val, _values, result)
     3743module_eval(<<'.,.,', 'bnf.y.rb', 798)
     3744  def _reduce_232(val, _values, result)
    36363745        result = [ val[0].val, val[2].val, val[5] ]             
    36373746    result
     
    36393748.,.,
    36403749
    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)
     3750module_eval(<<'.,.,', 'bnf.y.rb', 802)
    36493751  def _reduce_233(val, _values, result)
    3650         result << val[2].val           
    3651     result
    3652   end
    3653 .,.,
    3654 
    3655 module_eval(<<'.,.,', 'bnf.y.rb', 806)
     3752        result = [val[0]]               
     3753    result
     3754  end
     3755.,.,
     3756
     3757module_eval(<<'.,.,', 'bnf.y.rb', 804)
    36563758  def _reduce_234(val, _values, result)
     3759        result << val[2]               
     3760    result
     3761  end
     3762.,.,
     3763
     3764module_eval(<<'.,.,', 'bnf.y.rb', 809)
     3765  def _reduce_235(val, _values, result)
    36573766                        val[0].each { |decl|
    36583767                                decl.set_kind( :CONSTANT )
     
    36653774.,.,
    36663775
    3667 module_eval(<<'.,.,', 'bnf.y.rb', 816)
    3668   def _reduce_235(val, _values, result)
     3776module_eval(<<'.,.,', 'bnf.y.rb', 819)
     3777  def _reduce_236(val, _values, result)
    36693778                        @@import_C = true
    36703779                        Import_C.new( val[2] )
     
    36753784.,.,
    36763785
    3677 module_eval(<<'.,.,', 'bnf.y.rb', 822)
    3678   def _reduce_236(val, _values, result)
     3786module_eval(<<'.,.,', 'bnf.y.rb', 825)
     3787  def _reduce_237(val, _values, result)
    36793788                        @@import_C = true
    36803789                        Import_C.new( val[2], val[4] )
     
    36853794.,.,
    36863795
    3687 module_eval(<<'.,.,', 'bnf.y.rb', 829)
    3688   def _reduce_237(val, _values, result)
     3796module_eval(<<'.,.,', 'bnf.y.rb', 832)
     3797  def _reduce_238(val, _values, result)
    36893798     Import.new( val[2] )
    36903799    result
     
    36923801.,.,
    36933802
    3694 module_eval(<<'.,.,', 'bnf.y.rb', 831)
    3695   def _reduce_238(val, _values, result)
     3803module_eval(<<'.,.,', 'bnf.y.rb', 834)
     3804  def _reduce_239(val, _values, result)
    36963805     Import.new( val[2], true )
    36973806    result
     
    36993808.,.,
    37003809
    3701 module_eval(<<'.,.,', 'bnf.y.rb', 836)
    3702   def _reduce_239(val, _values, result)
     3810module_eval(<<'.,.,', 'bnf.y.rb', 839)
     3811  def _reduce_240(val, _values, result)
    37033812     Generate.new( val[2].val, val[4], val[6] )
    37043813    result
     
    37063815.,.,
    37073816
    3708 module_eval(<<'.,.,', 'bnf.y.rb', 841)
    3709   def _reduce_240(val, _values, result)
     3817module_eval(<<'.,.,', 'bnf.y.rb', 844)
     3818  def _reduce_241(val, _values, result)
    37103819                        val[2].each{ |i|       # i:Decl
    37113820                                i.set_kind( :TYPEDEF )
     
    37203829.,.,
    37213830
    3722 module_eval(<<'.,.,', 'bnf.y.rb', 851)
    3723   def _reduce_241(val, _values, result)
     3831module_eval(<<'.,.,', 'bnf.y.rb', 854)
     3832  def _reduce_242(val, _values, result)
    37243833                        val[5].each{ |i|       # i:Decl
    37253834                                i.set_kind( :TYPEDEF )
     
    37343843.,.,
    37353844
    3736 # reduce 242 omitted
    3737 
    37383845# reduce 243 omitted
    37393846
    3740 module_eval(<<'.,.,', 'bnf.y.rb', 868)
    3741   def _reduce_244(val, _values, result)
     3847# reduce 244 omitted
     3848
     3849module_eval(<<'.,.,', 'bnf.y.rb', 871)
     3850  def _reduce_245(val, _values, result)
    37423851     result = [ val[0] ]
    37433852    result
     
    37453854.,.,
    37463855
    3747 module_eval(<<'.,.,', 'bnf.y.rb', 870)
    3748   def _reduce_245(val, _values, result)
     3856module_eval(<<'.,.,', 'bnf.y.rb', 873)
     3857  def _reduce_246(val, _values, result)
    37493858     result << val[2]
    37503859    result
     
    37523861.,.,
    37533862
    3754 module_eval(<<'.,.,', 'bnf.y.rb', 874)
    3755   def _reduce_246(val, _values, result)
     3863module_eval(<<'.,.,', 'bnf.y.rb', 877)
     3864  def _reduce_247(val, _values, result)
    37563865    val[1].end_of_parse
    37573866    result
     
    37593868.,.,
    37603869
    3761 module_eval(<<'.,.,', 'bnf.y.rb', 878)
    3762   def _reduce_247(val, _values, result)
     3870module_eval(<<'.,.,', 'bnf.y.rb', 881)
     3871  def _reduce_248(val, _values, result)
    37633872    result = Namespace.new(val[0].val)
    37643873    result
     
    37663875.,.,
    37673876
    3768 # reduce 248 omitted
    3769 
    37703877# reduce 249 omitted
    37713878
    3772 module_eval(<<'.,.,', 'bnf.y.rb', 886)
    3773   def _reduce_250(val, _values, result)
     3879# reduce 250 omitted
     3880
     3881module_eval(<<'.,.,', 'bnf.y.rb', 889)
     3882  def _reduce_251(val, _values, result)
    37743883     result = NamespacePath.new( val[0].val, false )
    37753884    result
     
    37773886.,.,
    37783887
    3779 module_eval(<<'.,.,', 'bnf.y.rb', 887)
    3780   def _reduce_251(val, _values, result)
     3888module_eval(<<'.,.,', 'bnf.y.rb', 890)
     3889  def _reduce_252(val, _values, result)
    37813890     result = NamespacePath.new( val[1].val, true )
    37823891    result
     
    37843893.,.,
    37853894
    3786 module_eval(<<'.,.,', 'bnf.y.rb', 889)
    3787   def _reduce_252(val, _values, result)
     3895module_eval(<<'.,.,', 'bnf.y.rb', 892)
     3896  def _reduce_253(val, _values, result)
    37883897     result = val[0].append!( val[2].val )
    37893898    result
     
    37913900.,.,
    37923901
    3793 module_eval(<<'.,.,', 'bnf.y.rb', 894)
    3794   def _reduce_253(val, _values, result)
     3902module_eval(<<'.,.,', 'bnf.y.rb', 897)
     3903  def _reduce_254(val, _values, result)
    37953904     result = val[1].end_of_parse( val[3] )
    37963905    result
     
    37983907.,.,
    37993908
    3800 module_eval(<<'.,.,', 'bnf.y.rb', 898)
    3801   def _reduce_254(val, _values, result)
     3909module_eval(<<'.,.,', 'bnf.y.rb', 901)
     3910  def _reduce_255(val, _values, result)
    38023911    result = Signature.new( val[0].val )
    38033912    result
     
    38053914.,.,
    38063915
    3807 module_eval(<<'.,.,', 'bnf.y.rb', 904)
    3808   def _reduce_255(val, _values, result)
     3916module_eval(<<'.,.,', 'bnf.y.rb', 907)
     3917  def _reduce_256(val, _values, result)
    38093918     result = NamedList.new( nil, "function" )
    38103919    result
     
    38123921.,.,
    38133922
    3814 module_eval(<<'.,.,', 'bnf.y.rb', 906)
    3815   def _reduce_256(val, _values, result)
     3923module_eval(<<'.,.,', 'bnf.y.rb', 909)
     3924  def _reduce_257(val, _values, result)
    38163925     result = val[0].add_item( val[1] )
    38173926    result
     
    38193928.,.,
    38203929
    3821 module_eval(<<'.,.,', 'bnf.y.rb', 911)
    3822   def _reduce_257(val, _values, result)
     3930module_eval(<<'.,.,', 'bnf.y.rb', 914)
     3931  def _reduce_258(val, _values, result)
    38233932                        # val[1]: Decl
    38243933                        if val[1].is_function? then
     
    38363945.,.,
    38373946
    3838 module_eval(<<'.,.,', 'bnf.y.rb', 924)
    3839   def _reduce_258(val, _values, result)
     3947module_eval(<<'.,.,', 'bnf.y.rb', 927)
     3948  def _reduce_259(val, _values, result)
    38403949                        if val[4].is_function? then
    38413950                                result = FuncHead.new( val[4], val[3], true )
     
    38493958.,.,
    38503959
    3851 module_eval(<<'.,.,', 'bnf.y.rb', 937)
    3852   def _reduce_259(val, _values, result)
     3960module_eval(<<'.,.,', 'bnf.y.rb', 940)
     3961  def _reduce_260(val, _values, result)
    38533962                        val[1].end_of_parse
    38543963                        result = val[1]
     
    38583967.,.,
    38593968
    3860 module_eval(<<'.,.,', 'bnf.y.rb', 943)
    3861   def _reduce_260(val, _values, result)
     3969module_eval(<<'.,.,', 'bnf.y.rb', 946)
     3970  def _reduce_261(val, _values, result)
    38623971     result = Celltype.new(val[0].val)
    38633972    result
     
    38653974.,.,
    38663975
    3867 # reduce 261 omitted
    3868 
    38693976# reduce 262 omitted
    38703977
    3871 module_eval(<<'.,.,', 'bnf.y.rb', 952)
    3872   def _reduce_263(val, _values, result)
     3978# reduce 263 omitted
     3979
     3980module_eval(<<'.,.,', 'bnf.y.rb', 955)
     3981  def _reduce_264(val, _values, result)
    38733982                        if val[0].kind_of? Port then
    38743983                                Celltype.new_port( val[0] )
     
    38793988.,.,
    38803989
    3881 module_eval(<<'.,.,', 'bnf.y.rb', 958)
    3882   def _reduce_264(val, _values, result)
     3990module_eval(<<'.,.,', 'bnf.y.rb', 961)
     3991  def _reduce_265(val, _values, result)
    38833992                        if val[3].kind_of? Port then
    38843993                                val[3].set_specifier val[1]  # 設定順序あり
     
    38934002.,.,
    38944003
    3895 # reduce 265 omitted
    3896 
    38974004# reduce 266 omitted
    38984005
     
    39034010# reduce 269 omitted
    39044011
    3905 module_eval(<<'.,.,', 'bnf.y.rb', 977)
    3906   def _reduce_270(val, _values, result)
     4012# reduce 270 omitted
     4013
     4014module_eval(<<'.,.,', 'bnf.y.rb', 980)
     4015  def _reduce_271(val, _values, result)
    39074016     result = [ val[0] ]
    3908     result
    3909   end
    3910 .,.,
    3911 
    3912 module_eval(<<'.,.,', 'bnf.y.rb', 979)
    3913   def _reduce_271(val, _values, result)
    3914      result << val[2]
    39154017    result
    39164018  end
     
    39194021module_eval(<<'.,.,', 'bnf.y.rb', 982)
    39204022  def _reduce_272(val, _values, result)
     4023     result << val[2]
     4024    result
     4025  end
     4026.,.,
     4027
     4028module_eval(<<'.,.,', 'bnf.y.rb', 985)
     4029  def _reduce_273(val, _values, result)
    39214030     result = [ :INLINE ]
    39224031    result
     
    39244033.,.,
    39254034
    3926 module_eval(<<'.,.,', 'bnf.y.rb', 983)
    3927   def _reduce_273(val, _values, result)
     4035module_eval(<<'.,.,', 'bnf.y.rb', 986)
     4036  def _reduce_274(val, _values, result)
    39284037     result = [ :ALLOCATOR, val[2] ]
    39294038    result
     
    39314040.,.,
    39324041
    3933 module_eval(<<'.,.,', 'bnf.y.rb', 984)
    3934   def _reduce_274(val, _values, result)
     4042module_eval(<<'.,.,', 'bnf.y.rb', 987)
     4043  def _reduce_275(val, _values, result)
    39354044     result = [ :OPTIONAL ]
    39364045    result
     
    39384047.,.,
    39394048
    3940 module_eval(<<'.,.,', 'bnf.y.rb', 985)
    3941   def _reduce_275(val, _values, result)
     4049module_eval(<<'.,.,', 'bnf.y.rb', 988)
     4050  def _reduce_276(val, _values, result)
    39424051     result = [ :REF_DESC ]
    39434052    result
     
    39454054.,.,
    39464055
    3947 module_eval(<<'.,.,', 'bnf.y.rb', 986)
    3948   def _reduce_276(val, _values, result)
     4056module_eval(<<'.,.,', 'bnf.y.rb', 989)
     4057  def _reduce_277(val, _values, result)
    39494058     result = [ :DYNAMIC ]
    3950     result
    3951   end
    3952 .,.,
    3953 
    3954 module_eval(<<'.,.,', 'bnf.y.rb', 987)
    3955   def _reduce_277(val, _values, result)
    3956      result = [ :OMIT ]
    39574059    result
    39584060  end
     
    39614063module_eval(<<'.,.,', 'bnf.y.rb', 990)
    39624064  def _reduce_278(val, _values, result)
    3963      result = [ val[0] ]
    3964     result
    3965   end
    3966 .,.,
    3967 
    3968 module_eval(<<'.,.,', 'bnf.y.rb', 991)
     4065     result = [ :OMIT ]
     4066    result
     4067  end
     4068.,.,
     4069
     4070module_eval(<<'.,.,', 'bnf.y.rb', 993)
    39694071  def _reduce_279(val, _values, result)
    39704072     result = [ val[0] ]
     
    39734075.,.,
    39744076
    3975 module_eval(<<'.,.,', 'bnf.y.rb', 992)
     4077module_eval(<<'.,.,', 'bnf.y.rb', 994)
    39764078  def _reduce_280(val, _values, result)
    3977      result << val[2]
    3978     result
    3979   end
    3980 .,.,
    3981 
    3982 module_eval(<<'.,.,', 'bnf.y.rb', 993)
     4079     result = [ val[0] ]
     4080    result
     4081  end
     4082.,.,
     4083
     4084module_eval(<<'.,.,', 'bnf.y.rb', 995)
    39834085  def _reduce_281(val, _values, result)
    39844086     result << val[2]
     
    39874089.,.,
    39884090
    3989 module_eval(<<'.,.,', 'bnf.y.rb', 997)
     4091module_eval(<<'.,.,', 'bnf.y.rb', 996)
    39904092  def _reduce_282(val, _values, result)
     4093     result << val[2]
     4094    result
     4095  end
     4096.,.,
     4097
     4098module_eval(<<'.,.,', 'bnf.y.rb', 1000)
     4099  def _reduce_283(val, _values, result)
    39914100      result = [ :INTERNAL_ALLOC, val[0].val, val[2].val, val[4] ]
    39924101    result
     
    39944103.,.,
    39954104
    3996 module_eval(<<'.,.,', 'bnf.y.rb', 999)
    3997   def _reduce_283(val, _values, result)
     4105module_eval(<<'.,.,', 'bnf.y.rb', 1002)
     4106  def _reduce_284(val, _values, result)
    39984107      result = [ :RELAY_ALLOC, val[0].val, val[2].val, val[4] ]
    39994108    result
     
    40014110.,.,
    40024111
    4003 module_eval(<<'.,.,', 'bnf.y.rb', 1005)
    4004   def _reduce_284(val, _values, result)
     4112module_eval(<<'.,.,', 'bnf.y.rb', 1008)
     4113  def _reduce_285(val, _values, result)
    40054114     result = Port.new( val[2].val, val[1], val[0] )
    40064115    result
     
    40084117.,.,
    40094118
    4010 module_eval(<<'.,.,', 'bnf.y.rb', 1007)
    4011   def _reduce_285(val, _values, result)
     4119module_eval(<<'.,.,', 'bnf.y.rb', 1010)
     4120  def _reduce_286(val, _values, result)
    40124121     result = Port.new( val[2].val, val[1], val[0], "[]" )
    40134122    result
     
    40154124.,.,
    40164125
    4017 module_eval(<<'.,.,', 'bnf.y.rb', 1009)
    4018   def _reduce_286(val, _values, result)
     4126module_eval(<<'.,.,', 'bnf.y.rb', 1012)
     4127  def _reduce_287(val, _values, result)
    40194128     result = Port.new(val[2].val, val[1], val[0], val[4])
    4020     result
    4021   end
    4022 .,.,
    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 )
    40274129    result
    40284130  end
     
    40314133module_eval(<<'.,.,', 'bnf.y.rb', 1014)
    40324134  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
     4140module_eval(<<'.,.,', 'bnf.y.rb', 1017)
     4141  def _reduce_289(val, _values, result)
    40334142     result = :CALL
    40344143    result
     
    40364145.,.,
    40374146
    4038 module_eval(<<'.,.,', 'bnf.y.rb', 1015)
    4039   def _reduce_289(val, _values, result)
     4147module_eval(<<'.,.,', 'bnf.y.rb', 1018)
     4148  def _reduce_290(val, _values, result)
    40404149     result = :ENTRY
    40414150    result
     
    40434152.,.,
    40444153
    4045 module_eval(<<'.,.,', 'bnf.y.rb', 1019)
    4046   def _reduce_290(val, _values, result)
     4154module_eval(<<'.,.,', 'bnf.y.rb', 1022)
     4155  def _reduce_291(val, _values, result)
    40474156     result = val[0]
    40484157    result
     
    40504159.,.,
    40514160
    4052 # reduce 291 omitted
    4053 
    40544161# reduce 292 omitted
    40554162
    4056 module_eval(<<'.,.,', 'bnf.y.rb', 1031)
    4057   def _reduce_293(val, _values, result)
     4163# reduce 293 omitted
     4164
     4165module_eval(<<'.,.,', 'bnf.y.rb', 1034)
     4166  def _reduce_294(val, _values, result)
    40584167     result = nil
    40594168    result
     
    40614170.,.,
    40624171
    4063 module_eval(<<'.,.,', 'bnf.y.rb', 1035)
    4064   def _reduce_294(val, _values, result)
     4172module_eval(<<'.,.,', 'bnf.y.rb', 1038)
     4173  def _reduce_295(val, _values, result)
    40654174     Celltype.new_attribute( val[0] )
    40664175    result
     
    40684177.,.,
    40694178
    4070 module_eval(<<'.,.,', 'bnf.y.rb', 1037)
    4071   def _reduce_295(val, _values, result)
     4179module_eval(<<'.,.,', 'bnf.y.rb', 1040)
     4180  def _reduce_296(val, _values, result)
    40724181     Celltype.new_attribute( val[1] )
    40734182    result
     
    40754184.,.,
    40764185
    4077 module_eval(<<'.,.,', 'bnf.y.rb', 1043)
    4078   def _reduce_296(val, _values, result)
     4186module_eval(<<'.,.,', 'bnf.y.rb', 1046)
     4187  def _reduce_297(val, _values, result)
    40794188                        val[0].each{ |i|       # i:Decl
    40804189                                i.set_kind( :ATTRIBUTE )
     
    40874196.,.,
    40884197
    4089 module_eval(<<'.,.,', 'bnf.y.rb', 1051)
    4090   def _reduce_297(val, _values, result)
     4198module_eval(<<'.,.,', 'bnf.y.rb', 1054)
     4199  def _reduce_298(val, _values, result)
    40914200                        val[3].each{ |i|       # i:Decl
    40924201                                i.set_kind( :ATTRIBUTE )   # 設定順序あり
     
    41004209.,.,
    41014210
    4102 module_eval(<<'.,.,', 'bnf.y.rb', 1060)
    4103   def _reduce_298(val, _values, result)
     4211module_eval(<<'.,.,', 'bnf.y.rb', 1063)
     4212  def _reduce_299(val, _values, result)
    41044213     result = [:OMIT]
    41054214    result
     
    41074216.,.,
    41084217
    4109 module_eval(<<'.,.,', 'bnf.y.rb', 1061)
    4110   def _reduce_299(val, _values, result)
     4218module_eval(<<'.,.,', 'bnf.y.rb', 1064)
     4219  def _reduce_300(val, _values, result)
    41114220     result = [:SIZE_IS,val[2]]
    4112     result
    4113   end
    4114 .,.,
    4115 
    4116 module_eval(<<'.,.,', 'bnf.y.rb', 1062)
    4117   def _reduce_300(val, _values, result)
    4118       result = [:CHOICE,val[3]]
    41194221    result
    41204222  end
     
    41234225module_eval(<<'.,.,', 'bnf.y.rb', 1065)
    41244226  def _reduce_301(val, _values, result)
     4227      result = [:CHOICE,val[3]]
     4228    result
     4229  end
     4230.,.,
     4231
     4232module_eval(<<'.,.,', 'bnf.y.rb', 1068)
     4233  def _reduce_302(val, _values, result)
    41254234      result << val[2]
    41264235    result
     
    41284237.,.,
    41294238
    4130 module_eval(<<'.,.,', 'bnf.y.rb', 1066)
    4131   def _reduce_302(val, _values, result)
     4239module_eval(<<'.,.,', 'bnf.y.rb', 1069)
     4240  def _reduce_303(val, _values, result)
    41324241      result = [ val[0] ]
    41334242    result
     
    41354244.,.,
    41364245
    4137 # reduce 303 omitted
    4138 
    4139 module_eval(<<'.,.,', 'bnf.y.rb', 1074)
    4140   def _reduce_304(val, _values, result)
     4246# reduce 304 omitted
     4247
     4248module_eval(<<'.,.,', 'bnf.y.rb', 1077)
     4249  def _reduce_305(val, _values, result)
    41414250     result = nil
    41424251    result
     
    41444253.,.,
    41454254
    4146 module_eval(<<'.,.,', 'bnf.y.rb', 1078)
    4147   def _reduce_305(val, _values, result)
     4255module_eval(<<'.,.,', 'bnf.y.rb', 1081)
     4256  def _reduce_306(val, _values, result)
    41484257     Celltype.new_var( val[0] )
    41494258    result
     
    41514260.,.,
    41524261
    4153 module_eval(<<'.,.,', 'bnf.y.rb', 1080)
    4154   def _reduce_306(val, _values, result)
     4262module_eval(<<'.,.,', 'bnf.y.rb', 1083)
     4263  def _reduce_307(val, _values, result)
    41554264     Celltype.new_var( val[1] )
    41564265    result
     
    41584267.,.,
    41594268
    4160 module_eval(<<'.,.,', 'bnf.y.rb', 1085)
    4161   def _reduce_307(val, _values, result)
     4269module_eval(<<'.,.,', 'bnf.y.rb', 1088)
     4270  def _reduce_308(val, _values, result)
    41624271                        val[0].each{ |i|       # i:Decl
    41634272                                i.set_kind( :VAR )
     
    41694278.,.,
    41704279
    4171 module_eval(<<'.,.,', 'bnf.y.rb', 1092)
    4172   def _reduce_308(val, _values, result)
     4280module_eval(<<'.,.,', 'bnf.y.rb', 1095)
     4281  def _reduce_309(val, _values, result)
    41734282                        val[3].each{ |i|       # i:Decl
    41744283                                i.set_kind( :VAR )   # 設定順序あり
     
    41824291.,.,
    41834292
    4184 module_eval(<<'.,.,', 'bnf.y.rb', 1101)
    4185   def _reduce_309(val, _values, result)
     4293module_eval(<<'.,.,', 'bnf.y.rb', 1104)
     4294  def _reduce_310(val, _values, result)
    41864295     result = [:SIZE_IS,val[2]]
    41874296    result
     
    41894298.,.,
    41904299
    4191 module_eval(<<'.,.,', 'bnf.y.rb', 1107)
    4192   def _reduce_310(val, _values, result)
     4300module_eval(<<'.,.,', 'bnf.y.rb', 1110)
     4301  def _reduce_311(val, _values, result)
    41934302                        Celltype.new_require( val[1], val[3] )
    41944303               
     
    41974306.,.,
    41984307
    4199 module_eval(<<'.,.,', 'bnf.y.rb', 1111)
    4200   def _reduce_311(val, _values, result)
     4308module_eval(<<'.,.,', 'bnf.y.rb', 1114)
     4309  def _reduce_312(val, _values, result)
    42014310                        Celltype.new_require( val[3], val[5], val[1].val )
    42024311               
     
    42054314.,.,
    42064315
    4207 # reduce 312 omitted
    4208 
    4209 module_eval(<<'.,.,', 'bnf.y.rb', 1119)
    4210   def _reduce_313(val, _values, result)
     4316# reduce 313 omitted
     4317
     4318module_eval(<<'.,.,', 'bnf.y.rb', 1122)
     4319  def _reduce_314(val, _values, result)
    42114320     Factory.set_f_celltype( false )
    42124321    result
     
    42144323.,.,
    42154324
    4216 module_eval(<<'.,.,', 'bnf.y.rb', 1120)
    4217   def _reduce_314(val, _values, result)
     4325module_eval(<<'.,.,', 'bnf.y.rb', 1123)
     4326  def _reduce_315(val, _values, result)
    42184327     Factory.set_f_celltype( true )
    42194328    result
     
    42214330.,.,
    42224331
    4223 # reduce 315 omitted
    4224 
    42254332# reduce 316 omitted
    42264333
    4227 module_eval(<<'.,.,', 'bnf.y.rb', 1128)
    4228   def _reduce_317(val, _values, result)
     4334# reduce 317 omitted
     4335
     4336module_eval(<<'.,.,', 'bnf.y.rb', 1131)
     4337  def _reduce_318(val, _values, result)
    42294338     Factory.new( val[0].val, val[2], val[4], nil    )
    42304339    result
     
    42324341.,.,
    42334342
    4234 module_eval(<<'.,.,', 'bnf.y.rb', 1130)
    4235   def _reduce_318(val, _values, result)
     4343module_eval(<<'.,.,', 'bnf.y.rb', 1133)
     4344  def _reduce_319(val, _values, result)
    42364345     Factory.new( val[0].val, val[2], val[4], val[6] )
    42374346    result
     
    42394348.,.,
    42404349
    4241 # reduce 319 omitted
    4242 
    4243 module_eval(<<'.,.,', 'bnf.y.rb', 1137)
    4244   def _reduce_320(val, _values, result)
     4350# reduce 320 omitted
     4351
     4352module_eval(<<'.,.,', 'bnf.y.rb', 1140)
     4353  def _reduce_321(val, _values, result)
    42454354     result = [ [ :IDENTIFIER, val[0].val ] ]
    42464355    result
     
    42484357.,.,
    42494358
    4250 module_eval(<<'.,.,', 'bnf.y.rb', 1139)
    4251   def _reduce_321(val, _values, result)
     4359module_eval(<<'.,.,', 'bnf.y.rb', 1142)
     4360  def _reduce_322(val, _values, result)
    42524361     result << [ :IDENTIFIER, val[2].val ]
    42534362    result
     
    42554364.,.,
    42564365
    4257 module_eval(<<'.,.,', 'bnf.y.rb', 1141)
    4258   def _reduce_322(val, _values, result)
     4366module_eval(<<'.,.,', 'bnf.y.rb', 1144)
     4367  def _reduce_323(val, _values, result)
    42594368     result = [ [ :STRING_LITERAL, val[0].val ] ]
    42604369    result
     
    42624371.,.,
    42634372
    4264 module_eval(<<'.,.,', 'bnf.y.rb', 1143)
    4265   def _reduce_323(val, _values, result)
     4373module_eval(<<'.,.,', 'bnf.y.rb', 1146)
     4374  def _reduce_324(val, _values, result)
    42664375     result << [ :STRING_LITERAL, val[2].val ]
    42674376    result
     
    42694378.,.,
    42704379
    4271 module_eval(<<'.,.,', 'bnf.y.rb', 1148)
    4272   def _reduce_324(val, _values, result)
     4380module_eval(<<'.,.,', 'bnf.y.rb', 1151)
     4381  def _reduce_325(val, _values, result)
    42734382     Cell.new_def
    42744383    result
     
    42764385.,.,
    42774386
    4278 module_eval(<<'.,.,', 'bnf.y.rb', 1150)
    4279   def _reduce_325(val, _values, result)
     4387module_eval(<<'.,.,', 'bnf.y.rb', 1153)
     4388  def _reduce_326(val, _values, result)
    42804389     result = Cell.end_of_parse true
    42814390    result
     
    42834392.,.,
    42844393
    4285 module_eval(<<'.,.,', 'bnf.y.rb', 1152)
    4286   def _reduce_326(val, _values, result)
     4394module_eval(<<'.,.,', 'bnf.y.rb', 1155)
     4395  def _reduce_327(val, _values, result)
    42874396     result = Cell.end_of_parse false
    42884397    result
     
    42904399.,.,
    42914400
    4292 module_eval(<<'.,.,', 'bnf.y.rb', 1156)
    4293   def _reduce_327(val, _values, result)
     4401module_eval(<<'.,.,', 'bnf.y.rb', 1159)
     4402  def _reduce_328(val, _values, result)
    42944403     result = Cell.new(val[0])
    42954404    result
     
    42974406.,.,
    42984407
    4299 module_eval(<<'.,.,', 'bnf.y.rb', 1160)
    4300   def _reduce_328(val, _values, result)
     4408module_eval(<<'.,.,', 'bnf.y.rb', 1163)
     4409  def _reduce_329(val, _values, result)
    43014410     result = Cell.set_name(val[0].val)
    43024411    result
     
    43044413.,.,
    43054414
    4306 # reduce 329 omitted
    4307 
    43084415# reduce 330 omitted
    43094416
    43104417# reduce 331 omitted
    43114418
    4312 module_eval(<<'.,.,', 'bnf.y.rb', 1169)
    4313   def _reduce_332(val, _values, result)
     4419# reduce 332 omitted
     4420
     4421module_eval(<<'.,.,', 'bnf.y.rb', 1172)
     4422  def _reduce_333(val, _values, result)
    43144423     val[3].set_specifier_list( val[1] ) 
    43154424    result
     
    43174426.,.,
    43184427
    4319 module_eval(<<'.,.,', 'bnf.y.rb', 1171)
    4320   def _reduce_333(val, _values, result)
     4428module_eval(<<'.,.,', 'bnf.y.rb', 1174)
     4429  def _reduce_334(val, _values, result)
    43214430     val[0].set_specifier_list( [] )
    43224431    result
     
    43244433.,.,
    43254434
    4326 module_eval(<<'.,.,', 'bnf.y.rb', 1175)
    4327   def _reduce_334(val, _values, result)
     4435module_eval(<<'.,.,', 'bnf.y.rb', 1178)
     4436  def _reduce_335(val, _values, result)
    43284437     result << val[2]
    43294438    result
     
    43314440.,.,
    43324441
    4333 module_eval(<<'.,.,', 'bnf.y.rb', 1177)
    4334   def _reduce_335(val, _values, result)
     4442module_eval(<<'.,.,', 'bnf.y.rb', 1180)
     4443  def _reduce_336(val, _values, result)
    43354444     result = [val[0]]
    4336     result
    4337   end
    4338 .,.,
    4339 
    4340 module_eval(<<'.,.,', 'bnf.y.rb', 1181)
    4341   def _reduce_336(val, _values, result)
    4342      result = [ :THROUGH, val[2], val[4] ]
    43434445    result
    43444446  end
     
    43474449module_eval(<<'.,.,', 'bnf.y.rb', 1184)
    43484450  def _reduce_337(val, _values, result)
     4451     result = [ :THROUGH, val[2], val[4] ]
     4452    result
     4453  end
     4454.,.,
     4455
     4456module_eval(<<'.,.,', 'bnf.y.rb', 1187)
     4457  def _reduce_338(val, _values, result)
    43494458     result = val[0]
    43504459    result
     
    43524461.,.,
    43534462
    4354 # reduce 338 omitted
    4355 
    4356 module_eval(<<'.,.,', 'bnf.y.rb', 1198)
    4357   def _reduce_339(val, _values, result)
     4463# reduce 339 omitted
     4464
     4465module_eval(<<'.,.,', 'bnf.y.rb', 1201)
     4466  def _reduce_340(val, _values, result)
    43584467                        result = Join.new( val[0].val,  -1, val[4] )
    43594468                        Cell.new_join( result, true )
     
    43634472.,.,
    43644473
    4365 module_eval(<<'.,.,', 'bnf.y.rb', 1203)
    4366   def _reduce_340(val, _values, result)
     4474module_eval(<<'.,.,', 'bnf.y.rb', 1206)
     4475  def _reduce_341(val, _values, result)
    43674476                        result = Join.new( val[0].val, val[2], val[5] )
    43684477                        Cell.new_join( result, true )
     
    43724481.,.,
    43734482
    4374 module_eval(<<'.,.,', 'bnf.y.rb', 1208)
    4375   def _reduce_341(val, _values, result)
     4483module_eval(<<'.,.,', 'bnf.y.rb', 1211)
     4484  def _reduce_342(val, _values, result)
    43764485                        result = Join.new( val[0].val, nil, val[2] )
    43774486                        Cell.new_join( result, true )
     
    43814490.,.,
    43824491
    4383 module_eval(<<'.,.,', 'bnf.y.rb', 1213)
    4384   def _reduce_342(val, _values, result)
     4492module_eval(<<'.,.,', 'bnf.y.rb', 1216)
     4493  def _reduce_343(val, _values, result)
    43854494                        result = Join.new( val[0].val, nil, [ :COMPOSITE, val[4] ] )
    43864495                        Cell.new_join( result, true )
     
    43904499.,.,
    43914500
    4392 # reduce 343 omitted
    4393 
    4394 module_eval(<<'.,.,', 'bnf.y.rb', 1224)
    4395   def _reduce_344(val, _values, result)
     4501# reduce 344 omitted
     4502
     4503module_eval(<<'.,.,', 'bnf.y.rb', 1227)
     4504  def _reduce_345(val, _values, result)
    43964505                        rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val )
    43974506                        Cell.new_reverse_join( rj )
     
    44014510.,.,
    44024511
    4403 module_eval(<<'.,.,', 'bnf.y.rb', 1230)
    4404   def _reduce_345(val, _values, result)
     4512module_eval(<<'.,.,', 'bnf.y.rb', 1233)
     4513  def _reduce_346(val, _values, result)
    44054514                        rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val, val[6] )
    44064515                        Cell.new_reverse_join( rj )
     
    44104519.,.,
    44114520
    4412 module_eval(<<'.,.,', 'bnf.y.rb', 1236)
    4413   def _reduce_346(val, _values, result)
     4521module_eval(<<'.,.,', 'bnf.y.rb', 1239)
     4522  def _reduce_347(val, _values, result)
    44144523                        rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val )
    44154524                        Cell.new_reverse_join( rj )
     
    44194528.,.,
    44204529
    4421 module_eval(<<'.,.,', 'bnf.y.rb', 1242)
    4422   def _reduce_347(val, _values, result)
     4530module_eval(<<'.,.,', 'bnf.y.rb', 1245)
     4531  def _reduce_348(val, _values, result)
    44234532                        rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val, val[9] )
    44244533                        Cell.new_reverse_join( rj )
     
    44284537.,.,
    44294538
    4430 # reduce 348 omitted
    4431 
    4432 module_eval(<<'.,.,', 'bnf.y.rb', 1254)
    4433   def _reduce_349(val, _values, result)
     4539# reduce 349 omitted
     4540
     4541module_eval(<<'.,.,', 'bnf.y.rb', 1257)
     4542  def _reduce_350(val, _values, result)
    44344543                        CompositeCelltype.end_of_parse
    44354544                        result = val[1]
     
    44394548.,.,
    44404549
    4441 module_eval(<<'.,.,', 'bnf.y.rb', 1260)
    4442   def _reduce_350(val, _values, result)
     4550module_eval(<<'.,.,', 'bnf.y.rb', 1263)
     4551  def _reduce_351(val, _values, result)
    44434552     result = CompositeCelltype.new(val[0].val)
    44444553    result
     
    44464555.,.,
    44474556
    4448 # reduce 351 omitted
    4449 
    44504557# reduce 352 omitted
    44514558
    4452 module_eval(<<'.,.,', 'bnf.y.rb', 1269)
    4453   def _reduce_353(val, _values, result)
     4559# reduce 353 omitted
     4560
     4561module_eval(<<'.,.,', 'bnf.y.rb', 1272)
     4562  def _reduce_354(val, _values, result)
    44544563                        if val[0].kind_of?( Port ) then
    44554564                                CompositeCelltype.new_port( val[0] )   # 遅延して登録
     
    44604569.,.,
    44614570
    4462 module_eval(<<'.,.,', 'bnf.y.rb', 1275)
    4463   def _reduce_354(val, _values, result)
     4571module_eval(<<'.,.,', 'bnf.y.rb', 1278)
     4572  def _reduce_355(val, _values, result)
    44644573                        if val[3].kind_of?( Port ) then
    44654574                                # port 以外 val[3] に有効な値が入っていないので、以下のメソッドを適用できない
     
    44794588.,.,
    44804589
    4481 # reduce 355 omitted
    4482 
    44834590# reduce 356 omitted
    44844591
     
    44874594# reduce 358 omitted
    44884595
    4489 module_eval(<<'.,.,', 'bnf.y.rb', 1299)
    4490   def _reduce_359(val, _values, result)
     4596# reduce 359 omitted
     4597
     4598module_eval(<<'.,.,', 'bnf.y.rb', 1302)
     4599  def _reduce_360(val, _values, result)
    44914600                        Generator.add_statement_specifier val[0]
    44924601                        result = [ val[0] ]
     
    44964605.,.,
    44974606
    4498 module_eval(<<'.,.,', 'bnf.y.rb', 1304)
    4499   def _reduce_360(val, _values, result)
     4607module_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
     4616module_eval(<<'.,.,', 'bnf.y.rb', 1312)
     4617  def _reduce_362(val, _values, result)
    45004618     result = [ :ALLOCATOR, val[2] ]
    45014619    result
     
    45034621.,.,
    45044622
    4505 module_eval(<<'.,.,', 'bnf.y.rb', 1305)
    4506   def _reduce_361(val, _values, result)
     4623module_eval(<<'.,.,', 'bnf.y.rb', 1313)
     4624  def _reduce_363(val, _values, result)
    45074625     result = [ :OMIT ]
    45084626    result
     
    45104628.,.,
    45114629
    4512 module_eval(<<'.,.,', 'bnf.y.rb', 1306)
    4513   def _reduce_362(val, _values, result)
     4630module_eval(<<'.,.,', 'bnf.y.rb', 1314)
     4631  def _reduce_364(val, _values, result)
    45144632     result = [ :OPTIONAL ]
    45154633    result
     
    45174635.,.,
    45184636
    4519 module_eval(<<'.,.,', 'bnf.y.rb', 1307)
    4520   def _reduce_363(val, _values, result)
     4637module_eval(<<'.,.,', 'bnf.y.rb', 1315)
     4638  def _reduce_365(val, _values, result)
    45214639     result = [ :REF_DESC ]
    45224640    result
     
    45244642.,.,
    45254643
    4526 module_eval(<<'.,.,', 'bnf.y.rb', 1308)
    4527   def _reduce_364(val, _values, result)
     4644module_eval(<<'.,.,', 'bnf.y.rb', 1316)
     4645  def _reduce_366(val, _values, result)
    45284646     result = [ :DYNAMIC ]
    45294647    result
     
    45314649.,.,
    45324650
    4533 module_eval(<<'.,.,', 'bnf.y.rb', 1313)
    4534   def _reduce_365(val, _values, result)
     4651module_eval(<<'.,.,', 'bnf.y.rb', 1321)
     4652  def _reduce_367(val, _values, result)
    45354653                        # CompositeCelltype.new_port( val[0] )
    45364654                        result = val[0]
     
    45404658.,.,
    45414659
    4542 module_eval(<<'.,.,', 'bnf.y.rb', 1320)
    4543   def _reduce_366(val, _values, result)
     4660module_eval(<<'.,.,', 'bnf.y.rb', 1328)
     4661  def _reduce_368(val, _values, result)
    45444662     result = nil
    45454663    result
     
    45474665.,.,
    45484666
    4549 module_eval(<<'.,.,', 'bnf.y.rb', 1324)
    4550   def _reduce_367(val, _values, result)
     4667module_eval(<<'.,.,', 'bnf.y.rb', 1332)
     4668  def _reduce_369(val, _values, result)
    45514669     CompositeCelltype.new_attribute( val[0] )
    45524670    result
     
    45544672.,.,
    45554673
    4556 module_eval(<<'.,.,', 'bnf.y.rb', 1326)
    4557   def _reduce_368(val, _values, result)
     4674module_eval(<<'.,.,', 'bnf.y.rb', 1334)
     4675  def _reduce_370(val, _values, result)
    45584676     CompositeCelltype.new_attribute( val[1] )
    45594677    result
     
    45614679.,.,
    45624680
    4563 module_eval(<<'.,.,', 'bnf.y.rb', 1331)
    4564   def _reduce_369(val, _values, result)
     4681module_eval(<<'.,.,', 'bnf.y.rb', 1339)
     4682  def _reduce_371(val, _values, result)
    45654683     Cell.new_def
    45664684    result
     
    45684686.,.,
    45694687
    4570 module_eval(<<'.,.,', 'bnf.y.rb', 1333)
    4571   def _reduce_370(val, _values, result)
     4688module_eval(<<'.,.,', 'bnf.y.rb', 1341)
     4689  def _reduce_372(val, _values, result)
    45724690     result = Cell.end_of_parse true
    45734691    result
     
    45754693.,.,
    45764694
    4577 module_eval(<<'.,.,', 'bnf.y.rb', 1335)
    4578   def _reduce_371(val, _values, result)
     4695module_eval(<<'.,.,', 'bnf.y.rb', 1343)
     4696  def _reduce_373(val, _values, result)
    45794697     result = Cell.end_of_parse false
    45804698    result
     
    45824700.,.,
    45834701
    4584 module_eval(<<'.,.,', 'bnf.y.rb', 1340)
    4585   def _reduce_372(val, _values, result)
     4702module_eval(<<'.,.,', 'bnf.y.rb', 1348)
     4703  def _reduce_374(val, _values, result)
    45864704     Cell.new(val[0],true)
    45874705    result
     
    45894707.,.,
    45904708
    4591 module_eval(<<'.,.,', 'bnf.y.rb', 1344)
    4592   def _reduce_373(val, _values, result)
     4709module_eval(<<'.,.,', 'bnf.y.rb', 1352)
     4710  def _reduce_375(val, _values, result)
    45934711     Cell.set_name(val[0].val)
    45944712    result
     
    45964714.,.,
    45974715
    4598 # reduce 374 omitted
    4599 
    4600 # reduce 375 omitted
    4601 
    46024716# reduce 376 omitted
    46034717
    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
     4724module_eval(<<'.,.,', 'bnf.y.rb', 1363)
     4725  def _reduce_380(val, _values, result)
    46064726        Cell.external_join( val[0].val, val[4].val, true )     
    46074727    result
     
    46094729.,.,
    46104730
    4611 module_eval(<<'.,.,', 'bnf.y.rb', 1356)
    4612   def _reduce_378(val, _values, result)
     4731module_eval(<<'.,.,', 'bnf.y.rb', 1365)
     4732  def _reduce_381(val, _values, result)
    46134733        Cell.external_join( val[0].val, val[2].val, false )     
    46144734    result
     
    46164736.,.,
    46174737
    4618 module_eval(<<'.,.,', 'bnf.y.rb', 1363)
    4619   def _reduce_379(val, _values, result)
     4738module_eval(<<'.,.,', 'bnf.y.rb', 1372)
     4739  def _reduce_382(val, _values, result)
    46204740                        CompositeCelltype.new_join( val[0].val,
    46214741                                                val[2].val, val[4].val, :ENTRY )
     
    46254745.,.,
    46264746
    4627 module_eval(<<'.,.,', 'bnf.y.rb', 1368)
    4628   def _reduce_380(val, _values, result)
     4747module_eval(<<'.,.,', 'bnf.y.rb', 1377)
     4748  def _reduce_383(val, _values, result)
    46294749                        CompositeCelltype.new_join( val[2].val,
    46304750                                                val[4].val, val[6].val, :ENTRY )
     
    46344754.,.,
    46354755
    4636 # reduce 381 omitted
    4637 
    4638 # reduce 382 omitted
    4639 
    4640 # reduce 383 omitted
    4641 
    4642 module_eval(<<'.,.,', 'bnf.y.rb', 1384)
    4643   def _reduce_384(val, _values, result)
     4756# reduce 384 omitted
     4757
     4758# reduce 385 omitted
     4759
     4760# reduce 386 omitted
     4761
     4762module_eval(<<'.,.,', 'bnf.y.rb', 1393)
     4763  def _reduce_387(val, _values, result)
    46444764     Region.end_of_parse
    46454765    result
    46464766  end
    46474767.,.,
    4648 
    4649 module_eval(<<'.,.,', 'bnf.y.rb', 1386)
    4650   def _reduce_385(val, _values, result)
    4651      Region.end_of_parse
    4652     result
    4653   end
    4654 .,.,
    4655 
    4656 # reduce 386 omitted
    4657 
    4658 # reduce 387 omitted
    46594768
    46604769module_eval(<<'.,.,', 'bnf.y.rb', 1395)
    46614770  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
     4780module_eval(<<'.,.,', 'bnf.y.rb', 1404)
     4781  def _reduce_391(val, _values, result)
    46624782     Region.new_in_through( val[2].val, val[4].val )
    46634783    result
     
    46654785.,.,
    46664786
    4667 module_eval(<<'.,.,', 'bnf.y.rb', 1397)
    4668   def _reduce_389(val, _values, result)
     4787module_eval(<<'.,.,', 'bnf.y.rb', 1406)
     4788  def _reduce_392(val, _values, result)
    46694789     Region.new_in_through
    46704790    result
     
    46724792.,.,
    46734793
    4674 module_eval(<<'.,.,', 'bnf.y.rb', 1399)
    4675   def _reduce_390(val, _values, result)
     4794module_eval(<<'.,.,', 'bnf.y.rb', 1408)
     4795  def _reduce_393(val, _values, result)
    46764796     Region.new_out_through( val[2].val, val[4].val )
    46774797    result
     
    46794799.,.,
    46804800
    4681 module_eval(<<'.,.,', 'bnf.y.rb', 1401)
    4682   def _reduce_391(val, _values, result)
     4801module_eval(<<'.,.,', 'bnf.y.rb', 1410)
     4802  def _reduce_394(val, _values, result)
    46834803     Region.new_out_through()
    46844804    result
     
    46864806.,.,
    46874807
    4688 module_eval(<<'.,.,', 'bnf.y.rb', 1403)
    4689   def _reduce_392(val, _values, result)
     4808module_eval(<<'.,.,', 'bnf.y.rb', 1412)
     4809  def _reduce_395(val, _values, result)
    46904810     Region.new_to_through( val[2], val[4].val, val[6].val )
    46914811    result
     
    46934813.,.,
    46944814
    4695 module_eval(<<'.,.,', 'bnf.y.rb', 1405)
    4696   def _reduce_393(val, _values, result)
     4815module_eval(<<'.,.,', 'bnf.y.rb', 1414)
     4816  def _reduce_396(val, _values, result)
    46974817     Region.new_to_through( val[2], nil, nil )
    46984818    result
     
    47004820.,.,
    47014821
    4702 module_eval(<<'.,.,', 'bnf.y.rb', 1407)
    4703   def _reduce_394(val, _values, result)
     4822module_eval(<<'.,.,', 'bnf.y.rb', 1416)
     4823  def _reduce_397(val, _values, result)
    47044824     Region.set_type( :NODE )
    47054825    result
     
    47074827.,.,
    47084828
    4709 module_eval(<<'.,.,', 'bnf.y.rb', 1409)
    4710   def _reduce_395(val, _values, result)
     4829module_eval(<<'.,.,', 'bnf.y.rb', 1418)
     4830  def _reduce_398(val, _values, result)
    47114831     Region.set_type( :LINKUNIT )
    47124832    result
     
    47144834.,.,
    47154835
    4716 module_eval(<<'.,.,', 'bnf.y.rb', 1411)
    4717   def _reduce_396(val, _values, result)
     4836module_eval(<<'.,.,', 'bnf.y.rb', 1420)
     4837  def _reduce_399(val, _values, result)
    47184838     Region.set_domain( val[2].val, val[4] )
    47194839    result
     
    47214841.,.,
    47224842
    4723 module_eval(<<'.,.,', 'bnf.y.rb', 1413)
    4724   def _reduce_397(val, _values, result)
     4843module_eval(<<'.,.,', 'bnf.y.rb', 1422)
     4844  def _reduce_400(val, _values, result)
    47254845     Region.set_type( :CLASS, val[2].val )
    47264846    result
     
    47284848.,.,
    47294849
    4730 module_eval(<<'.,.,', 'bnf.y.rb', 1417)
    4731   def _reduce_398(val, _values, result)
     4850module_eval(<<'.,.,', 'bnf.y.rb', 1426)
     4851  def _reduce_401(val, _values, result)
    47324852     result = Region.new( val[0].val )
    47334853    result
     
    47354855.,.,
    47364856
    4737 # reduce 399 omitted
    4738 
    4739 # reduce 400 omitted
    4740 
    4741 # reduce 401 omitted
    4742 
    47434857# reduce 402 omitted
    47444858
    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
     4865module_eval(<<'.,.,', 'bnf.y.rb', 1437)
     4866  def _reduce_406(val, _values, result)
    47474867                        obj = val[3]
    47484868                        if obj.kind_of?( Cell ) then
     
    47564876.,.,
    47574877
    4758 module_eval(<<'.,.,', 'bnf.y.rb', 1450)
    4759   def _reduce_404(val, _values, result)
     4878module_eval(<<'.,.,', 'bnf.y.rb', 1459)
     4879  def _reduce_407(val, _values, result)
    47604880     result = [ val[0].val ]
    47614881    result
     
    47634883.,.,
    47644884
    4765 module_eval(<<'.,.,', 'bnf.y.rb', 1455)
    4766   def _reduce_405(val, _values, result)
     4885module_eval(<<'.,.,', 'bnf.y.rb', 1464)
     4886  def _reduce_408(val, _values, result)
    47674887     set_in_specifier
    47684888    result
     
    47704890.,.,
    47714891
    4772 module_eval(<<'.,.,', 'bnf.y.rb', 1457)
    4773   def _reduce_406(val, _values, result)
     4892module_eval(<<'.,.,', 'bnf.y.rb', 1466)
     4893  def _reduce_409(val, _values, result)
    47744894     unset_in_specifier
    47754895    result
     
    47774897.,.,
    47784898
    4779 # reduce 407 omitted
    4780 
    4781 # reduce 408 omitted
    4782 
    4783 # reduce 409 omitted
    4784 
    47854899# reduce 410 omitted
    47864900
    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
     4907module_eval(<<'.,.,', 'bnf.y.rb', 1480)
     4908  def _reduce_414(val, _values, result)
    47894909                        TECSGEN::Cell_location.new( val[1], val[3], val[5], val[7], val[9], val[12] )
    47904910               
     
    47934913.,.,
    47944914
    4795 module_eval(<<'.,.,', 'bnf.y.rb', 1477)
    4796   def _reduce_412(val, _values, result)
     4915module_eval(<<'.,.,', 'bnf.y.rb', 1486)
     4916  def _reduce_415(val, _values, result)
    47974917                        result = val[0] << val[1]
    47984918               
     
    48014921.,.,
    48024922
    4803 module_eval(<<'.,.,', 'bnf.y.rb', 1480)
    4804   def _reduce_413(val, _values, result)
     4923module_eval(<<'.,.,', 'bnf.y.rb', 1489)
     4924  def _reduce_416(val, _values, result)
    48054925     result = []
    48064926    result
     
    48084928.,.,
    48094929
    4810 module_eval(<<'.,.,', 'bnf.y.rb', 1484)
    4811   def _reduce_414(val, _values, result)
     4930module_eval(<<'.,.,', 'bnf.y.rb', 1493)
     4931  def _reduce_417(val, _values, result)
    48124932     result = [ val[0], val[2], val[3] ]
    48134933    result
     
    48154935.,.,
    48164936
    4817 module_eval(<<'.,.,', 'bnf.y.rb', 1489)
    4818   def _reduce_415(val, _values, result)
     4937module_eval(<<'.,.,', 'bnf.y.rb', 1498)
     4938  def _reduce_418(val, _values, result)
    48194939                TECSGEN::Join_location.new( val[2], val[4], val[6], val[8], val[11] )
    48204940               
     
    48234943.,.,
    48244944
    4825 module_eval(<<'.,.,', 'bnf.y.rb', 1495)
    4826   def _reduce_416(val, _values, result)
     4945module_eval(<<'.,.,', 'bnf.y.rb', 1504)
     4946  def _reduce_419(val, _values, result)
    48274947                result = val[0] << [ val[1], val[3] ]
    48284948         
     
    48314951.,.,
    48324952
    4833 module_eval(<<'.,.,', 'bnf.y.rb', 1497)
    4834   def _reduce_417(val, _values, result)
     4953module_eval(<<'.,.,', 'bnf.y.rb', 1506)
     4954  def _reduce_420(val, _values, result)
    48354955     result = []
     4956    result
     4957  end
     4958.,.,
     4959
     4960module_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
     4967module_eval(<<'.,.,', 'bnf.y.rb', 1511)
     4968  def _reduce_422(val, _values, result)
     4969      result = val[1]
     4970    result
     4971  end
     4972.,.,
     4973
     4974module_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
     4981module_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
     4996module_eval(<<'.,.,', 'bnf.y.rb', 1516)
     4997  def _reduce_429(val, _values, result)
     4998     result=val[0].val
     4999    result
     5000  end
     5001.,.,
     5002
     5003module_eval(<<'.,.,', 'bnf.y.rb', 1516)
     5004  def _reduce_430(val, _values, result)
     5005     result=val[0].val
     5006    result
     5007  end
     5008.,.,
     5009
     5010module_eval(<<'.,.,', 'bnf.y.rb', 1517)
     5011  def _reduce_431(val, _values, result)
     5012     result = val[1] 
     5013    result
     5014  end
     5015.,.,
     5016
     5017module_eval(<<'.,.,', 'bnf.y.rb', 1518)
     5018  def _reduce_432(val, _values, result)
     5019     result = [] 
     5020    result
     5021  end
     5022.,.,
     5023
     5024module_eval(<<'.,.,', 'bnf.y.rb', 1519)
     5025  def _reduce_433(val, _values, result)
     5026     result = [ val[0] ]
     5027    result
     5028  end
     5029.,.,
     5030
     5031module_eval(<<'.,.,', 'bnf.y.rb', 1520)
     5032  def _reduce_434(val, _values, result)
     5033     val[0] << val[2]
     5034    result
     5035  end
     5036.,.,
     5037
     5038module_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
     5045module_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
     5052module_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
     5059module_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
     5066module_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
     5073module_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
     5080module_eval(<<'.,.,', 'bnf.y.rb', 1527)
     5081  def _reduce_441(val, _values, result)
     5082     result = val[0].val.to_f
    48365083    result
    48375084  end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.y.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2016 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    378378        | STRUCT
    379379                {
    380                         result = StructType.new()
     380                        # tag が無い場合、内部名を与える
     381                        result = StructType.new( :"TAG__#{@@no_struct_tag_num}__" )
     382                        @@no_struct_tag_num += 1
    381383                        StructType.set_define( true )
    382384                }
     
    709711        : component_description specified_statement
    710712        | component_description location_information
     713        | component_description tool_info
    711714        |
    712715
     
    738741        | import
    739742        | import_C
    740         | signature_plugin
     743        | generate_statement
    741744        | error   # エラー回復ポイント
    742745
     
    797800
    798801region_name_list
    799         : IDENTIFIER
    800                 {       result = [val[0].val]           }
    801         | region_name_list ',' IDENTIFIER
    802                 {       result << val[2].val            }
     802        : namespace_identifier
     803                {       result = [val[0]]               }
     804        | region_name_list ',' namespace_identifier
     805                {       result << val[2]                }
    803806
    804807const_statement
     
    832835                { Import.new( val[2], true ) }
    833836
    834 signature_plugin
     837generate_statement
    835838#        : GENERATE '(' plugin_name ',' namespace_identifier ',' STRING_LITERAL ')' ';'  #1ok signature plugin
    836839        : GENERATE '(' plugin_name ',' namespace_identifier ',' plugin_arg ')' ';'  #1ok signature plugin
     
    13011304                        result = [ val[0] ]
    13021305                }
     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                }
    13031311
    13041312composite_celltype_statement_specifier
     
    13501358        | internal_join_list specified_join
    13511359        | internal_join_list external_join
     1360        | internal_join_list reverse_join
    13521361
    13531362external_join  # cell 内に記述する呼び口の外部結合
     
    14991508
    15001509
     1510#  JSON object
     1511tool_info        : TOOL_INFO '(' JSON_string ')' JSON_object { TOOL_INFO.new( val[2].to_sym, val[4] ) }
     1512JSON_object      : '{' JSON_property_list   '}'              {  result = val[1] }
     1513JSON_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] }
     1516JSON_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
     1518JSON_array       : '[' JSON_array_list ']'                   { result = val[1]  }
     1519                 | '['  ']'                                  { result = []  }
     1520JSON_array_list  : JSON_value                                { result = [ val[0] ] }
     1521                 | JSON_array_list ',' JSON_value            { val[0] << val[2] }
     1522JSON_string      : STRING_LITERAL                            { result = val[0].val.gsub!( /\"(.*)\"/, "\\1" ) }
     1523JSON_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
    15011531end
    15021532
     
    15231553    'import_C' => :IMPORT_C,
    15241554    'generate' => :GENERATE,
     1555    '__tool_info__' => :TOOL_INFO,
    15251556
    15261557    # types
     
    16581689  # すべての構文解析が完了した
    16591690  @@b_end_all_parse = false
     1691
     1692  # tag なし struct
     1693  @@no_struct_tag_num = 0
    16601694
    16611695  def self.parse( file_name, plugin = nil, b_reuse = false )
     
    17731807                  string += line
    17741808                  # この位置では 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"
    17761810                  @@n_error += 1
    17771811                end
     
    18141848                  b_in_string = true
    18151849                  # この位置では 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"
    18171851                  @@n_error += 1
    18181852                # 山括弧で囲まれた文字列
    1819                 when /\A<[0-9A-Za-z_\. \/]+>/   # AB: angle bracke
     1853                # when /\A<[0-9A-Za-z_\. \/]+>/   # AB: angle bracke
     1854                when /\A<(?:[^>\\]|\\.)*>/   # これはうまく行くようだ
    18201855                  @q << [:AB_STRING_LITERAL, Token.new($&, file, lineno, col)]
    18211856                # 行コメント
     
    19131948  @@n_error = 0
    19141949  @@n_warning = 0
     1950  @@n_info = 0
    19151951
    19161952  # このメソッドは構文解析、意味解析からのみ呼出し可(コード生成でエラー発生は不適切)
     
    19461982      end
    19471983      if locale then
    1948         Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}"
     1984        Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: error: #{msg}"
    19491985      else
    19501986        Console.puts "error: #{msg}"
     
    19792015      end
    19802016      if locale then
    1981         Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}"
     2017        Console.puts "#{locale[0]}:#{locale[1]}:#{locale[2]}: warning: #{msg}"
    19822018      else
    19832019        Console.puts "warning: #{msg}"
     
    19862022  end
    19872023
     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
    19882057  def self.get_n_error
    19892058    @@n_error
     
    19942063  end
    19952064
     2065  def self.get_n_info
     2066    @@n_info
     2067  end
     2068
    19962069  def self.get_nest
    19972070    @@generator_nest
     2071  end
     2072
     2073  def self.parsing_C?
     2074    @@import_C
    19982075  end
    19992076
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2016 by TOPPERS Project
     6#   Copyright (C) 2008-2019 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    7979#  @b_checked_as_allocator_signature:: bool:  アロケータシグニチャとしてチェック済み
    8080#  @b_empty:: Bool: 空(関数が一つもない状態)
     81#  @descriptor_list:: nil | { Signature => ParamDecl }  最後の ParamDecl しか記憶しないことに注意
     82#  @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin は生成後に追加される
     83
     84  include PluginModule
    8185
    8286  @@nest_stack_index = -1
     
    123127    @b_empty = false
    124128    @b_checked_as_allocator_signature = false
     129    @descriptor_list = nil
     130    @generate = nil
    125131    @@current_object = self
    126132    set_specifier_list( Generator.get_statement_specifier )
     
    136142    function_head_list.get_items.each{ |f|
    137143      @func_name_to_id[ f.get_name ] = id
     144      f.set_owner self
    138145      id += 1
    139146    }
     
    142149    end
    143150
     151    # set_descriptor_list ##
     152
     153    if @generate then
     154      signature_plugin
     155    end
     156
    144157    @@current_object = nil
     158
    145159    return self
    146160  end
     
    170184      when :DEVIATE
    171185        @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" ]
    172191      else
    173192        cdl_error( "S1002 \'$1\': unknown specifier for signature" , s[0] )
     
    309328  end
    310329
    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
     358end
     359
     360  #== Signature# 引数で参照されている Descriptor 型のリストを
    312361  #RETURN:: Hash { Signature => ParamDecl }:  複数の ParamDecl から参照されている場合、最後のものしか返さない
    313362  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
    314378    desc_list = { }
    315379    # p "has_desc #{@name}"
    316380    fha = get_function_head_array                       # 呼び口または受け口のシグニチャの関数配列
    317381    if fha == nil then                                  # nil の場合、自己参照によるケースと仮定
     382      @descriptor_list = desc_list
    318383      return desc_list
    319384    end
     
    330395            # p "has_desc #{param.get_name} #{t}"
    331396            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
    333406            end
    334407          }
     
    336409      end
    337410    }
    338     return desc_list
     411    @descriptor_list = desc_list
    339412  end
    340413
    341414  #=== Signature# 引数に Descriptor があるか?
    342415  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 型である
    346420      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
    367426  end
    368427
     
    411470
    412471end
     472
     473module 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
     537end #CelltypePluginModule
    413538
    414539class Celltype < NSBDNode # < Nestable
     
    423548# @ct_factory_list::    Factory[] :    celltype factory
    424549# @cell_list:: Cell[] : 定義のみ (V1.0.0.2 以降)
     550# @ordered_cell_list:: Cell[] : ID 順に順序付けされたセルリスト、最適化以降有効 (リンク単位ごとに生成されなおす)
    425551# @singleton:: bool
    426552# @idx_is_id:: bool
    427553# @idx_is_id_act:: bool: actual value
     554# @b_need_ptab:: bool: true if having cells in multi-domain
    428555# @active:: bool
    429556# @b_reuse:: bool :  reuse 指定されて import された(template 不要)
    430557# @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin は生成後に追加される
     558# @generate_list:: [ [ Symbol, String, Plugin ], ... ]   generate 文で追加された generate
    431559#
    432560# @n_attribute_ro:: int >= 0    none specified
     
    437565# @n_var_omit:: int >= 0        # of [omit] specified vars # mikan var の omit は有?
    438566# @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
    441569# @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
    442574# @n_entry_port:: int >= 0
    443575# @n_entry_port_array:: int >= 0
     
    455587
    456588  include PluginModule
    457 
     589  include CelltypePluginModule
     590 
    458591  @@nest_stack_index = -1
    459592  @@nest_stack = []
     
    496629    @active = false
    497630    @generate = nil
     631    @generate_list = []
    498632
    499633    @n_attribute_ro = 0
     
    507641    @n_call_port_array = 0
    508642    @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
    509647    @n_entry_port = 0
    510648    @n_entry_port_array = 0
     
    528666    if $idx_is_id then
    529667      @idx_is_id = true
     668      @idx_is_id_act = true
     669      @b_need_ptab = true
    530670    else
    531671      @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
    534675
    535676    Namespace.new_celltype( self )
    536677    set_namespace_path # @NamespacePath の設定
    537678    set_specifier_list( Generator.get_statement_specifier )
    538 
    539     if @singleton then
    540       @idx_is_id_act = false
    541     end
    542679
    543680    @included_header = {}
     
    577714      celltype_plugin
    578715    end
     716
     717    # check_dynamic_join ##
    579718
    580719    @@current_object = nil
     
    592731      @n_call_port += 1
    593732      @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
    594741    else
    595742      @n_entry_port += 1
     
    753900      when :IDX_IS_ID
    754901        @idx_is_id = true
     902        @idx_is_id_act = true
     903        @b_need_ptab = true
    755904      when :ACTIVE
    756905        @active = true
     
    764913      end
    765914    }
     915    if @singleton then
     916      @idx_is_id_act = false
     917      @b_need_ptab = false
     918    end
    766919  end
    767920
     
    8631016  end
    8641017
    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
    8891135  end
    8901136
     
    8951141  # シングルトンセルが同じ linkunit に複数ないかチェック
    8961142  def new_cell( cell )
     1143    dbgPrint "Celltype#new_cell( #{cell.get_name} )\n"
    8971144    # Celltype では Cell の set_owner しない
    8981145    # シングルトンで、プロトタイプ宣言でない場合、コード生成対象リージョンの場合
     
    9051152    end
    9061153    @cell_list << cell
     1154
     1155    # プラグインにより生成されたセルタイプか ?
    9071156    if @plugin then
    9081157      @plugin.new_cell cell
    9091158    end
     1159
     1160    # セルタイププラグインの適用
     1161    celltype_plugin_new_cell cell
    9101162  end
    9111163
     
    9191171  #     呼び口(ただし、最適化で不要となるものは除く)
    9201172  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
    9241183  end
    9251184
     
    9341193  def has_CB?
    9351194    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
    9371196      # return @n_attribute_rw > 0 || @n_var > 0
    9381197    else
     
    9431202  #=== Celltype# SET_CB_INIB_POINTER, INITIALIZE_CB が必要か
    9441203  def need_CB_initializer?
    945     @n_var_init > 0 || has_CB?
     1204    @n_var_init > 0 || has_CB? || ( @n_call_port_dynamic && $ram_initializer )
    9461205  end
    9471206
     
    9981257  def is_active?
    9991258    @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
    10001267  end
    10011268
     
    11201387#                                               逆require ポートに対して複数の結合がないかチェックする
    11211388# @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin は生成後に追加される
     1389# @b_post_code_generated:: Bool: true if generated in tmp_plugin_post_code.cdl
    11221390#
    11231391# composite のためインスタンス変数
     
    11421410# @id:: Integer : コード生成直前に設定  (プロトタイプ宣言の場合は -1 のまま放置)
    11431411# @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 が参照れた
    11451415
    11461416=begin
     
    11871457  end
    11881458
    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 
    11961459  def initialize( ct_path, in_composite = false )
    11971460    super()
     
    12331496    @referenced_port_list = {}
    12341497    @restrict_list = {}
     1498    @restrict_list2 = {}
     1499    @b_restrict_referenced = false
     1500    @b_post_code_generated = false
    12351501
    12361502    @cell_list = {}
     
    12581524      cell_prev = CompositeCelltype.find( name )
    12591525      if cell_prev == nil then
    1260         CompositeCelltype.new_cell( self )
     1526        CompositeCelltype.new_cell_in_composite( self )
    12611527      end
    12621528    else
     
    14371703
    14381704    else
     1705      dbgPrint "new_join: cell=#{@name} add_item=#{join.get_name}\n"
    14391706      # join
    14401707      @join_list.add_item( join )
     
    15001767
    15011768        # 呼び口側のセルと、そのセルタイプ
    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
    15031775        if ! cell.instance_of? Cell then
    15041776          cdl_error( "S9999 '$1': not cell for reverse join", cp_cell_nsp.get_path_str )
     
    15101782        end
    15111783
    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
    15131791        ep_subscript_val = ep_subscript ? ep_subscript.eval_const( nil ) : nil
    15141792        rhs = Expression.create_cell_join_expression( ep_cell_nsp, ep_subscript_val, ep_name, rj.get_locale )
     
    15211799          ss_str = ""
    15221800        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"
    15241802      }
    15251803    end
     
    15651843      set_specifier_list( Generator.get_statement_specifier )
    15661844    end
     1845    if TECSGEN.post_coded?
     1846      @b_post_code_generated = true
     1847    end
    15671848    set_f_def f_def
    15681849
     
    15811862
    15821863    if ! @in_composite then
    1583       if @celltype.instance_of? Celltype then
     1864      # if @celltype.instance_of? Celltype then
     1865      if @celltype then  # composite でも呼びだす, エラー時 nil
    15841866        @celltype.new_cell self
    15851867      end
     
    17021984  end
    17031985
    1704   #=== Cell# セルタイププラグイン (generate 指定子)
     1986  #=== Cell# セルプラグイン (generate 指定子)
    17051987  def cell_plugin
    1706 
    1707     load_plugin( @generate[0], CellPlugin )
    1708 
    17091988    plugin_name = @generate[0]
    17101989    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 # 従来と仕様が変わるので、継続する
    17132000    if $verbose then
    1714       print "new cell : #{eval_str}\n"
     2001      print "new cell plugin: plugin_object = #{plClass.class.name}.new( #{@name}, #{option} )\n"
    17152002    end
    17162003
    17172004    begin
    1718       eval( eval_str )     # plugin を生成
     2005      plugin_object = plClass.new( self, option )
    17192006      plugin_object.set_locale @locale
    1720       @generate[ 2 ] = plugin_object
    17212007      generate_and_parse plugin_object
    17222008    rescue Exception => evar
    17232009      cdl_error( "S1166 $1: fail to new", plugin_name )
    1724       print "eval( #{eval_str} )\n"
    1725 
    17262010      print_exception( evar )
    17272011    end
     2012    return  plugin_object
    17282013  end
    17292014
     
    17422027
    17432028    # 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"
    17452031
    17462032    @my_clone = self.clone
    1747     @@cloned_cell_list[ self ] = @my_clone
    17482033
    17492034    # clone したセルの内部に持つ名前情報を調整する
    1750 
    17512035    @my_clone.set_cloned( name, global_name, namespacePath, join_array, ct_name, region, plugin, locale )
    17522036
     
    17722056    # debug
    17732057    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"
    17752059    @global_name = :"#{global_name}_#{@name}"
    17762060    @name = :"#{name}_#{@name}"
     
    17962080    @alloc_list = []
    17972081    @require_joined_list = {}
    1798     @entry_array_max_subscript = {}
     2082    @entry_array_max_subscript = @entry_array_max_subscript.dup
    17992083    @cell_list = {}
    18002084    @cell_list2 = []
     
    18052089      @join_list.change_item j
    18062090    }
     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
    18072099
    18082100    # clone しようとするセルが composit セルタイプ?
     
    18112103      @cell_list, @cell_list2 = @celltype.expand( @name, @global_name, @NamespacePath, @join_list, @region, @plugin, @locale )
    18122104    end
    1813 
    18142105  end
    18152106
    18162107  #=== Cell# clone された cell の join_list の右辺の変更
    18172108  #  呼び口の右辺の cell を他の clone された cell に置換え
    1818   def change_rhs_port
     2109  def change_rhs_port cloned_cell_list
    18192110
    18202111    # debug
    1821     dbgPrint "Cell change_rhs_port: global_name: #{@global_name}\n"
     2112    dbgPrint "=====   Cell#change_rhs_port: name=#{@name}   =====\n"
    18222113
    18232114    @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    }
    18342117  end
    18352118
     
    18912174  def is_in_composite?
    18922175    @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
    18932190  end
    18942191
     
    19802277
    19812278      # セルタイプ内で port_name の CompositeCelltypeJoin を探す(コード生成段階では必ず見つかる)
     2279      # print "get_real_cell: cell=#{@name} port=#{port_name}\n"
     2280      # pp @cell_list
    19822281      cj = @celltype.find_export( port_name )
    19832282
     
    19912290  end
    19922291
     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
    19932301
    19942302  #=== Cell# 受け口のport の参照カウントをアップする
     
    20332341  end
    20342342
     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
    20352355  def get_celltype
    20362356    @celltype
     
    20752395  #=== Cell# composite の内側セルの受け口配列の添数の最大値を設定
    20762396  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 展開前
    20792399    end
    20802400
    20812401    # composite の内側のセルに伝播
    20822402    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
    20832406      cj = @celltype.find_export port.get_name
    20842407      if cj && @cell_list[ cj.get_cell_name.to_s ] then
     
    22782601        else
    22792602          cell = j.get_rhs_cell2
    2280           next if cell == nil     # 右辺が見つからなかった.既にエラー
     2603          next if cell == nil || cell.get_celltype == nil     # 右辺が見つからなかった.既にエラー
    22812604          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
    22822611          dbgPrint( "set_port_reference_count: #{@name}.#{j.get_name} => #{cell.get_name}.#{port.get_name}\n")
    22832612          cell.port_referenced port
     
    26723001          }
    26733002        else
     3003          dbgPrint "set_definition_join: #{@name}.#{join.get_name} celltype=#{@celltype.get_name}\n"
    26743004          join.set_definition( @celltype.find(join.get_name) )
    26753005        end
     
    26873017      expand
    26883018    end
    2689 
    2690     # celltype に generate が指定されされているか
    2691     celltype_plugin = @celltype.get_celltype_plugin
    2692     if celltype_plugin then
    2693       begin
    2694         celltype_plugin.new_cell self
    2695       rescue Exception => evar
    2696         cdl_error( "S1037 $1: celltype plugin fail to new_cell" , celltype_plugin.class.name )
    2697         print_exception( evar )
    2698       end
    2699     end
    27003019  end
    27013020
     
    27053024
    27063025    #debug
    2707     dbgPrint "expanding #{@name} #{@celltype.get_name}\n"
    2708 
    2709     # 展開されたセルのリスト
    2710     @@cloned_cell_list = {}
     3026    dbgPrint "=====    expanding   #{@name}     =====\n"
    27113027
    27123028    # composite celltype の cell を展開
     
    27183034      set_f_ref
    27193035    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"
    27233045
    27243046    # プロトタイプ宣言で設定されていたものを反映する
    27253047    @entry_array_max_subscript.each{ |port,name|
     3048      dbgPrint "set_entry_inner_port_max_subscript( #{port}, #{name} )\n"
    27263049      set_entry_inner_port_max_subscript( port, name )
    27273050    }
     
    27303053  #=== Cell#restrict を追加
    27313054  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
    27393125          end
    27403126        }
    27413127      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
    27813156      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
    28003162  def show_tree( indent )
    28013163    indent.times { print "  " }
     
    28573219# @name:: str
    28583220# @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
    28603223# @export_name_list:: NamedList : CompositeCelltypeJoin
    28613224# @port_list:: CompositeCelltypeJoin[]
     
    28673230# @name_list:: NamedList item: Decl (attribute), Port エクスポート定義
    28683231# @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
    28693234
    28703235  @@nest_stack_index = -1
    28713236  @@nest_stack = []
    28723237  @@current_object = nil
     3238
     3239  include CelltypePluginModule
     3240  include PluginModule
    28733241
    28743242  def self.push
     
    28893257    super()
    28903258    @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 = []
    28923261    @export_name_list = NamedList.new( nil, "export in composite celltype #{name}" )
    28933262    @name_list = NamedList.new( nil, "in composite celltype #{name}" )
     
    29103279    @attr_list = []
    29113280    @internal_allocator_list = []
     3281    @generate_list = []
    29123282    set_specifier_list( Generator.get_statement_specifier )
    29133283  end
     
    29203290  # CompositeCelltype#end_of_parse
    29213291  def end_of_parse
    2922 
    29233292    # singleton に関するチェック
    29243293    if @b_singleton && @real_singleton == nil then
     
    29603329    # mikan relay が正しく抜けているかチェックされていない
    29613330
     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
    29623339    # 意味解析
    2963     @cell_list.get_items.each{ |c|
     3340    @cell_list_in_composite.get_items.each{ |c|
    29643341      c.set_definition_join
    29653342    }
    29663343
    29673344    # cell の未結合の呼び口がないかチェック
    2968     @cell_list.get_items.each{ |c|
     3345    @cell_list_in_composite.get_items.each{ |c|
    29693346      c.check_join
    29703347      c.check_reverse_require
     
    30043381      }
    30053382    }
    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 )
    30153397    cell.set_owner self  # Cell (in_omposite)
    3016     @cell_list.add_item( cell )
     3398    @cell_list_in_composite.add_item( cell )
    30173399    if cell.get_celltype then    # nil ならば、すでにセルタイプなしエラー
    30183400      if cell.get_celltype.is_singleton? then
     
    30313413                                         internal_cell_elem_name, type )
    30323414   
     3415  end
     3416
     3417 ### CompositeCelltype#new_cell
     3418  def new_cell cell
     3419    @cell_list << cell
     3420
     3421    # セルタイププラグインの適用
     3422    celltype_plugin_new_cell cell
    30333423  end
    30343424
     
    30503440    dbgPrint "new_join: #{export_name} #{internal_cell_name} #{internal_cell_elem_name}\n"
    30513441
    3052     cell = @cell_list.get_item( internal_cell_name )
     3442    cell = @cell_list_in_composite.get_item( internal_cell_name )
    30533443    if cell == nil then
    30543444      cdl_error( "S1057 $1 not found in $2" , internal_cell_name, @name )
     
    31073497        elsif obj.is_omit? != obj2.is_omit? then
    31083498          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 )
    31093503        end
    31103504      else
     
    32923686  def find name
    32933687    dbgPrint "CompositeCelltype: find in composite: #{name}\n"
    3294     cell = @cell_list.get_item( name )
     3688    cell = @cell_list_in_composite.get_item( name )
    32953689    return cell if cell
    32963690
     
    33333727    clone_cell_list = {}
    33343728    clone_cell_list2 = []
     3729    clone_cell_list3 = {}
    33353730
    33363731    #  composite 内部のすべての cell について
    3337     @cell_list.get_items.each { |c|
     3732    @cell_list_in_composite.get_items.each { |c|
    33383733
    33393734      # debug
     
    33593754          # debug
    33603755          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"
    33623757          else
    33633758            dbgPrint "expand : parent cell: #{name} child cell: #{c.get_name}:  parent's export port: #{cj.get_name}  join: nil\n"
     
    33943789      clone_cell_list[ "#{c.get_local_name}" ] = c2
    33953790      clone_cell_list2 << c2
     3791      clone_cell_list3[ c ] = c2
    33963792
    33973793    }
     
    34033799        j.set_cloned( clone_cell_list[ "#{c.get_local_name}" ] )
    34043800      }
     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
    34053806    }
    34063807    return [ clone_cell_list, clone_cell_list2 ]
     
    34193820      when :ACTIVE
    34203821        @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" ]
    34213827      else
    34223828        cdl_error( "S1071 $1 cannot be specified for composite" , s[0] )
     
    34293835  end
    34303836
     3837  def get_global_name
     3838    @global_name
     3839  end
     3840
    34313841  def get_port_list
    34323842    @port_list
     
    34433853  def get_internal_allocator_list
    34443854    @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
    34453867  end
    34463868
     
    34653887  def is_inactive?
    34663888    if @b_active == false then
    3467       @cell_list.get_items.each{ |c|
     3889      @cell_list_in_composite.get_items.each{ |c|
    34683890        if c.get_celltype && c.get_celltype.is_inactive? == false then
    34693891          # c.get_celltype == nil の場合はセルタイプ未定義ですでにエラー
     
    34863908    (indent+1).times { print "  " }
    34873909    puts "active: #{@b_active}, singleton: #{@b_singleton}"
    3488     @cell_list.show_tree( indent + 1 )
     3910    @cell_list_in_composite.show_tree( indent + 1 )
    34893911    (indent+1).times { print "  " }
    34903912    puts "name_list"
     
    35323954# @b_omit:: bool : omit 指定子が指定された (call port のみ)
    35333955# @b_optional:: bool : call port のみ
    3534 # @b_ref_des:: bool :  ref_desc キーワードが指定された
     3956# @b_ref_desc:: bool :  ref_desc キーワードが指定された
    35353957# @b_dynamic:: bool :  dynamic キーワードが指定された (呼び口のみ)
    35363958#
     
    36384060    @b_inline = false
    36394061    @b_optional = false
     4062    @b_omit = false
    36404063    @b_ref_desc = false
    36414064    @b_dynamic = false
     
    36554078    else
    36564079      # entry port optimize
    3657       if $unopt then
     4080      if $unopt || $unopt_entry then
    36584081        # 最適化なし
    36594082        @b_VMT_useless = false                     # VMT 不要 (true の時 VMT を介することなく呼出す)
     
    37864209        @b_optional = true
    37874210      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
    37884215        @b_ref_desc = true
    37894216      when :DYNAMIC
     
    38064233      end
    38074234    }
     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
    38084252  end
    38094253
     
    39584402
    39594403  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
    39614411  end
    39624412
    39634413  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
    39654421  end
    39664422
     
    40784534  def is_reverse_required?
    40794535    @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
    40804546  end
    40814547
     
    44894955      if ! c.get_f_def then   # Namespace の @cell_list にはプロトタイプが含まれるケースあり
    44904956        if c.get_f_ref then
    4491           cdl_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 )
    44924958        elsif $verbose then
    4493           cdl_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 )
    44944960        end
    44954961      else
     
    44984964        # if c.get_f_ref == false && c.is_generate? && ct && ct.is_inactive? then
    44994965        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 )
    45014970        end
    45024971      end
     
    46575126  end
    46585127
     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
    46595140  #=== Namespace# セルの結合をチェックする
    46605141  def check_join
     
    46815162  end
    46825163
     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 
    46835176  def show_tree( indent )
    46845177    indent.times { print "  " }
     
    49045397
    49055398    if object == nil then                                             # (2)
    4906       cdl_error( "S1109 \'$1\' not found" , @cell_name )
     5399      cdl_error( "S1109 \'$1\' not found" , nsp.to_s )
    49075400    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 )
    49095402    else
    49105403      dbgPrint "set_definition: set_f_ref #{@owner.get_name}.#{@name} => #{object.get_name}\n"
     
    52775770          next_cell_nsp       = @through_generated_list[ i + 1 ].get_cell_namespace_path
    52785771          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
    52795773        rescue Exception => evar
    52805774          cdl_error( "S1124 $1: plugin function failed: \'get_through_entry_port_name\'" , plugin_name )
     
    52955789        next_cell      = @cell
    52965790        next_port_name = @port_name
     5791        next_port_subscript = @rhs_subscript
    52975792
    52985793        if next_cell == nil then
     
    53065801        # region から @cell_name.@port_name への through がないか探す
    53075802        # 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 )
    53095804           # @through_list[i] と @region_through_list[i-cp_len] は同じ
    53105805        # 共用しないようにするには、見つからなかったことにすればよい
     
    53175812
    53185813      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 )
    53215817        end
    53225818      else
     
    53315827          # 生成したものを region(@through_list[i][3]) のリストに追加
    53325828          # @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] )
    53345830        end
    53355831      end
     
    53655861
    53665862  #=== 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 )
    53685864
    53695865    through = @through_list[ i ]
     
    53895885    end
    53905886    @@plugin_creating_join = self
    5391 
    53925887    caller_cell = @owner
    53935888
    5394     plugin_object = nil
    5395     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 then
    5397       print "new through: #{eval_str}\n"
    5398     end
    5399 
    54005889    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 )
    54025893      plugin_object.set_locale @locale
    54035894    rescue Exception => evar
     
    54065897        print "signature: #{@definition.get_signature.get_name} from: #{caller_cell.get_name} to: #{next_cell.get_name} of celltype: #{@celltype.get_name}\n"
    54075898      end
    5408       print "eval( #{eval_str} )\n"
    5409 
    54105899      print_exception( evar )
    54115900      return
     
    55966085  end
    55976086
    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
    55996095    @rhs_subscript
    56006096  end
     
    56066102    # through 指定あり?
    56076103    if @through_list[0] then
    5608       # mikan through で生成したものが root namespace 限定
    56096104      # through で生成されたセルを探す
    5610 #      cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
    56116105      cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
    56126106      # cell のプラグインで生成されたポート名のポートを探す (composite なら内部の繋がるポート)
     
    56156109      # ポートを返す(composite なら内部の繋がるポートを返す)
    56166110      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
    56176123    end
    56186124  end
     
    57186224  # composite cell を展開したセルの結合を clone したセルの名前に変更
    57196225  def change_rhs_port( clone_cell_list, celltype )
     6226    dbgPrint "change_rhs_port: name=#{@name}\n"
    57206227
    57216228    # debug
    57226229    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"
    57246234
    57256235      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"
    57276238      }
     6239      print "============\n"
    57286240    end
    57296241
     
    57326244
    57336245    # 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"
    57356247
    57366248    # @rhs の内容を調整しておく(この内容は、subscript を除いて、後から使われていない)
     
    57566268
    57576269      # debug
    5758       # p "array_member2.len : #{@array_member.length}"
     6270      dbgPrint "array_member2.len : #{@array_member.length}\n"
    57596271
    57606272      i = 0
     
    57646276        # 無駄に設定されているものについては、再帰的に呼び出す必要はない(clone_for_composite では対策している)
    57656277        if @array_member2[i] != self && @array_member[i] != nil then
     6278          dbgPrint "change_rhs array_member #{i}: #{@name}  #{@cell_name}\n"
    57666279          @array_member2[i].change_rhs_port( clone_cell_list, celltype )
    57676280        end
     
    57796292  # @through_list などもコピーされるので、これが呼び出される前に確定する必要がある
    57806293  def clone_for_composite( ct_name, cell_name, locale, b_need_recursive = true )
    5781 
    57826294    # debug
    5783     dbgPrint "join.clone_for_composite : #{@name} #{@cell_name} #{self}\n"
     6295    dbgPrint "=====  clone_for_composite: #{@name} #{@cell_name} #{self}   =====\n"
    57846296    cl = self.clone
    57856297
    57866298    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 )
    57886300    end
    57896301
     
    57966308  end
    57976309
    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 )
    57996311    # 配列のコピーを作る
    5800     am  = array_member.clone
    5801     am2 = array_member2.clone
     6312    am  = @array_member.clone
     6313    am2 = @array_member2.clone
    58026314
    58036315    # 配列要素のコピーを作る
    58046316    i = 0
    58056317    while i < am2.length
    5806       if array_member2[i] == prev then
     6318      if @array_member2[i] == prev then
    58076319        # 自分自身である(ので、呼出すと無限再帰呼出しとなる)
    58086320        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
    58116326      else
    58126327        # 以前のエラーで array_member2[i] は nil になっている
     
    58146329
    58156330      # 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"
    58176332
    58186333      i += 1
     
    58406355    dbgPrint "Join#set_cloned: #{@name}  prev owner: #{@owner.get_name} new owner: #{owner.get_name}\n"
    58416356    @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
    58426363  end
    58436364
     
    59056426        if j then
    59066427          (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}"
    59086429          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}"
    59136436        else
    59146437          (indent+2).times { print "  " }
     
    62356758end
    62366759
    6237 #== Domain
     6760#== DomainType
    62386761#
    62396762# region の domain を記憶するクラス
     
    62566779    @name = name
    62576780    @plugin_name = (name.to_s + "Plugin").to_sym
    6258     load_plugin( @plugin_name, DomainPlugin )
     6781    plClass = load_plugin( @plugin_name, DomainPlugin )
    62596782    @region = region
    62606783    @option = option
     
    62726795    if ! @plugin then
    62736796      pluginClass = Object.const_get @plugin_name
     6797      return if pluginClass == nil
    62746798      @plugin = pluginClass.new( @region, @name, @option )
     6799      @plugin.set_locale @locale
    62756800    end
    62766801  end
     
    62906815  end
    62916816
    6292   #== Domain リージョンの Hash を得る
     6817  #== DomainType リージョンの Hash を得る
    62936818  # @@domain_regions の説明参照
    62946819  def self.get_domain_regions
     
    63026827  def get_option
    63036828    @option
     6829  end
     6830
     6831  #== DomainType#ドメイン種別を得る
     6832  #return::Symbol :kernel, :user, :OutOfDomain
     6833  def get_kind
     6834    @plugin.get_kind
    63046835  end
    63056836
     
    63636894
    63646895    if @@domain_name then
     6896      dbgPrint "Region=#{name} domain_type=#{@@domain_name} option=#{@@domain_option}\n"
    63656897      domain_option = CDLString.remove_dquote @@domain_option.to_s
    63666898      @domain_type = DomainType.new( self, @@domain_name, domain_option )
     
    64016933
    64026934        # 再出現時に 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
    64046937          cdl_error( "S1140 $1: region specifier must place at first appearence" , name )
    64056938        end
     
    66107143  end
    66117144
     7145  #== Region# ルートリージョン
     7146  # ルートリージョンは、namespace のルートと同じインスタンス
     7147  def selfget_root
     7148    Namespace.get_root
     7149  end
     7150
    66127151  def next_in_through_count
    66137152    @in_through_count += 1
     
    66437182  #=== Region# through プラグインで、この region から cell_name.port_name へのプラグインオブジェクトを登録
    66447183  # 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}" ]
    66517196  end
    66527197
     
    67797324end
    67807325
     7326#== Importable class
     7327# this module is included by Import_C and Import
     7328module 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
     7392end
     7393
    67817394class Import_C < Node
    67827395
     
    67857398  @@header_list2 = []
    67867399  @@define_list = {}
     7400
     7401  include Importable
    67877402
    67887403  #=== Import_C# import_C の生成(ヘッダファイルを取込む)
     
    68237438    }
    68247439
     7440    header_path = find_file header
     7441
     7442=begin
    68257443    include_opt = ""
    68267444    found = false
     
    68447462
    68457463    if found == false then
     7464=end
     7465    if header_path == nil then
    68467466      cdl_error( "S1142 $1 not found in search path" , header )
    68477467      return
    68487468    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    }
    68497479
    68507480    # 読込み済み?
     
    68627492    @@header_list2 << header
    68637493    @@define_list[ header ] = define
     7494
     7495    if $verbose then
     7496      print "import_C header=#{header_path}, define=#{define}\n"
     7497    end
    68647498
    68657499    begin
     
    69407574 * --no-gcc-extension-support for tecsgen.
    69417575 */
     7576#ifdef __GNUC__
     7577
    69427578#ifndef __attribute__
    69437579#define __attribute__(x)
     
    69567592#endif
    69577593
     7594#ifndef restrict
     7595#define restrict
     7596#endif
     7597
     7598#endif /* ifdef __GNUC__ */
    69587599#endif /* TECS_NO_GCC_EXTENSION_SUPPORT */
    69597600EOT
     
    69837624# @cdl_path:: string:   CDL のパス
    69847625# @b_imported:: bool:   import された(コマンドライン指定されていない)
     7626
     7627  include Importable
    69857628
    69867629  # ヘッダの名前文字列のリスト  添字:expand したパス、値:Import
     
    70237666    @b_reuse_real = @b_reuse || Generator.is_reuse?
    70247667
    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
    70467674        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
    70557678
    70567679    if found == false then
     
    71187741end
    71197742
    7120 #== generate: signature プラグインのロードと実行
     7743#== generate: signature, celltype, cell へのプラグインのロードと適用
    71217744class Generate < Node
    71227745#@plugin_name:: Symbol
    7123 #@signature_nsp:: NamespacePath
     7746#@object_nsp:: NamespacePath
    71247747#@option::         String '"', '"' で囲まれている
     7748#@plugin_object:: Plugin
    71257749
    71267750  include PluginModule
    71277751
    7128   def initialize( plugin_name, signature_nsp, option )
     7752  def initialize( plugin_name, object_nsp, option )
    71297753    super()
    71307754    @plugin_name = plugin_name
    7131     @signature_nsp = signature_nsp
     7755    @object_nsp = object_nsp
    71327756    option = option.to_s    # option は Token
    71337757    @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 )
    71387772      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
    71627776  end
    71637777end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/ctypes.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    118118      end
    119119      return self
    120     else
     120    elsif self.instance_of?( CFloatType ) then
    121121      # mikan long double
    122122      #   TECS には long double を表現する手段がない (double80_t を定義すればよいか?)
    123123#      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"
    126129    end
    127130  end
     
    183186  end
    184187
     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
    185195end
    186196
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/expression.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    151151    when :IDENTIFIER
    152152      nsp = elements[1]
     153      # if nsp.is_name_only? && name_list && name_list.get_item( nsp.get_name ) then
    153154      if nsp.is_name_only? && name_list && name_list.get_item( nsp.get_name ) then
    154155        return "#{pre}#{nsp.get_name}#{post}"
     
    229230  end
    230231
     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
    231339  # 定数式(elements)を評価する
    232340  #
     
    382490      return nil
    383491    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
    385497      return nil
    386498    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
    388504      return nil
    389505    when :OP_U_AMP
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/generate.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2016 by TOPPERS Project
     6#   Copyright (C) 2008-2019 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    122122
    123123class Namespace
     124  @@domain_gen_factory_list = nil
    124125  def generate
    125126
     
    135136          return
    136137        end
     138        if instance_of? Region then
     139          @@domain_gen_factory_list = {}   # create hash
     140        end
    137141      end
    138142
     
    141145      gen_global_header
    142146
     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     
    143156      # signature のコードを生成
    144157      @signature_list.each { |s|
     
    262275
    263276      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" )
    265279      endif_macro_only f
    266280    end
     
    454468      }
    455469    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"
    457471    if $generating_region == @@root_namespace then
    458472      f.print " rm -rf $(GEN_DIR)\n"
     
    464478      f.print "tecs : $(PRE_TECSGEN_TARGET) $(TIMESTAMP) $(POST_TECSGEN_TARGET)\n\n"
    465479      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"
    467481      # f.print "       touch $(TIMESTAMP)\n\n"
    468 
    469482    else
    470483      f.print "tecs:\n"
     
    472485    end
    473486
     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
    474527    f.print "# generic target for objs\n"
    475528    f.print "$(_TECS_OBJ_DIR)%.o : %.#{$c_suffix}\n"
     
    491544    ### Makefile.tecsgen の生成
    492545    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
     587EOT
    493588
    494589    f.print( "TECS_IMPORT_CDLS =" )
     
    545640    DomainType.get_domain_regions.each{ |dt, regions|
    546641      # domain_type は一つのノードには、一つしかないので、このループは、必ず一回しか回らない
     642        ###   mikan 複数のノードがあり、異なる domain_type が指定される可能性はある
    547643      domain_regions = regions
    548644      domain_type = dt
     
    587683      f.print( "\n\n" )
    588684
    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" )
    590719      f.print( "TECSGEN_COBJS = \\\n" )
    591720      domain_regions.each{ |r|
     
    621750
    622751    ###
    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" )
    624753    domain_regions.each{ |r|
    625754      nsp = decideDomainNameProc.call( r )
     
    655784
    656785    f.print( "# PLUGIN_SRCS: sources automatically generated by plugin\n" )
     786    f.print( "PLUGIN_CELLTYPE_SRCS = \\\n" )
    657787    domain_regions.each{ |r|
    658788      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" )
    665814    f.close
    666815
     
    762911  end
    763912
     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
    764950end
    765951
     
    8541040      f.printf TECSMsg.get(:SDI_comment), "#_SDI_#"
    8551041      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
     1046typedef struct { struct tag_#{dt.get_global_name}_VDES *vdes; } Descriptor( #{dt.get_global_name} );
     1047#endif
     1048EOT
     1049#        f.print "#include \"#{dt.get_global_name}_tecsgen.#{$h_suffix}\"\n"
    8571050      }
    8581051      f.print "\n"
     
    9041097    end
    9051098
    906     f.print "};\n"
    907     f.printf "\n"
     1099    f.print "};\n\n"
    9081100    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
     1104typedef struct { struct tag_#{@global_name}_VDES *vdes; } Descriptor( #{@global_name} );
     1105#endif
     1106EOT
    9101107  end
    9111108
     
    9931190    gen_ph_get_cellcb f
    9941191    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"
    9961197#    gen_ph_abstract_ep_des_type f
    9971198
     
    10081209#    gen_ph_ep_fun_prototype f
    10091210    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
    10101221    end_extern_C f
    10111222    endif_macro_only f
     
    10191230    gen_ph_attr_access_abbrev f   if @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0
    10201231    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
    10211234    gen_ph_test_optional_call_port_abbrev f
    10221235    gen_ph_ep_fun_macro f         if @n_entry_port > 0
     
    10841297          end
    10851298        }
     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
    10861308      }
    10871309      @port.each { |p|
     
    11961418  def gen_ph_info f
    11971419
     1420    yn_multi_domain = "no"
     1421    yn_multi_domain = "yes" if multi_domain?
    11981422    yn_idx_is_id = "no"
    11991423    yn_idx_is_id = "yes"  if @idx_is_id
     
    12041428    yn_rom       = "no"
    12051429    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?
    12061434    yn_cb_init   = "no"
    12071435    yn_cb_init   = "yes"  if need_CB_initializer?
     
    12121440 * celltype          :  #{@name}
    12131441 * global name       :  #{@global_name}
     1442 * multi-domain      :  #{yn_multi_domain}
    12141443 * idx_is_id(actual) :  #{yn_idx_is_id}(#{yn_idx_is_id_act})
    12151444 * 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}
    12181447 * rom               :  #{yn_rom}
    12191448 * CB initializer    :  #{yn_cb_init}
     
    14381667      end
    14391668
    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" )
    14451680
    14461681      if p.is_omit? then
     
    14521687      # mikan  全部つながっているかどうかで (1) を判定する
    14531688      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
    14541699        # 標準コード
    14551700        if p.get_array_size == nil then
    14561701          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" )
    14581703          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" )
    14601705          end
    14611706        else
    14621707          # 配列の場合
    14631708          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" )
    14661711          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" )
    14691714          end
    14701715        end
     
    15031748      end
    15041749
     1750      if @singleton then
     1751        param = ""
     1752        delim = ""
     1753      else
     1754        param = "p_cellcb"
     1755        delim = ","
     1756      end
     1757
    15051758      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" )
    15111765    }
    15121766  end
     
    15191773      f.print( "#define #{@global_name}_GET_CELLCB(idx) ((void *)0)\n" )
    15201774    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" )
    15221776    else
    15231777      f.print( "#define #{@global_name}_GET_CELLCB(idx) (idx)\n" )
     
    17231977  end
    17241978
    1725   def gen_ph_cp_fun_macro f
    1726     if @n_call_port >0 then
     1979  def gen_ph_cp_fun_macro f, b_flow
     1980    if @n_call_port >0 && b_flow == false then
    17271981      f.printf( TECSMsg.get( :CPM_comment ) , "#_CPM_#" )
    1728     end
    1729 
    1730     if @singleton then
    1731       if has_INIB? then
    1732         inib = "INIB"
    1733       else
    1734         inib = "CB"
    1735       end
    1736     else
    1737       if has_CB? && has_INIB? then
    1738         inib = "->_inib"
    1739       else
    1740         inib = ""
    1741       end
    17421982    end
    17431983
     
    17471987
    17481988      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
    17492011        f.print( "#define #{@global_name}_#{p.get_name}_#{fun.get_name}(" )
    17502012        ft = fun.get_declarator.get_type
     
    17722034
    17732035        # 関数名の出力(標準:受け口ディスクリプタから 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
    17752039          # 標準コード
    17762040          if @singleton then
     
    18072071
    18082072        # 受け口情報の出力(標準:受け口ディスクリプタ、最適化: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
    18102075          # 標準コード
    18112076          if @singleton then
     
    18572122  end
    18582123
     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} */
     2166Inline 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
     2175EOT
     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} */
     2223Inline 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
     2230EOT
     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} */
     2240Inline void
     2241#{@global_name}_#{p.get_name}_unjoin( #{p_that2}#{delim}#{array3} )
     2242{
     2243#{p_cellcb}    #{cb}#{p.get_name}#{array2} = NULL;
     2244}
     2245
     2246EOT
     2247      end
     2248    }
     2249  end
     2250
    18592251  #=== send/receive で受け取ったメモリ領域を dealloc するマクロコード
    18602252  #f:: File
     
    19582350
    19592351        if p.is_omit? then
    1960           f.print( "                      #{dummy_p_cell_access_pre}omitted #{p.get_name}_#{fun.get_name}(" )
    1961         else
    1962           f.print( "                      #{dummy_p_cell_access_pre}#{@global_name}_#{p.get_name}_#{fun.get_name}(" )
     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}(" )
    19632355        end
    19642356        ft = fun.get_declarator.get_type
     
    19812373        f.print( " )#{dummy_p_cell_access_post}\n" )
    19822374      }
     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}" )
    19832445    }
    19842446    f.print( "\n" )
     
    21492611        f.print( "typedef const struct tag_#{@global_name}_INIB {\n" )
    21502612
    2151         gen_cell_cb_type_port f
     2613        gen_cell_cb_type_port( f, :INIB )
    21522614        gen_cell_cb_type_attribute( f, :INIB )
    21532615
     
    21622624          f.print "    #{@global_name}_INIB  *_inib;\n"
    21632625        end
     2626        gen_cell_cb_type_port( f, :CB_DYNAMIC )
    21642627        gen_cell_cb_type_attribute( f, :CB )
    21652628        gen_cell_cb_type_var f
     
    21802643      f.print( "typedef struct tag_#{@global_name}_CB {\n" )
    21812644
    2182       gen_cell_cb_type_port f
     2645      gen_cell_cb_type_port( f, :CB )
    21832646      gen_cell_cb_type_attribute( f, :CB )
    21842647      gen_cell_cb_type_var f
     
    22482711  end
    22492712
    2250   def gen_cell_cb_type_port f
    2251     gen_cell_cb_type_call_port f
    2252     gen_cell_cb_type_entry_port f
    2253   end
    2254 
    2255   def gen_cell_cb_type_call_port f
     2713  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 )
    22562719    # 呼び口
    22572720    if @n_call_port >0 then
    2258       f.print "    /* call port #_TCP_# */ \n"
     2721      f.print "    /* call port #_TCP_# */\n"
    22592722    end
    22602723
     
    22622725      next if p.get_port_type != :CALL
    22632726      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 ? '*' : ''
    22662732
    22672733      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
    22682743        if ! p.is_skelton_useless? then
    22692744          # 標準形
    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" )
    22712750          if p.get_array_size == "[]" then
    22722751            f.print( "    int_t n_#{p.get_name};\n" )
     
    22952774
    22962775  #=== Celltype#受け口配列添数を記憶する変数の定義
    2297   def gen_cell_cb_type_entry_port f
     2776  def gen_cell_cb_type_entry_port( f, inib_cb )
    22982777    # 呼び口
    22992778    if @n_entry_port >0 then
     
    23182797        f.print "extern  #{@global_name}_INIB  #{@global_name}_SINGLE_CELL_INIB;\n"
    23192798      end
    2320 
    2321 #     @ordered_cell_list.each{ |c|
    2322 #        f.print "extern  #{@global_name}_CB  #{@global_name}_#{c.get_name}_CB;\n"
    2323 #      }
    2324 
    23252799      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
    23282819    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
    23302826    end
    23312827  end
    23322828
    23332829  def gen_ph_INIB_as_CB f
    2334 
     2830    # ここは、手抜きである。本来なら INIB を出力すべき
    23352831    if ! has_CB? && has_INIB? then
    23362832      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
    23392840      f.print "#define #{@global_name}_CB               #{@global_name}_INIB\n"
    23402841      f.print "#define tag_#{@global_name}_CB           tag_#{@global_name}_INIB\n"
     
    23602861      f.printf( TECSMsg.get( :FEC_comment ), "#_FEC_#" )
    23612862
    2362       if @idx_is_id_act then
     2863      if @b_need_ptab then
    23632864        amp = ''
     2865        tab = 'ptab'
    23642866      else
    23652867        amp = '&'
     2868        tab = 'tab'
    23662869      end
    23672870      f.print <<EOT
    23682871#define FOREACH_CELL(i,p_cb)   \\
    23692872    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];
    23712874
    23722875#define END_FOREACH_CELL   }
     
    24182921
    24192922    if @n_cell_gen > 0 && need_CB_initializer? then
     2923      b_var_init = false
    24202924      f.print "#define INITIALIZE_CB#{arg}"
    24212925      @var.each { |v|
     
    24232927        next if init == nil
    24242928
     2929        b_var_init = true
    24252930        type = v.get_type.get_original_type
    24262931        f.print "\\\n"
     
    24382943#            post = ""
    24392944          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));"
    24412947        elsif init.instance_of? C_EXP then
    24422948          f.print "\t#{that}#{v.get_name} = #{init.get_c_exp_string};"
     
    24512957        end
    24522958      }
     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
    24533000      f.print "\n"
    24543001
     
    24573004        if @singleton then
    24583005          f.print "\t#{that}_inib = &#{@global_name}_SINGLE_CELL_INIB;\n\n"
    2459         elsif @idx_is_id_act
    2460           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"
    24613008        else
    24623009          f.print "\t#{that}_inib = &#{@global_name}_INIB_tab[(i)];\n\n"
     
    26973244              j = am[i]
    26983245              if j then
    2699                 if am[i].get_cell.get_celltype == self then
     3246                if am[i].get_rhs_cell.get_celltype == self then
    27003247                  # 同じセルタイプへ結合している場合(VDES では type conflict になる)
    27013248                  p = am[i].get_rhs_port
     
    27263273            end
    27273274          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
    27293277              # 同じセルタイプへ結合している場合(VDES では type conflict になる)
    27303278              p = j.get_rhs_port
     
    27653313
    27663314        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
    27703326          # port = definition    # definition は composite の Port が得られることがある
    2771           port = find j.get_name # celltype の Port (こちらに最適化情報がある)
     3327          # port = find j.get_name # celltype の Port (こちらに最適化情報がある)
    27723328          next if port.is_cell_unique?
    27733329          next if port.is_omit?
    27743330
    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
    27773348            # 左辺は配列
     3349            const = ( port.is_dynamic? && ! $ram_initializer ) ? '' : 'const '
     3350            init = ( port.is_dynamic? && $ram_initializer ) ? '_init_' : ''
    27783351
    27793352            if ! port.is_skelton_useless? then
    2780               f.printf( "struct %s * const %s_%s[] = {\n",
     3353              f.printf( "struct %s * #{const}%s_%s[] = {\n",
    27813354                        "tag_#{port.get_signature.get_global_name}_VDES",
    27823355                        "#{c.get_global_name}",
    2783                         "#{j.get_name}" )
     3356                        "#{port.get_name}" + init )
    27843357            else
    27853358
    27863359#              スケルトン関数不要最適化の場合、この配列は参照されない
    27873360              # mikan このケースがテストされていない
    2788               f.printf( "const %s_IDX  %s_%s[] = {\n",
     3361              f.printf( "#{const}%s_IDX  %s_%s[] = {\n",
    27893362#                        "#{j.get_celltype.get_global_name}",   # 右辺 composite に対応できない
    27903363                        "#{j.get_rhs_cell.get_celltype.get_global_name}",
     
    28003373            i = 0
    28013374            while i < length
     3375              if am == nil then
     3376                f.print( "    0,\n" )
     3377                i += 1
     3378                next
     3379              end
    28023380              j = am[i]
    28033381              i += 1
     
    28413419            # mikan   cell の namespace 未対応、Join で Cell オブジェクトを引当ておく必要あり
    28423420            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
    28433428          end
    28443429        }
     
    29673552        init = v.get_initializer
    29683553        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
    29723558            # PtrType は ArrayType にすり替える
    29733559
     
    29763562            t2.set_type( type.get_type )
    29773563            type = t2
     3564            org_type = t2
    29783565          end
    29793566
     
    29823569          # f.print "const #{type0.get_type_str}\t#{@global_name}_#{v.get_name}_VAR_INIT#{type0.get_type_str_post} = "
    29833570          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 then
     3571          if org_type.kind_of? StructType then
    29853572            # celltype の default の初期値あり
    29863573            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 ) ) then
     3574          elsif( org_type.kind_of?( PtrType ) || org_type.kind_of?( ArrayType ) ) then
    29883575            str = "{ "
    2989             type = type.get_type
     3576            type = org_type.get_type
    29903577            # mikan ポインタではなく、配列型としないと、ポインタ変数の領域の分、損する
    29913578            init.each { |i|
     
    30153602        fs.each{ |r, f| f.print "#{@global_name}_INIB #{@global_name}_SINGLE_CELL_INIB = \n" }
    30163603        indent = 0
    3017       elsif ! @idx_is_id_act then
     3604      elsif ! @b_need_ptab then
    30183605        fs.each{ |r, f| f.print "#{@global_name}_INIB #{@global_name}_INIB_tab[] = {\n" }
    30193606        indent = 1
     
    30363623
    30373624        print_indent( f, indent )
    3038         if @idx_is_id_act then
     3625        if @b_need_ptab then
    30393626          f.print "const #{@global_name}_INIB #{name_array[5]} = "
    30403627        end
    30413628        f.print "{\n"
    30423629
    3043         gen_cell_cb_port( c, indent, f, name_array )
     3630        gen_cell_cb_port( c, indent, f, name_array, :INIB )
    30443631        gen_cell_cb_attribute( c, indent, f, name_array, :INIB )
    30453632
    30463633        unless @singleton then
    30473634          # 1 つの cell INIB の終わり
    3048           if @idx_is_id_act then
     3635          if @b_need_ptab then
    30493636            f.print( "};\n\n" )
    30503637          else
     
    30533640        end
    30543641      }
    3055       if ! @idx_is_id_act then
     3642      if ! @b_need_ptab then
    30563643        fs.each{ |r, f| f.print( "};\n\n" ) }
    30573644      end
     
    30683655          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_SINGLE_CELL_CB = \n" }
    30693656          indent = 0
    3070         elsif ! @idx_is_id_act then
     3657        elsif ! @b_need_ptab then
    30713658          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_CB_tab[] = {\n" }
    30723659          indent = 1
     3660        else
     3661          indent = 0
    30733662        end
    30743663
     
    30873676
    30883677          print_indent( f, indent )
    3089           if @idx_is_id_act then
     3678          if @b_need_ptab then
    30903679            f.print "#{@global_name}_CB #{name_array[2]} = "
    30913680          end
     
    30973686          end
    30983687
    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 )
    31013693          end
    31023694
     
    31063698          unless @singleton then
    31073699            # 1 つの cell CB の終わり
    3108             if @idx_is_id_act then
     3700            if @b_need_ptab then
    31093701              f.print( "};\n\n" )
    31103702            else
     
    31133705          end
    31143706        }
    3115         if ! @idx_is_id_act then
     3707        if ! @b_need_ptab then
    31163708          fs.each{ |r, f| f.print( "};\n\n" ) }
    31173709        end
     
    31203712          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_SINGLE_CELL_CB;\n" }
    31213713          indent = 0
    3122         elsif @idx_is_id_act then
     3714        elsif @b_need_ptab then
    31233715          @ordered_cell_list.each{ |c|
    31243716            next if ! c.is_generate?
     
    31393731  def gen_cell_cb_tab f
    31403732    indent = 0
    3141     if @idx_is_id_act then
     3733    if @b_need_ptab then
    31423734      if has_INIB? && ( $ram_initializer || ! has_CB? ) then
    31433735        f.print "/* ID to INIB table #_INTAB_# */\n"
     
    31503742        }
    31513743
    3152         f.print "#{@global_name}_INIB *#{@global_name}_INIB_tab[] ={\n"
     3744        f.print "#{@global_name}_INIB *const #{@global_name}_INIB_ptab[] ={\n"
    31533745        @ordered_cell_list.each{ |c|
    31543746          if c.is_generate? then                           # 生成対象か?
     
    31703762        }
    31713763
    3172         f.print "#{@global_name}_CB *#{@global_name}_CB_tab[] ={\n"
     3764        f.print "#{@global_name}_CB *const #{@global_name}_CB_ptab[] ={\n"
    31733765        @ordered_cell_list.each{ |c|
    31743766          if c.is_generate? then                           # 生成対象か?
     
    31993791  #   name_array[9] = @global_name    # celltype global name
    32003792  #   name_array[10] = cell.get_global_name # cell global name
     3793  #   name_array[11] = cell_INIB_proto #INIB name for proto type
    32013794 
    32023795  def get_name_array( cell )
     
    32073800      cell_CB_proto = "#{@global_name}_SINGLE_CELL_CB"
    32083801      cell_INIB_name = "#{@global_name}_SINGLE_CELL_INIB"
     3802      cell_INIB_proto = cell_INIB_name
    32093803      cell_ID = 0
    32103804    else
    3211       if ! @idx_is_id_act then
     3805      if ! @b_need_ptab then
    32123806        index = cell.get_id - cell.get_celltype.get_id_base
    32133807        cell_CB_name = "#{@global_name}_CB_tab[#{index}]"
     
    32153809        cell_CB_proto = "#{@global_name}_CB_tab[]"
    32163810        cell_INIB_name = "#{@global_name}_INIB_tab[#{index}]"
     3811        cell_INIB_proto = "#{@global_name}_INIB_tab[]"
    32173812      else
    32183813        cell_CB_name = "#{cell.get_global_name}_CB"
     
    32203815        cell_CB_proto = cell_CB_name
    32213816        cell_INIB_name = "#{cell.get_global_name}_INIB"
     3817        cell_INIB_proto = cell_INIB_name
    32223818      end
    32233819      cell_ID = cell.get_id
    32243820    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
    32253830    if @idx_is_id_act then
    32263831      cell_IDX = cell_ID
    32273832    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
    32353834    end
    32363835
     
    32473846    name_array[9] = @global_name    # celltype global name
    32483847    name_array[10] = cell.get_global_name # cell global name
     3848    name_array[11] = cell_INIB_proto # INIB name for prototype
    32493849
    32503850    return name_array
     
    33313931  end
    33323932
    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 )
    33353936    gen_cell_cb_entry_port( cell, indent, f, name_array )
    33363937  end
    33373938
    33383939  #=== 呼び口の初期化コードの生成
    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 )
    33403941    jl = cell.get_join_list
    33413942
    33423943    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
    33443948      print_indent( f, indent + 1 )
    3345       f.print "/* call port #_CP_# */ \n"
     3949      f.print "/* call port (#{inib_cb}) #_CP_# */ \n"
    33463950      port.each{ |p|
    33473951        next if p.get_port_type != :CALL
    33483952        next if p.is_omit?
    33493953        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 )
    33503956
    33513957        j = jl.get_item( p.get_name )
     
    33543960        # debug
    33553961        if j == nil then
     3962          dbgPrint "cell_cb_call_port: #{p.get_name} array size=#{p.get_array_size}\n"
    33563963          # optional 呼び口
    33573964          # cdl_error( "H1003 internal error: cell \'$1\' port \'$2\': initializer not found\n" , cell.get_name, p.get_name )
    33583965          # 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," )
    33643987          end
    33653988          next
     
    33693992        if am then
    33703993          # 呼び口配列の場合
    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}," )
    33723999          if p.get_array_size == "[]" then
    33734000            # 添数省略の呼び口配列
     
    33854012          end
    33864013
     4014          init = ( p.is_dynamic? && inib_cb == :INIB ) ? "_init_" : ""
     4015
    33874016          if j.get_rhs_subscript then
    33884017            # 受け口配列の場合
     
    33914020                      # "&#{j.get_cell_global_name}_#{j.get_port_name}_des#{subscript},",
    33924021                      "#{des_type_cast}&#{j.get_port_global_name}_des#{subscript},",
    3393                       p.get_name )
     4022                      p.get_name.to_s + init )
    33944023          else
    33954024            # 呼び口配列でも、受け口配列でもない
     
    33974026              f.printf( "%-40s /* %s #_CCP1_# */\n",
    33984027                        "#{des_type_cast}&#{j.get_port_global_name}_des,",
    3399                         p.get_name )
     4028                        p.get_name.to_s + init )
    34004029            else
    34014030              # スケルトン不要最適化(CB (INIB) へのポインタを埋め込む)
    34024031              c = j.get_rhs_cell                    # 呼び先セル
    34034032              ct = c.get_celltype                   # 呼び先セルタイプ
     4033              name_array = ct.get_name_array( c )   # 呼び先セルタイプで name_array を得る
    34044034              if ct.has_INIB? || ct.has_CB? then
    3405                 name_array = ct.get_name_array( c )   # 呼び先セルタイプで name_array を得る
    34064035                f.printf( "%-40s /* %s #_CCP2_# */\n", "#{name_array[7]},", p.get_name )
    34074036              else
    34084037                # 呼び先は 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 )
    34104039              end
    34114040            end
     
    36894318      f = fs[ c.get_region.get_domain_root ]
    36904319
    3691       ct = c.get_celltype
     4320      ct = c.get_celltype     # ct = self でも同じ
    36924321      jl = c.get_join_list
     4322      name_array = get_name_array( c )
    36934323
    36944324      port = ct.get_port_list
     
    37254355              else
    37264356                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"
    37334364                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"
    37394371                else
    37404372                  f.print "    0,\n"
     
    37604392            else
    37614393              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"
    37684401              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"
    37744408              else
    37754409                f.print "    0,\n"
     
    39404574
    39414575        ft.get_paramlist.get_items.each{ |param|
     4576          # p "type_str: #{param.get_type.get_type_str}"
    39424577          f.print( "#{delim} #{param.get_type.get_type_str}" )
    39434578          f.print( " #{param.get_name}#{param.get_type.get_type_str_post}" )
     
    39674602      end
    39684603
     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
    39694631    }
    39704632
     
    40484710          delim = ", "
    40494711          f.print param.get_type.get_type_str
     4712          # p "type_str2: #{param.get_type.get_type_str}"
    40504713          f.print " "
    40514714          f.print param.get_name
     
    41034766  def generate_inline_template_code
    41044767    return if @n_entry_port_inline == 0
     4768    return if @b_reuse && ! $generate_all_template
    41054769    if ! ( @plugin && @plugin.gen_ep_func? ) then
    41064770      return if @b_reuse && ! $generate_all_template
     
    44805144  #  str に以下の置換を行う
    44815145  #-   $ct$ ⇒ セルタイプ名(ct)
    4482   #-   $cell$ ⇒ セル名(cell)   cell が nil ならば3つの置換は行われない
     5146  #-   $cell$ ⇒ セル名(cell)   cell が nil ならば以下の置換は行われない
    44835147  #-   $cb$ ⇒ CB の C 言語名(cb)
    44845148  #-   $cbp$ ⇒ CB へのポインタ(cbp)
    44855149  #-   $cb_proto$ ⇒ CB の C 言語名プロトタイプ宣言用(cb_proto)
    4486   #-   $id$ ⇒ ct_cell
     5150  #-   $id$ ⇒ $ct$_$cell_global$    # ct_cell  before or same V1.5.2
    44875151  #-   $idx$ ⇒ idx
    44885152  #-   $ID$ ⇒ id (整数の番号)
    44895153  #-   $ct_global$ ⇒ セルタイプ名(ct)
    4490   #-   $cell_global$ ⇒ セル名(cell)   cell が nil ならば3つの置換は行われない
     5154  #-   $cell_global$ ⇒ セル名(cell)
    44915155  #-   $$   ⇒ $
    44925156  def subst_name( str, name_array )
     
    45035167
    45045168    str = str.gsub( /(^|[^\$])\$ct\$/, "\\1#{ct}" )
     5169    str = str.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{ct_global}" )
    45055170    if cell then
    45065171      str = str.gsub( /(^|[^\$])\$cell\$/, "\\1#{cell}" )
    45075172      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}" )
    45095175      str = str.gsub( /(^|[^\$])\$cb_proto\$/, "\\1#{cb_proto}" )
    45105176      str = str.gsub( /(^|[^\$])\$ID\$/, "\\1#{id}" )
    45115177      str = str.gsub( /(^|[^\$])\$idx\$/, "\\1#{idx}" )
    45125178      str = str.gsub( /(^|[^\$])\$cbp\$/, "\\1#{cbp}" )
    4513       str = str.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{ct_global}" )
    45145179      str = str.gsub( /(^|[^\$])\$cell_global\$/, "\\1#{cell_global}" )
    45155180    end
     
    46315296  end
    46325297end
     5298
     5299class DomainType < Node
     5300  def gen_factory
     5301    # p "DomainType: gen_factory"
     5302    @plugin.gen_factory
     5303  end
     5304end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/location.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/messages.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    8989 end
    9090
     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
    91105end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/optimize.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    178178
    179179  def set_domain
     180    domain_cells = {}
    180181    @cell_list.each{ |c|
    181182      if c.is_generate? then
     
    191192          @domain_roots[ dn ] = [ dr ]
    192193        end
     194        if domain_cells[ dr ]  then
     195          domain_cells[ dr ] << c
     196        else
     197          domain_cells[ dr ] = [ c ]
     198        end
    193199      end
    194200    }
     
    196202    @domain_roots.each{ |dn, drs|
    197203      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 = ""
    200207        drs.each{ |r|
    201           dbgPrint " region=#{r.get_name}"
     208          print delim, r.get_name
     209          delim = ", "
    202210        }
    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        }
    204221      end
    205222    }
     
    212229      # domain_type は一つのノードに一つしかないので、一つの要素を無条件で取り出す
    213230      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
    219239      end
    220240    }
     
    228248    end
    229249
     250    optimize_call
     251    if $unopt_entry == false then
     252      optimize_entry
     253    end
     254  end
     255
     256  #=== Celltype#呼び口最適化
     257  def optimize_call
    230258    @port.each{ |port|
    231259      next if port.get_port_type != :CALL
     
    238266        if $verbose then
    239267          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"
    240278        end
    241279        next
     
    351389      dbgPrint "#{port.get_name} : # of cells : #{port_cells.length}  # of ports : #{port_ports.length}\n"
    352390    }
    353 
     391  end
     392
     393  #=== Celltype#受け口最適化
     394  # optimize_entry は、呼び口最適化の結果を使用している
     395  def optimize_entry
    354396    # 受け口最適化の設定
    355397    @port.each{ |port|
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/plugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3838#++
    3939
    40 #== class モジュール
     40#== Plugin クラス
    4141# ThroughPlugin, SignaturePlugin, CelltypePlugin に include する
    4242class Plugin < Node
     
    7575  end
    7676
    77 ### 意味解析段階で呼び出されるメソッド ###
     77### 構文解釈 または 意味解析段階で呼び出されるメソッド ###
     78# generate 指定子の場合、構文解釈次第(end_of_parseで)呼び出される
     79# generate 文の場合、出現次第呼び出される
     80  ### 意味解析段階で呼び出されるメソッド ### <<< コメント誤り (V1.4.2)
    7881  #===  CDL ファイルの生成
    7982  #      typedef, signature, celltype, cell のコードを生成
     
    157160      #  識別子取得
    158161      if arg =~ /\A[a-zA-Z_]\w*/ then
    159         ident = $~
     162        ident = $~.to_s    #
    160163        arg = $'
    161164      else
     
    285288end
    286289
    287 #== 出力文字列を EUC から出力ファイルに convert する
    288 # tecsgen のソースコードは EUC で記述されている
     290#== 出力文字列を utf-8 から出力ファイルに convert する
     291# tecsgen のソースコードは utf-8 で記述されている
    289292# これを、出力ファイルの文字コードに変換して出力する
    290293#
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/pluginModule.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    4545
    4646  #=== プラグインをロードする
    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 のプラグインオブジェクトをロードする.
    4852  #
    4953  # すでにロードされているものは、重複してロードしない
     
    5963        end
    6064        # "#{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
    6266          cdl_error( "P2001 $1.rb : fail to load plugin" , plugin_name )
    63           return false
     67          return nil
    6468        end
    6569      end
    6670
    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
    7484        cdl_error( "P2002 $1: not kind of $2" ,  plugin_name, superClass.name )
    75         return false
     85        return nil
    7686      end
    7787    rescue Exception => evar
     
    8191      end
    8292      cdl_error( "P2003 $1: load failed" , plugin_name )
    83       return false
     93      return nil
    8494    end
    85     return true
     95    # ここへは来ない
     96    return nil
    8697  end
    8798
     
    92103    end
    93104    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
    97113    end
    98114    count = @@loaded_plugin_list[ plugin_name ]
     
    131147    dbgPrint "PluginModule #{@@loaded_plugin_list}\n"
    132148    @@loaded_plugin_list.each{ |plugin_name,count|
     149      if count == :MultiPlugin then
     150        next
     151      end
    133152      dbgPrint "PluginModule: #{plugin_name}\n"
    134153      eval_str = "#{plugin_name}.gen_post_code( file )"
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/syntaxobj.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2016 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    8686
    8787  #=== 情報を表示する
    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 )
    9095  end
    9196
     
    680685  end
    681686
     687  #=== Decl# print_flowinfo
     688  def print_flowinfo file
     689    if @kind == :VAR then
     690      file.write "#{@identifier} "
     691    end
     692  end
     693
    682694  def show_tree( indent )
    683695    indent.times { print "  " }
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecsgen.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    4141class TECSGEN
    4242
     43  @@b_post_coded = false     # ポストコード生成開始後 true
     44
    4345  #=== import パス (-I) を末尾に追加
    4446  # 既に登録済みであれば、追加しない
     
    216218  end
    217219
     220  def self.get_argv
     221    ARGV
     222  end
     223
    218224  #------ TECSGEN CDL analyze and generate ------#
    219225
     
    236242  end # syntax_analisys
    237243
     244  #=== TECSGEN#semantics_analisys_1
     245  # semantics check. only cells here
     246  # other objects (signature, celltype, typedef, etc ) are checked while syntax analisys
    238247  def semantics_analisys_1
    239248    ####  意味解析1 (post コードを除く) ####
    240249    dbgPrint( "## Creating reverse join \n")
    241250    Cell.create_reverse_join
     251
     252    DescriptorType.check_signature
     253    Signature.set_descriptor_list
     254    Celltype.check_dynamic_join
    242255
    243256    #0 set_definition_join は2回呼び出される(1回目)
     
    248261
    249262    ####  post コードの生成と構文解析 ####
     263    @@b_post_coded = true     # ポストコード生成開始後 true
    250264    # 引数がなければ、プラグインのポストコードを出力しない
    251265    if ARGV.length > 0 then
     
    283297    dbgPrint( "## Checking all join (for cells generated by Post Code\n")
    284298    @root_namespace.set_definition_join
     299    @root_namespace.set_max_entry_port_inner_cell
    285300
    286301    dbgPrint( "## Set require join\n")
     
    438453    open( "#{$gen_base}/tecsgen.timestamp", "w" ){|io|}
    439454  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
    440523end # class TECSGEN
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/types.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55#
    6 #   Copyright (C) 2008-2015 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#-- 
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    629629
    630630class FloatType < Type
    631 #  @bit_size::         32, 64, (80), -32, -64
     631#  @bit_size::         32, 64, (80), -32, -64, -128
    632632
    633633  def initialize( bit_size )
     
    684684    when -64
    685685      str = "#{str}double"
     686    when -128
     687      str = "#{str}long double"
    686688    end
    687689    return str
     
    734736#  @b_has_sized_pointer_member:: bool : メンバにポインタ型がある
    735737#  @b_has_unsized_string_member:: bool : メンバにポインタ型がある
     738#  @b_hasTag:: bool : タグがある
    736739#  @member_types_symbol:: Symbol : tag が無い時のみ設定 (それ以外では nil)
    737740
     
    746749    super()
    747750    @tag = tag
     751    if tag then
     752      @b_hasTag = true
     753    else
     754      @b_hasTag = false
     755    end
    748756    @@structtype_current_sp += 1
    749757    @@structtype_current_stack[@@structtype_current_sp] = self
     
    918926    str = super
    919927
    920     if @tag then
     928    if @b_hasTag then
    921929      # typedef struct tag StructType; の形式の場合
    922930      # struct の本体は、別に生成される
    923       return "#{str}struct #{@tag} "
     931      return "#{str}struct #{@tag}"
    924932
    925933    else
    926934      # typedef struct { int a; } StructType; の形式の場合
    927       str += "struct {\n"
     935      str += "struct {"
    928936      @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}" )
    930938      }
    931939      str += "} "
     
    12671275  def check_init( locale, ident, initializer, kind, attribute = nil )
    12681276    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
    12691286      index = 0
    12701287      initializer.each{ |i|
     
    15431560# 動的結合で渡すデスクリプタ型
    15441561class DescriptorType < Type
    1545 # @sinagure_nsp::NamespacePath
     1562  # @sinagure_nsp::NamespacePath
     1563
     1564  @@descriptors = {}
    15461565
    15471566  def initialize( signature_nsp )
    15481567    @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
    15571570  end
    15581571
    15591572  def get_type_str
    1560     "Descriptor( #{@signature_nsp.to_s} )"
     1573    "Descriptor( #{@signature_nsp.get_global_name} )"
    15611574  end
    15621575
     
    15811594  end
    15821595
     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
    15831618  #== DescriptorType#
    1584   # 意味解析段階では nil が返される可能性に注意
    15851619  def get_signature
    15861620    Namespace.find @signature_nsp
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_en_US.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    11681168@@warning_message[ :"W6004" ] = "need 'void' for no parameter"
    11691169
     1170###
     1171# info メッセージ
     1172@@info_message = {}
     1173
    11701174end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_ja_JP.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    11681168@@warning_message[ :"W6004" ] = "パラメータが存在しない場合 'void' が必要です"
    11691169
     1170###
     1171# info メッセージ
     1172@@info_message = {}
     1173
    11701174end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_en_US.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    7676#  * このファイルを編集して使用することが意図されていますが
    7777#  * tecsgen の再実行により上書きされてしまうため、通常
    78 #  *   gen/%s_template.c => src/%s.c
     78#  *   gen/%s_templ.c => src/%s.c
    7979#  * のように名前, フォルダを変更してから修正します
    8080#  */
     
    8383 * This file was automatically generated by tecsgen.
    8484 * Move and rename like below before editing,
    85  *   gen/%s_template.c => src/%s.c
     85 *   gen/%s_templ.c => src/%s.c
    8686 * to avoid to be overwritten by tecsgen.
    8787 */
     
    227227@@comment[ :EPM_comment ] = "\n/* entry port function macro (abbrev) %s */\n"
    228228
     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
    229241# @@comment[ :CTIX_comment ] = "\n/* セルタイプのIDX型 %s */\n"
    230242@@comment[ :CTIX_comment ] = "\n/* celltype IDX type %s */\n"
     
    323335@@comment[ :TEFB_comment ] = "\t/* Put statements here %s */\n"
    324336
     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"
    325342end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_ja_JP.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    6565 * このファイルを編集して使用することが意図されていますが
    6666 * tecsgen の再実行により上書きされてしまうため、通常
    67  *   gen/%s_template.c => src/%s.c
     67 *   gen/%s_templ.c => src/%s.c
    6868 * のように名前, フォルダを変更してから修正します
    6969 */
     
    127127@@comment[ :CPMA_comment ] = "/* 呼び口関数マクロ(短縮形)%s */\n"
    128128@@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"
    129133@@comment[ :CTIX_comment ] = "\n/* セルタイプのIDX型 %s */\n"
    130134@@comment[ :EPP_comment ] = "\n/* 受け口関数プロトタイプ宣言 %s */\n"
     
    159163@@comment[ :TEPF_comment ] = "/* 受け口関数 %s */\n"
    160164@@comment[ :TEFB_comment ] = "\t/* ここに処理本体を記述します %s */\n"
     165@@comment[ :MCPP_comment ] = "/* CB プロトタイプ宣言 %s */\n"
     166@@comment[ :MCPB_comment ] = "/* CB プロトタイプ宣言 %s */\n"
    161167
    162168end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/DomainPlugin.rb

    r321 r429  
    4646  #option::String : domain 指定子の第二引数
    4747  def initialize( region, domain_type_name, option )
     48    super()
    4849  end
    4950
     
    7778    return false
    7879  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
    7991end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2AlarmHandlerPlugin.rb

    r321 r429  
    3434#   アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
    3535#   の責任を負わない.
     36#
     37#   $Id: HRP2AlarmHandlerPlugin.rb 2640 2017-06-03 11:27:12Z okuma-top $
    3638
    3739#++
     
    5052    def print_cfg_cre(file, cell, val, tab)
    5153        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_base
    54         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
    5557        # CRE_XXXの生成
    5658        if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN)
     
    5961        else
    6062            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 });
    6264EOT
    6365        end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2CyclicHandlerPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2012 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
     
    5152    def print_cfg_cre(file, cell, val, tab)
    5253        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_base
    55         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
    5657        # CRE_XXXの生成
    5758        if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN)
     
    6061        else
    6162            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]} });
    6364EOT
    6465        end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2DataqueuePlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2012 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2EventflagPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2012 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2FixedSizeMemoryPoolPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2012 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
    3940#require "HRP2KernelObjectPlugin"
    4041require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
    41 
    4242
    4343#== celltype プラグインの共通の親クラス
     
    5151    # tab  :
    5252    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
    5759        # CRE_XXXの生成
    5860        domainOption = cell.get_region.get_domain_root.get_domain_type.get_option
     
    6365        elsif @plugin_arg_str == "ALARM"
    6466            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 });
    6668EOT
    6769        elsif @plugin_arg_str == "CYCLIC"
    6870            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]} });
     72EOT
     73        elsif @plugin_arg_str == "CONFIG_INT"
     74            file.print <<EOT
     75#{tab}CFG_INT( #{val[:interruptNumber]}, { #{val[:attribute]}, #{val[:interruptPriority]} });
     76EOT
     77        elsif @plugin_arg_str == "ISR"
     78            file.print <<EOT
     79#{tab}ATT_ISR({ #{val[:attribute]}, #{cell_CBP}, #{val[:interruptNumber]}, tISR_start, #{val[:priority]} });
     80EOT
     81        elsif @plugin_arg_str == "INIT_ROUTINE"
     82            file.print <<EOT
     83#{tab}ATT_INI({ #{val[:attribute]}, #{cell_CBP}, tInitializeRoutine_start });
     84EOT
     85        elsif @plugin_arg_str == "TERM_ROUTINE"
     86            file.print <<EOT
     87#{tab}ATT_TER({ #{val[:attribute]}, #{cell_CBP}, tTerminateRoutine_start });
    7088EOT
    7189        else
     
    7997        elsif @plugin_arg_str == "CYCLIC"
    8098            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
    81107        else
    82108            raise "#{@plugin_arg_str} is unknown option"
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2KernelObjectPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2012 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
     
    185186                val = {}
    186187                @celltype.get_attribute_list.each{ |a|
    187                     p a.get_name
     188                    # p a.get_name
    188189                    if a.get_type.kind_of?( ArrayType )
    189190                        val[a.get_name] = []
     
    217218                if val[:id].nil? != true
    218219                    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 ) )
    220222                end
    221223                # $cbp$の代わり
     
    243245                        file2.puts "}\n"
    244246                    else
    245                         print "~~~~~ #{cell.get_region.get_name.to_s} is included in"
    246                         p @@region_list
     247                        dbgPrint "~~~~~ #{cell.get_region.get_name.to_s} is included in"
     248                        # p @@region_list
    247249                    end
    248250                    file3 = AppFile.open( "#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg" )
     
    257259                puts "===== end check my domain #{cell.get_name} ====="
    258260                # 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
    279300                    else
    280                         acv << "TACP_SHARED"
     301                        # 無所属の場合
     302                        print_cfg_sac(file2, val, acv)
    281303                    end
    282304
    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} ====="
    300306                end
    301 
    302                 puts "===== end check regions #{cell.get_name} ====="
    303307            end
    304308        }
     
    319323
    320324    def self.check_referenced_cells()
    321         puts "===== begin check registered celltype ====="
     325        dbgPrint "===== begin check registered celltype =====\n"
    322326        self.get_celltype_list.each { |ct|
    323             p ct.get_name.to_s
     327            dbgPrint( ct.get_name.to_s + "\n" )
    324328        }
    325         puts "===== end check registered celltype ====="
     329        dbgPrint "===== end check registered celltype =====\n"
    326330
    327331=begin
     
    331335                j = cell.get_join_list.get_item(p.get_name)
    332336                printf "===== check call port : "
    333                 p p.get_name.to_s
     337                # p p.get_name.to_s
    334338                next if j.nil? # 未結合の場合
    335339                if @@celltype_list.include?(j.get_celltype)
     
    338342                    j.get_cell.set_referenced_cell(cell, j.get_port_name)
    339343                    printf "===== check joined rhs cell : "
    340                     p j.get_cell.get_name.to_s
     344                    # p j.get_cell.get_name.to_s
    341345                    printf "===== check joined rhs port_name : "
    342                     p j.get_port_name
     346                    # p j.get_port_name
    343347                end
    344348            }
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2ObjectPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Plugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2014 by TOPPERS Project
     6#   Copyright (C) 2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
     
    4344
    4445  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
    4659  end
    4760
     
    5467    # get_rhs_subscript:Integer or nil 受け口配列の添数 (Join::@rhs_subscript の説明参照)
    5568    # 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"
    5770
    5871    puts "=====Join Check Start====="
     
    107120  end
    108121
     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
    109135  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"
    111137    return true
    112138  end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PostHook.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2012 by TOPPERS Project
     6#   Copyright (C) 2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2RPCPlugin.rb

    r321 r429  
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
     
    7071  #=== RPCPlugin の initialize
    7172  #  説明は 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 )
    7374    super
    7475    @b_noClientSemaphore = false
     
    234235    if cell.get_allocator_list.length > 0 then
    235236
    236       dbgPrint "make allocator"
     237      dbgPrint "make allocator\n"
    237238      file.print "#{indent_str}[allocator("
    238239
     
    269270    nest = @end_region.gen_region_str_pre file
    270271    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
    271278
    272279    file.print <<EOT
    273280#{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};
    275282//#{indent_str}    #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name};
    276283#{indent_str}  //cTDR         = #{@channelCellName}.eTDR;
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SVCPlugin.rb

    r321 r429  
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
     
    8384  @@generated_celltype_header = {}
    8485
    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 )
    8687    super
    8788    @ct_name_body = "#{@ct_name}SVCBody_#{@next_cell.get_name}_#{@next_cell_port_name}".to_sym
     
    217218    nest = @end_region.gen_region_str_pre file
    218219    nest_str = "  " * nest
     220    if @next_cell_port_subscript then
     221      subscript = '[' + @next_cell_port_subscript.to_s + ']'
     222    else
     223      subscript = ""
     224    end
    219225
    220226    # サーバー側チャンネルの生成
     
    224230#{nest_str}  //  Server Side Channel
    225231#{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};
    227233#{nest_str}  };
    228234EOT
     
    241247    nest = @start_region.gen_region_str_pre file
    242248    nest_str = "  " * nest
     249    if @next_cell_port_subscript then
     250      subscript = '[' + @next_cell_port_subscript.to_s + ']'
     251    else
     252      subscript = ""
     253    end
    243254
    244255    # クライアント側チャンネルの生成
     
    247258#{nest_str}  //  Client Side Channel
    248259#{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};
    250261#{nest_str}  };
    251262
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2TaskPlugin.rb

    r321 r429  
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
     
    5253    # tab  :
    5354    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 ) )
    5557        # $cbp$の代わり
    5658        index = cell.get_id - @celltype.get_id_base
     
    5860        cell_CB_name = "#{index}"
    5961        # CRE_XXX/DEF_XXXの生成
    60         print "assign task plugin\n"
     62        dbgPrint "assign task plugin\n"
    6163        domainOption = cell.get_region.get_domain_root.get_domain_type.get_option
    6264        # if cell.get_region.get_region_type == :DOMAIN
     65# cell.show_tree 1
    6366        if domainOption != "OutOfDomain"
    6467            # 保護ドメインに属する場合
     
    6871                    raise "system task cannot have user stack."
    6972                end
     73p "CRE_TSK 0 user=#{val[:userStackSize]} system=#{val[:systemStackSize]}"
    7074                file.print <<EOT
    7175#{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:systemStackSize]}, NULL });
     
    7680                    raise "user task must have user stack."
    7781                end
     82p "CRE_TSK 1"
    7883                if val[:systemStackSize] == "OMIT"
    7984                    file.print <<EOT
     
    8186EOT
    8287                else
     88p "CRE_TSK 2"
    8389                    file.print <<EOT
    8490#{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:userStackSize]}, NULL, #{val[:systemStackSize]}, NULL });
     
    121127                ct = cell.get_celltype
    122128                if ct.class == Celltype && check_celltype_list.include?( ct ) == false
     129                    # チェック済みセルタイプに登録
     130                    check_celltype_list << ct
     131
    123132                    # 未チェックのセルタイプだった場合
    124133                    # puts "check for ATT_MOD : #{ct.classget_global_name}"
     
    134143                    regions = ct.get_domain_roots
    135144                    regions_hrp2 = regions[ :HRP2 ]
    136                     print "HRP2 domain in #{ct.get_name}: "
     145                    dbgPrint "HRP2 domain in #{ct.get_name}: "
    137146                    regions_hrp2.each { |reg|
    138                         print reg.get_name
     147                        dbgPrint reg.get_name
    139148                    }
    140149                    puts ""
     
    179188                    file.print "ATT_MOD(\"#{ct.get_global_name}.o\");\n"
    180189                    file.close
    181 
    182                     check_celltype_list << ct
    183190                else
    184191                    # 何もしない
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/MrubyBridgePlugin.rb

    r321 r429  
    33#  mruby => TECS bridge
    44
    5 #   Copyright (C) 2008-2015 by TOPPERS Project
     5#   Copyright (C) 2008-2017 by TOPPERS Project
    66#
    77#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3737#
    3838
    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 クラス
     40class 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
    21366    end
    21467  end
    215 
    216   #=== check paramter type
    217   def check_parameter_type func_head_array
    218     # check type of parameters
    219     func_head_array.each{ |fh|
    220       fh.get_paramlist.get_items.each{ |param_decl|
    221         case param_decl.get_direction
    222         when :SEND, :RECEIVE
    223           cdl_error( "MRB1003 $1: $2 parameter cannot be used in mruby Bridge",  param_decl.get_name, param_decl.get_direction.to_s.downcase )
    224         end
    225         type = param_decl.get_type
    226         type_org = type.get_original_type
    227         type_str = type.get_type_str + type.get_type_str_post
    228 
    229         b_ng = false
    230         case type_org
    231         when IntType
    232           case  type_org.get_bit_size
    233           when 8, 16, 32, 64
    234           when -1, -2, -3, -4, -11
    235           else
    236             b_ng = true
    237           end
    238         when BoolType
    239         when FloatType
    240         when PtrType
    241           ttype_org = type_org.get_type       # ポインタの指している先の型
    242           ttype = ttype_org.get_original_type # 上記の typedef されている場合、元の型
    243           register_ptr_type ttype_org
    244 
    245           if( type_org.get_string.to_s == "-1" ) then
    246             case param_decl.get_direction
    247             when :OUT, :INOUT
    248               cdl_error( "MRB9999 string specifier without length cannot be used for out & inout parameter")
    249             end
    250           end
    251 
    252           case ttype
    253           when IntType
    254             bit_size = ttype.get_bit_size
    255             # if  bit_size < 0 && bit_size != -1 then
    256             #   b_ng = true
    257             # end
    258           when FloatType
    259           when BoolType
    260           when StructType
    261             if( type_org.get_size || type_org.get_string || type_org.get_count ) then
    262               cdl_error( "MRB1004 $1: size_is, count_is, string cannot be specified for struct pointer", param_decl.get_name )
    263             end
    264             check_struct_member ttype_org
    265           else
    266             b_ng = true
    267           end
    268         when StructType
    269           check_struct_member type_org
    270         else  # ArrayType, FuncType, EnumType, VoidType
    271           b_ng = true
    272         end
    273         if b_ng then
    274           cdl_error( "MRB1005 $1: type $2 cannot be used in mruby Bridge", param_decl.get_name, type_str )
    275         end
    276       }
    277     }
    278   end
    279 
    280   #=== 構造体のメンバーの型のチェック
    281   def check_struct_member struct_type
    282     #p "tag name:#{struct_type.get_name}"
    283     # sttype = Namespace.find_tag( struct_type.get_name )
    284     sttype = struct_type.get_original_type
    285     if sttype.get_name == nil then
    286       cdl_error( "MRB10007 tagless-struct cannot be handled")
    287     end
    288     sttype.get_members_decl.get_items.each { |d|
    289       t = d.get_type.get_original_type
    290       case t
    291       when IntType, FloatType, BoolType
    292       else
    293         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       end
    295     }
    296     st_name = :"t{}"
    297     if @struct_list[ sttype.get_name ] == nil then
    298       # 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 ] = sttype
    301     end
    302   end
    303 
    304   def register_ptr_type ttype
    305     t_org = ttype.get_original_type
    306     tment = get_type_map_ent t_org
    307     if tment == nil then
    308       return
    309       cdl_error( "MRB1008 unknown pointer type '$1'", ttype.get_type_str )
    310     end
    311     ptr_celltype_name = :"t#{tment[1]}Pointer"
    312     if @@ptr_list[ ptr_celltype_name ] == nil then
    313       # 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 ] = tment
    316     end
    317     if @ptr_list[ ptr_celltype_name ] == nil then
    318       @ptr_list[ ptr_celltype_name ] = tment
    319     end
    320   end
    321 
    322   def get_type_map_ent ttype
    323     # structure type is registerd in check_struct_member
    324     if ttype.kind_of? StructType
    325       return
    326     end
    327     tstr = ttype.get_type_str.sub( /const /, "" )    # const は無視
    328     tstr = tstr.sub( /volatile /, "" )               # volatile も無視
    329     if @b_ignoreUnsigned then
    330       tstr = tstr.sub( /unsigned /, "" )             # volatile も無視
    331       tstr = tstr.sub( /uint/, "int" )               # volatile も無視
    332       tstr = tstr.sub( /[cs]char/, "char" )          # volatile も無視
    333     end
    334     return @@TYPE_MAP[ tstr.to_sym ]
    335   end
    336 
    337   #===  CDL ファイルの生成
    338   #      typedef, signature, celltype, cell コードを生成
    339   #file::        FILE       生成するファイル
    340   def gen_cdl_file(file)
    341 
    342     # ブリッジセルタイプの生成
    343     if @@celltypes[ @celltype_name ] == nil then
    344       @@celltypes[ @celltype_name ] = [ self ]
    345       @@init_celltypes[ @init_celltype_name ] = true
    346       print_msg <<EOT
    347   MrubyBridgePlugin: [signature] #{@signature.get_namespace_path} => [celltype] nMruby::#{@celltype_name} => [class] TECS::#{@class_name}
    348 EOT
    349 
    350       file.print <<EOT
    351 import( <mruby.cdl> );
    352 
    353 /****  Ruby => TECS Bridge Celltype (MBP500) ****/
    354 namespace nMruby{
    355     // bridge celltype
    356     [idx_is_id,active]   // not actually active, to avoid warning W1002, W1007
    357     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 celltype
    365     celltype #{@init_celltype_name} {
    366         entry sInitializeTECSBridge eInitialize;
    367     };
    368 };
    369 EOT
    370 
    371       # 構造体セルタイプの生成
    372       @struct_list.each{ |name, sttype|
    373         if @@struct_list[ name ] == nil then
    374           file.print <<EOT
    375 namespace nMruby{
    376     [singleton]
    377     celltype #{name} {
    378         entry sInitializeTECSBridge eInitialize;
    379     };
    380 };
    381 EOT
    382           @@struct_list[ name ] = sttype
    383         end
    384       }
    385 
    386     else
    387       cdl_warning( "MRBW001 MrubyBridgePlugin: signature '$1' duplicate. ignored current one", @signature.get_namespace_path )
    388       @@celltypes[ @celltype_name ] << self
    389     end
    390   end
    391 
    392   #=== gen_cdl_file で定義したセルタイプに 新しいセルが定義された
    393   # cell のセルタイプの名前は @celltype_name
    394   def new_cell cell
    395     if cell.get_celltype.get_name != @celltype_name then
    396       return
    397     end
    398 
    399     join = cell.get_join_list.get_item :VMname
    400     if join then
    401       vm_name = CDLString.remove_dquote(join.get_rhs.to_s).to_sym
    402     else
    403       vm_name = :"VM"
    404     end
    405 
    406     if @@VM_list[ vm_name ] == nil then
    407       @@VM_list[ vm_name ] = true
    408 
    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 <<EOT
    416 
    417   // prototype of TECSInitializer (MBP510)
    418   cell nMruby::tTECSInitializer #{vm_name}_TECSInitializer;
    419 EOT
    420       file.close
    421 
    422       Generator.parse( initializer_celltype_cdl, self )
    423     end
    424 
    425     if @@VM_celltypes[ vm_name ] then
    426       vma = @@VM_celltypes[ vm_name ]
    427 
    428       if vma[ @celltype_name ] then
    429         vma[ @celltype_name ] << cell
    430       else
    431         vma[ @celltype_name ] = [cell]
    432         @@VM_celltypes[ vm_name ] = vma
    433       end
    434     else
    435       vma = { }
    436       vma[ @celltype_name ] = [cell]
    437       @@VM_celltypes[ vm_name ] = vma
    438     end
    439 
    440     @struct_list.each{ |stname, sttype|
    441       if @@VM_struct_list[ vm_name ] then
    442         @@VM_struct_list[ vm_name ][ sttype.get_name ] = sttype
    443       else
    444         @@VM_struct_list[ vm_name ] = { sttype.get_name => sttype }
    445       end
    446     }
    447     @ptr_list.each{ |ptr_celltype_name, tment|
    448       if @@VM_ptr_list[ vm_name ] then
    449         @@VM_ptr_list[ vm_name ][ ptr_celltype_name ] = tment
    450       else
    451         @@VM_ptr_list[ vm_name ] = { ptr_celltype_name => tment }
    452       end
    453     }
    454 
    455   end
    456 
    457   #=== プラグインが CDL の POST コードを生成
    458   # tmp_plugin_post_code.cdl への出力
    459   def self.gen_post_code file
    460 
    461 #     file.print <<EOT
    462 # namespace nMruby {
    463 # EOT
    464 #
    465 #     @@ptr_list.each{ |name,tment|
    466 #       file.print <<EOT
    467 #
    468 #     // MBP600
    469 #     [singleton]
    470 #     celltype #{name} {
    471 #         entry  sInitializeTECSBridge eInitialize;
    472 #     };
    473 # EOT
    474 #     }
    475 #
    476 #     file.print <<EOT
    477 # };
    478 # EOT
    479 
    480 # gen_post_code で生成した celltype は gen_ep_func が呼び出されない #847
    481 #    @@struct_list.each{ |name,sttype|
    482 #      file.print <<EOT
    483 #
    484 #    [singleton]
    485 #    celltype #{name} {
    486 #        entry  sInitializeTECSBridge eInitialize;
    487 #    };
    488 #EOT
    489 #    }
    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 then
    496           ct_name = cell.get_celltype.get_name
    497         file.print <<EOT
    498   cell nMruby::#{ct_name}_Initializer #{vm_name}_#{ct_name}_Initializer{ };
    499 EOT
    500         end
    501       }
    502     }
    503 
    504     file.print "  // MBP602\n"
    505     @@ptr_list.each{ |name,tment|
    506       file.print <<EOT
    507   cell nMruby::#{name} C#{name} { };
    508 EOT
    509     }
    510 
    511     file.print "  // MBP603\n"
    512     @@struct_list.each{ |name,sttype|
    513       file.print <<EOT
    514   cell nMruby::#{name} C#{name} { };
    515 EOT
    516     }
    517 
    518     if @@VM_celltypes == nil
    519       raise "are0"
    520     end
    521     @@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_name
    530           file.print "    cInitialize[] = #{vm_name}_#{ct_name}_Initializer.eInitialize;\n"
    531         }
    532       }
    533       if @@VM_ptr_list[vm_name] then
    534         @@VM_ptr_list[vm_name].each{ |name, tment|
    535           file.print "    cInitialize[] = C#{name}.eInitialize;\n"
    536         }
    537       end
    538       if @@VM_struct_list[vm_name] then
    539         @@VM_struct_list[vm_name].each{ |name, sttype|
    540           file.print "    cInitialize[] = C#{name}.eInitialize;\n"
    541         }
    542       end
    543       file.print "  };"
    544     }
    545    
    546   end
    547 
    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 ] then
    554       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 ] then
    556       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 ] then
    558       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 ] then
    560       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     else
    562       raise "Unknown #{ct_name}"
    563     end
    564   end
    565 
    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   end
    569 
    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 <<EOT
    572     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 EOT
    579 
    580     @func_head_array.each{ |f|
    581       if ! f.is_function? then
    582         next
    583       end
    584       if f.get_name != :initialize then
    585         func_name = f.get_name
    586       else
    587         func_name = :initialize_cell
    588       end
    589 
    590       ret_type = f.get_return_type
    591       n_param = 0
    592       f.get_paramlist.get_items.each{ |param|
    593         case param.get_direction
    594         when :IN, :INOUT, :OUT
    595           n_param += 1
    596         when :SEND, :RECEIVE
    597           raise "send, receive"
    598         end
    599       }
    600       if n_param > 0 then
    601         p_str = "MRB_ARGS_REQ( #{n_param} )"
    602       else
    603         p_str = "MRB_ARGS_NONE()"
    604       end
    605       file.print <<EOT
    606         mrb_define_method( mrb, rc, "#{func_name}", MrubyBridge_#{@celltype_name}_#{func_name}, #{p_str} );
    607 EOT
    608     }
    609   end
    610 
    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 <<EOT
    616         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 EOT
    629 
    630     if t[2] == :Char then
    631       file.print <<EOT
    632         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 EOT
    635     end
    636   end
    637 
    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_name
    640     structType = @@struct_list[ tag ]
    641     file.print  <<EOT
    642         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 EOT
    649 
    650       structType.get_members_decl.get_items.each{ |d|
    651         file.print "  STRUCT_INIT_MEMBER( #{tag}, #{d.get_name} )\n"
    652       }
    653   end
    654 
    655   #===  受け口関数の preamble (C言語)を生成する
    656   #     必要なら preamble 部に出力する
    657   #file::           FILE        出力先ファイル
    658   #b_singleton::    bool        true if singleton
    659   #ct_name::        Symbol
    660   #global_ct_name:: string
    661   def gen_preamble( file, b_singleton, ct_name, global_ct_name )
    662     if @@celltypes[ ct_name ] then
    663       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 ] then
    668       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 ] then
    671       gen_preamble_ptr( file, b_singleton, ct_name, global_ct_name )
    672     elsif @@struct_list[ ct_name ] then
    673       gen_preamble_struct( file, b_singleton, ct_name, global_ct_name )
    674     else
    675       raise "Unknown #{ct_name}"
    676     end
    677   end
    678 
    679   def gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )
    680     file.print <<EOT
    681 /* 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 #else
    692 #define DLLEXPORT
    693 #endif
    694 
    695 #ifndef NULL
    696 #define NULL 0
    697 #endif
    698 EOT
    699   end
    700 
    701   def gen_preamble_instance( file, b_singleton, ct_name, global_ct_name )
    702     file.print <<EOT
    703 
    704 /* RData MBP001 */
    705 static void
    706 #{@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}_free
    717 };
    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 EOT
    730 
    731     # mikan namespace
    732     nsp = NamespacePath.new( :nMruby, true )
    733     nsp.append! ct_name
    734     ct = Namespace.find nsp
    735 
    736     ct.get_cell_list.each{ |cell|
    737       if cell.is_generate? then
    738         name_array = ct.get_name_array( cell )
    739         file.print "\t{ \"#{cell.get_name}\", #{name_array[8]} },\n"
    740       end
    741     }
    742 
    743     file.print <<EOT
    744 \t{ 0, 0 },
    745 };
    746 
    747 EOT
    748 
    749   end
    750 
    751   def gen_preamble_ptr( file, b_singleton, ct_name, global_ct_name )
    752     tment = @@ptr_list[ ct_name ]
    753     file.print <<EOT
    754 
    755 GET_SET_#{tment[3]}( #{tment[1]}, #{tment[0]} )
    756 POINTER_CLASS( #{tment[1]}, #{tment[0]} )
    757 EOT
    758   end
    759 
    760   def gen_preamble_struct( file, b_singleton, ct_name, global_ct_name )
    761     tag = ct_name
    762     structType = @@struct_list[ tag ]
    763     file.print <<EOT
    764 /* struct #{tag} */
    765 STRUCT_CLASS( #{tag} )
    766 EOT
    767 
    768     structType.get_members_decl.get_items.each{ |d|
    769       type = d.get_type.get_original_type
    770       case type
    771       when IntType, CIntType
    772         bit_size = type.get_bit_size
    773         case bit_size
    774         when -11, -1
    775           tType = "Char"
    776           ttype = "char"
    777         when -2
    778           tType = "Short"
    779           ttype = "short"
    780         when -3
    781           tType = "Int"
    782           ttype = "int"
    783         when -4
    784           tType = "Long"
    785           ttype = "long"
    786         when -5
    787           tType = "IntPtr"
    788           ttype = "intptr"
    789         when 8, 16, 32, 64
    790           tType = "Int#{bit_size}"
    791           ttype = "int#{bit_size}"
    792         else
    793             raise "cannot handle bit_size #{bit_size}"
    794         end
    795         file.print "MEMBER_GET_SET_INT( #{tag}, #{d.get_name}, #{tType}, #{ttype} )\n"
    796       when FloatType, CFloatType
    797         file.print "MEMBER_GET_SET_FLOAT( #{tag}, #{d.get_name} )\n"
    798       else
    799         raise "cannot handle type"
    800       end
    801     }
    802 
    803   end
    804 
    805   def gen_preamble_instance_proto( file, b_singleton, ct_name, global_ct_name )
    806     file.print <<EOT
    807 //  Prototype MBP400
    808 mrb_value  MrubyBridge_#{@celltype_name}_initialize( mrb_state *mrb, mrb_value self);
    809 EOT
    810 
    811     @func_head_array.each{ |f|
    812       if ! f.is_function? then
    813         next
    814       end
    815       if f.get_name != :initialize then
    816         func_name = f.get_name
    817       else
    818         func_name = :initialize_cell
    819       end
    820 
    821       ret_type  = f.get_return_type
    822       ret_type0 = f.get_return_type.get_original_type
    823       b_void    = ret_type0.is_void?
    824       plist     = f.get_paramlist.get_items
    825 
    826       file.print <<EOT
    827 mrb_value  MrubyBridge_#{@celltype_name}_#{func_name}( mrb_state *mrb, mrb_value self );
    828 EOT
    829     }
    830   end
    831 
    832   def gen_preamble_instance_initialize( file, b_singleton, ct_name, global_ct_name )
    833     file.print <<EOT
    834 
    835 /* MBP100 */
    836 mrb_value
    837 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 EOT
    864   end
    865 
    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? then
    870         next
    871       end
    872       if f.get_name != :initialize then
    873         func_name = f.get_name
    874       else
    875         func_name = :initialize_cell
    876       end
    877 
    878       ret_type  = f.get_return_type
    879       ret_type0 = f.get_return_type.get_original_type
    880       b_void    = ret_type0.is_void?
    881       plist     = f.get_paramlist.get_items
    882 
    883       file.print <<EOT
    884 
    885 /* bridge function (MBP101) */
    886 mrb_value
    887 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 EOT
    892      
    893       file.print "      /* variables for return & parameter (MBP110) */\n"
    894       if ! b_void then
    895         file.print "    ", ret_type.get_type_str, "\tret_val", ret_type.get_type_str_post, ";\n"
    896       end
    897       arg_str = ""
    898       n_param  = 0
    899       n_scalar = 0
    900       n_ptr    = 0
    901       n_struct = 0
    902       plist.each{ |param|
    903         case param.get_direction
    904         when :IN, :INOUT, :OUT
    905           type = param.get_type.get_original_type
    906           case type
    907           when IntType
    908             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 += 1
    912             n_scalar += 1
    913           when FloatType
    914             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 += 1
    918             n_scalar += 1
    919           when BoolType
    920             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 += 1
    924             n_scalar += 1
    925           when PtrType
    926             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 += 1
    930             n_ptr += 1
    931           when StructType
    932             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 += 1
    936             n_struct += 1
    937           else
    938             raise "Unkown type"
    939           end
    940         end
    941       }
    942 
    943       if n_param > 0 then
    944         file.print "    /* retrieve arguments (MBP111) */\n"
    945         file.print "    mrb_get_args(mrb, \"#{arg_str}\""
    946         plist.each{ |param|
    947           case param.get_direction
    948           when :IN, :INOUT, :OUT
    949             type = param.get_type.get_original_type
    950             case type
    951             when IntType
    952               file.print ", &mrb_", param.get_name
    953             when FloatType
    954               file.print ", &mrb_", param.get_name
    955             when BoolType
    956               file.print ", &mrb_", param.get_name
    957             when PtrType
    958               file.print ", &mrb_", param.get_name
    959             when StructType
    960               file.print ", &mrb_", param.get_name
    961             else
    962               raise "Unkown type"
    963             end
    964           end
    965         }
    966         file.print " );\n"
    967 
    968         if n_scalar > 0 || n_struct > 0 then
    969           file.print "  /* convert mrb to C (MBP112) */\n"
    970         end
    971         plist.each{ |param|
    972           case param.get_direction
    973           when :IN, :INOUT, :OUT
    974             type = param.get_type.get_original_type
    975             case type
    976             when IntType
    977               ttype = type.get_original_type
    978               tment = get_type_map_ent ttype
    979               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 FloatType
    982               file.print "      #{param.get_name} = (#{param.get_type.get_type_str})mrb_#{param.get_name};\n"
    983             when BoolType
    984               file.print "      #{param.get_name} = mrb_test( mrb_#{param.get_name} );\n"
    985             when PtrType
    986               ttype = type.get_type.get_original_type
    987               case ttype
    988               when StructType
    989                 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 IntType
    992               when FloatType
    993               when BoolType
    994               else
    995                 raise "cannot handle type"
    996               end
    997             when StructType
    998               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             else
    1001               raise( "canot treat class" )
    1002             end
    1003           end
    1004         }
    1005 
    1006         if n_ptr > 0 then
    1007           file.print "  /* convert mrb to C for pointer types (MBP113) */\n"
    1008         end
    1009         plist.each{ |param|
    1010           case param.get_direction
    1011           when :IN, :INOUT, :OUT
    1012             type = param.get_type.get_original_type
    1013             case type
    1014             when IntType
    1015             when FloatType
    1016             when BoolType
    1017             when PtrType
    1018               case type.get_type.get_original_type
    1019               when StructType
    1020               when IntType
    1021                 ptrMrb2C file, type, param
    1022               when FloatType
    1023                 ptrMrb2C file, type, param
    1024               when BoolType
    1025                 ptrMrb2C file, type, param
    1026               else
    1027                 raise "cannot handle type"
    1028               end
    1029             when StructType
    1030             else
    1031               raise( "canot treat class" )
    1032             end
    1033           end
    1034         }
    1035 
    1036       end
    1037 
    1038       file.print "      /* calling target (MBP120) */\n"
    1039       if ! b_void then
    1040         file.print "    ret_val = "
    1041       else
    1042         file.print "    "
    1043       end
    1044       delim = ""
    1045       file.print "cTECS_", f.get_name, "( "
    1046       plist.each{ |param|
    1047         if param.get_type.get_original_type.kind_of? StructType then
    1048           aster = "*"
    1049         else
    1050           aster = ""
    1051         end
    1052         file.print delim, aster, param.get_name
    1053         delim = ", "
    1054       }
    1055       file.print " );\n"
    1056      
    1057       file.print "      /* return (MBP130) */\n"
    1058       case ret_type0
    1059       when BoolType
    1060         file.print "    return ret_val ? mrb_true_value() : mrb_false_value();\n"
    1061       when IntType
    1062         file.print "    return mrb_fixnum_value( ret_val );\n"
    1063       when FloatType
    1064         file.print "    return mrb_float_value( mrb, ret_val );\n"
    1065       when VoidType
    1066         file.print "    return  mrb_nil_value();\n"
    1067       else
    1068         raise "unknown type"
    1069       end
    1070 
    1071       file.print "}\n"
    1072     }
    1073   end
    1074 
    1075   def ptrMrb2C file, type, param
    1076     ttype = type.get_type.get_original_type
    1077     tment = get_type_map_ent ttype
    1078     tstr = tment[1]
    1079 =begin
    1080     case ttype
    1081     when IntType
    1082       bit_size = ttype.get_bit_size
    1083       case bit_size
    1084       when -1, -11
    1085         tstr = "Char"
    1086       when 8, 16, 32, 64
    1087         tstr = "Int#{bit_size}"
    1088       when -2
    1089         tstr = "Short"
    1090       when -3
    1091         tstr = "Int"
    1092       when -4
    1093         tstr = "Long"
    1094       when -5
    1095         tstr = "IntPtr"
    1096       else
    1097         raise "not handle type"
    1098       end
    1099     when FloatType
    1100       if ttype.get_bit_size == 32 then
    1101         tstr = "Float32"
    1102       else
    1103         tstr = "Double64"
    1104       end
    1105     when BoolType
    1106       tstr = "Bool"
    1107     when StructType
    1108       raise "not handle type 2 #{ttype}"
    1109     else
    1110       raise "not handle type 2 #{ttype}"
    1111     end
    1112 =end
    1113     if( param.get_size ) then
    1114       sz_str = param.get_size.to_s
    1115     elsif param.get_string then      # mikan とりあえず size_is と string の同時指定 (二重ポインタ) はなし
    1116       sz_str = param.get_string.to_s
    1117     else
    1118       sz_str = "1"
    1119     end
    1120     # unsigned 型の場合には cast が必要
    1121     if ttype.get_original_type.get_type_str != param.get_type.get_type.get_type_str then
    1122       cast_str = "(#{param.get_type.get_type_str})"
    1123     else
    1124       cast_str = ""
    1125     end
    1126 
    1127     modify = ""
    1128     case param.get_direction
    1129     when :OUT, :INOUT
    1130       case tstr
    1131       when "Char", "SChar", "UChar"
    1132         modify = "Mod"
    1133       end
    1134     end
    1135     if param.is_nullable? then
    1136       nullable = "Nullable"
    1137     else
    1138       nullable = ""
    1139     end
    1140 
    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   end
    1145 
    1146   def get_celltype_name
    1147     @celltype_name
    1148   end
    1149 
    1150   #=== プラグイン引数 ignoreUnsigned
    1151   def set_ignoreUnsigned rhs
    1152     if rhs == "true" || rhs == nil then
    1153       @b_ignoreUnsigned = true
    1154     end
    1155   end
    1156   #=== プラグイン引数 include
    1157   def set_include rhs
    1158     funcs = rhs.split ','
    1159     funcs.each{ |rhs_func|
    1160       found = false
    1161       rhs_func.gsub!( /\s/, "" )
    1162       @signature.get_function_head_array.each{ |a|
    1163         if rhs_func.to_sym == a.get_name then
    1164           found = true
    1165         end
    1166       }
    1167       if found == false then
    1168         cdl_error( "MRB1009 include function '$1' not found in signagture '$2'", rhs, @signature.get_name )
    1169       else
    1170         @includes << rhs_func.to_sym
    1171       end
    1172     }
    1173   end
    1174   #=== プラグイン引数 exclude
    1175   def set_exclude rhs
    1176     funcs = rhs.split ','
    1177     funcs.each{ |rhs_func|
    1178       found = false
    1179       rhs_func.gsub!( /\s/, "" )
    1180       @signature.get_function_head_array.each{ |a|
    1181         if rhs_func.to_sym == a.get_name then
    1182           found = true
    1183         end
    1184       }
    1185       if found == false then
    1186         cdl_error( "MRB1010 exclude function '$1' not found in signagture '$2", rhs, @signature.get_name )
    1187       else
    1188         @excludes << rhs_func.to_sym
    1189       end
    1190     }
    1191   end
    119268end
    1193 
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/NotifierPlugin.rb

    r321 r429  
    11# -*- coding: utf-8 -*-
     2#
     3#  TECS Generator
     4#      Generator for TOPPERS Embedded Component System
    25#
    36#  Copyright (C) 2015 by Ushio Laboratory
     
    58#  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
    69#              Graduate School of Information Science, Nagoya Univ., JAPAN
     10#  Copyright (C) 2015-2018 by TOPPERS Project
    711#
     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#++
    844
    945NotifierPluginArgProc = {
     
    3167        #  - 受け口関数 - 一般化を行うと,実行時コストが大きく増大してしまうことが
    3268        #    確認されている.このため,一般化は行わない.EntryPropertyにも含めない.
    33         #  - セルインデックス - CELLIDX型で,型の規定はないが,"ポインタ値であったり
    34         #    整数値あったりする。" (TECS 5.3.6) より,インデックスかポインタある
     69        #  - セルインデックス - CELLIDX型で,型の規定はないが,"ホ゜インタ値て゛あったり
     70        #    整数値て゛あったりする。" (TECS 5.3.6) より,インデックスかポインタある
    3571        #    ことが分かる.インデックスだとすると,この値はセルCBのアドレッシングに
    3672        #    使用されるので,intptr_tに収まる筈である.ポインタの場合,当然intptr_t
     
    5894        #  - アダプタ関数へののポインタ
    5995        #  - アダプタ関数の引数
     96        #
     97        #   $Id$
    6098
    6199        # @private
     
    126164                        # @param [Cell, Symbol] cell セル.セルについて一般化する場合は `:generic`
    127165                        # @param [Integer, Symbol, nil] subscript 添字.添字について一般化する場合は `:generic`
     166                        # @param [Celltype] 呼び先のセルタイプ、cell==:generic の場合のみ有効
    128167                        # @private
    129                         def generate_inner(context, fn_name, cell, subscript)
     168                        def generate_inner(context, fn_name, cell, subscript, callee_ct=nil)
    130169                                source_file = context.source_file
    131170                                header_file = context.header_file
     
    139178                                unless ct.is_singleton?
    140179                                        if cell == :generic
    141                                                 params << "(CELLIDX)extinf"
     180                                                params << "(#{callee_ct.get_global_name}_IDX)extinf"
     181                                                # params << "(CELLIDX)extinf"
    142182                                        else
    143183                                                # セルのCELLIDXを得る
     
    231271
    232272                                                generate_inner context, fn_name,
    233                                                         :generic, subscript
     273                                                        :generic, subscript, ct
    234274
    235275                                                props.each { |prop|
     
    443483            # join:: Join : 結合 (declarationがPortであるもの)
    444484                def validate_join(handler, cell, join)
    445                 return !generate_attr_map(handler, cell).nil?
     485        return !generate_attr_map(handler, cell).nil?
    446486                end
    447487
     
    870910        parse_plugin_arg
    871911        unless @factory
    872                 cdl_error("ASP1003 celltype $1: option factory is not specified",
     912                cdl_error("NTF1003 celltype $1: option factory is not specified",
    873913                        celltype.get_name)
    874914        end
    875915        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",
    877917                        celltype.get_name)
    878918        end
     
    881921    def set_factory(template_string)
    882922        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",
    884924                        celltype.get_name)
    885925        end
     
    889929    def set_factory_output_file(output_file)
    890930        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",
    892932                        celltype.get_name)
    893933        end
     
    896936
    897937    def gen_factory file
    898         puts "===== begin #{@celltype.get_name.to_s} plugin ====="
     938        # puts "===== begin #{@celltype.get_name.to_s} plugin ====="
    899939
    900940        kernelCfg = AppFile.open( "#{$gen}/#{@output_file}" )
     
    920960                        subst_attr = @celltype.find(name)
    921961                        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.",
    923963                                @celltype.get_name, name)
    924964                        end
     
    933973
    934974        kernelCfg.close
    935         puts "===== end #{@celltype.get_name.to_s} plugin ====="
     975        # puts "===== end #{@celltype.get_name.to_s} plugin ====="
    936976    end
    937977
    938978    def gen_factory_for_cell(kernelCfg, cell)
     979      # print "########## gen_factory_for_cell cell=#{cell.get_name}\n"
    939980        handler_flags = []
    940981        handler_args = []
     
    957998                        when 'false' then ignoreErrors = false
    958999                        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",
    9601001                                        cell.get_name, ignoreErrors )
    9611002                                ignoreErrors = false
    9621003                end
    9631004
     1005    # ドメイン指定用文字列
     1006    pre_text  = ""
     1007    post_text = "\n"
     1008    indent    = ""
     1009 
    9641010        [EVENT_HANDLER, ERROR_HANDLER].each { |handler|
    9651011                # 呼び口の結合を取得
    9661012                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
    9671024
    9681025                # ハンドラタイプを判別する
     
    9721029
    9731030                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 )
    9751032                        next
    976                 end
     1033        end
    9771034
    9781035                        # 最初に見つかった有効なハンドラタイプを使用
    9791036                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
    9801086
    9811087                        # 通知ハンドラで「エラーが発生するはずがない」のに「エラーハンドラが指定されている」
     
    9841090                        #  なため、検出は行わない。)
    9851091                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.",
    9871093                                cell.get_name, handler_flag)
    9881094                end
    9891095                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.",
    9911097                                cell.get_name, handler_flag)
    9921098                end
     
    10551161                        # $id$等の置換
    10561162                        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
    10641192
    10651193end
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueRPCPlugin.rb

    r321 r429  
    5656  #=== RPCPlugin の initialize
    5757  #  説明は 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 )
    5959    super
    6060    @b_noClientSemaphore = false
     
    254254    nest = @end_region.gen_region_str_pre file
    255255    nest_str = "  " * nest
     256    if @next_cell_port_subscript then
     257      subscript = '[' + @next_cell_port_subscript.to_s + ']'
     258    else
     259      subscript = ""
     260    end
    256261
    257262    if @serverErrorHandler then
     
    282287#{nest_str}  cell #{@rpc_server_channel_celltype_name} #{@serverChannelCell}_Unmarshaler {
    283288#{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};
    285290#{serverErrorHandler_str}#{nest_str}  };
    286291EOT
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/RPCPlugin.rb

    r321 r429  
    6565  #=== RPCPlugin の initialize
    6666  #  説明は 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 )
    6868    super
    6969    @b_noClientSemaphore = false
     
    197197    nest = @region.gen_region_str_pre file
    198198    indent_str = "  " * nest
     199    if @next_cell_port_subscript then
     200      subscript = '[' + @next_cell_port_subscript.to_s + ']'
     201    else
     202      subscript = ""
     203    end
    199204
    200205    file.print <<EOT
     
    233238    file.print <<EOT
    234239#{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};
    236241#{indent_str}  cTDR         = #{@channelCellName}.eTDR;
    237242#{indent_str}  cEventflag   = #{@channelCellName}.eEventflag;
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedOpaqueRPCPlugin.rb

    r321 r429  
    6868  #=== RPCPlugin の initialize
    6969  #  説明は 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 )
    7171    super
    7272    initialize_opaque_marshaler
     
    221221    nest = @start_region.gen_region_str_pre file
    222222    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
    223229
    224230    # セルを探す
     
    303309#{indent_str}cell #{@unmarshaler_celltype_name} #{@cell_name}_Server {
    304310#{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};
    306312#{ppallocator_join}#{indent_str}};
    307313EOT
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedRPCPlugin.rb

    r321 r429  
    6262  #=== RPCPlugin の initialize
    6363  #  説明は 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 )
    6565
    6666    # mikan プラグインオプション指定の不一致のチェック task_priority,
     
    236236    nest = @region.gen_region_str_pre file
    237237    indent_str = "  " * nest
     238    if @next_cell_port_subscript then
     239      subscript = '[' + @next_cell_port_subscript.to_s + ']'
     240    else
     241      subscript = ""
     242    end
    238243
    239244    # セルを探す
     
    291296    file.print <<EOT
    292297#{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};
    294299#{indent_str}  cTDR         = #{@shared_channel_cell}.eTDR;
    295300#{indent_str}  cEventflag   = #{@shared_channel_cell}.eEventflag;
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ThroughPlugin.rb

    r321 r429  
    4747#@next_cell:: Cell                    呼び口を結合するセル
    4848#@next_cell_port_name:: Symbol       呼び口を結合する受口の名前
     49#@next_cell_port_subscript::Nil|Integer   呼び口を結合する受口の配列添数.受け口配列でない場合 nil
    4950#@signature::      Signature          シグニチャ
    5051#@celltype::       Celltype           呼び先のセルのセルタイプ. through が連接する場合、最終的な呼び先のセルのセルタイプ
     
    7475  #next_cell::      Cell               呼び口を接続するセル
    7576  #next_cell_port_name:: Symbol        呼び口を接続する受口の名前
     77  #next_cell_port_subscript:: Nil|Integer  呼び口を接続する受口配列添数
    7678  #signature::      Signature          シグニチャ
    7779  #celltype::       Celltype           セルタイプ (呼び先のセルのセルタイプ)
    7880  #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 )
    8082    super()
    8183    @cell_name = cell_name                      # 生成すべきセル名(受け口側のセル名)
     
    8385    @next_cell = next_cell                      # 呼び先のセル
    8486    @next_cell_port_name = next_cell_port_name
     87    @next_cell_port_subscript = next_cell_port_subscript
    8588    @signature = signature
    8689    @entry_port_name = :"eThroughEntry"
     
    136139  def get_through_entry_port_name
    137140    @entry_port_name
     141  end
     142
     143  #===  生成されたセルの受け口配列添数を得る
     144  def get_through_entry_port_subscript
     145    @entry_port_subscript
    138146  end
    139147
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TracePlugin.rb

    r321 r429  
    4444  #=== TracePlugin の initialize
    4545  #  説明は 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 )
    4747
    4848    @maxArrayDisplay = 16
     
    141141      nest = @region.gen_region_str_pre file
    142142      indent_str =  "  " * nest
     143      if @next_cell_port_subscript then
     144        subscript = '[' + @next_cell_port_subscript.to_s + ']'
     145      else
     146        subscript = ""
     147      end
    143148
    144149      if @probeName then
     
    155160      file.print <<EOT
    156161#{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};
    158163#{probeName_str}#{caller_cell_str}#{indent_str}};
    159164EOT
     
    210215    }
    211216    file.print( " );\n" )
     217    if @next_cell_port_subscript then
     218      subscript = '[' + @next_cell_port_subscript.to_s + ']'
     219    else
     220      subscript = ""
     221    end
    212222
    213223    file.print <<EOT
    214224\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 );
    216226EOT
    217227
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenOpaqueMarshaler.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    464464        /* Channel Lock */
    465465        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        }
    468470EOT
    469471
     
    554556        /* Channel Unlock */
    555557        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        }
     562EOT
     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_;
    558568EOT
    559569
     
    630640        file.print <<EOT
    631641        }else{
    632                 return;
     642                return E_ID;
    633643        }
    634644EOT
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenTransparentMarshaler.rb

    r321 r429  
    388388    };
    389389#{ppallocator_dealloc_str}
    390     return;
     390    return E_OK;
    391391
    392392error_reset:
     
    394394        (void)cTDR_reset();
    395395#{ppallocator_dealloc_str}
     396    return E_OK;
    396397EOT
    397398
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/version.rb

    r321 r429  
    11$package = "tecsgen"
    2 $version = "1.3.1.5"
     2$version = "1.6.4"
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge.rb

    r321 r429  
    66#      Merger for TECS generated templates
    77
    8 #   Copyright (C) 2008-2015 by TOPPERS Project
     8#   Copyright (C) 2008-2017 by TOPPERS Project
    99#--
    1010#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3737#   の責任を負わない.
    3838
    39 #   $Id$
     39#   $Id: tecsmerge.rb 2633 2017-04-02 06:02:05Z okuma-top $
    4040#++
    4141
     
    4444#Authors::   大山 博司
    4545#Version::   
    46 #Copyright:: Copyright (C) TOPPERS Project, 2008-2015. All rights reserved.
     46#Copyright:: Copyright (C) TOPPERS Project, 2008-2017. All rights reserved.
    4747#License::   TOPPERS ライセンスに準拠
    4848
     
    285285
    286286        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
    287292
    288293        # p "R: #{stat_info[0]}"
Note: See TracChangeset for help on using the changeset viewer.