source: azure_iot_hub/trunk/asp3_dcre/tecsgen/tecsgen.rb@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby
File size: 22.1 KB
Line 
1#!/usr/bin/env ruby
2# -*- coding: utf-8 -*-
3#
4# TECS Generator
5# Generator for TOPPERS Embedded Component System
6#
7# Copyright (C) 2008-2019 by TOPPERS Project
8#--
9# 上記著作権者
10は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
11# ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
12# 変・再é…
13å¸ƒï¼ˆä»¥ä¸‹ï¼Œåˆ©ç”¨ã¨å‘¼ã¶ï¼‰ã™ã‚‹ã“とを無償で許諾する.
14# (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
15# 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
16# スコード中に含まれていること.
17# (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
18# 用できる形で再é…
19å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œå†é…
20å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨
21# 者
22マニュアルなど)に,上記の著作権表示,この利用条件および下記
23# の無保証規定を掲載すること.
24# (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
25# 用できない形で再é…
26å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œæ¬¡ã®ã„ずれかの条件を満たすこ
27# と.
28# (a) 再é…
29å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨è€…
30マニュアルなど)に,上記の著
31# 作権表示,この利用条件および下記の無保証規定を掲載すること.
32# (b) 再é…
33å¸ƒã®å½¢æ…
34‹ã‚’,別に定める方法によって,TOPPERSプロジェクトに
35# 報告すること.
36# (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
37# 害からも,上記著作権者
38およびTOPPERSプロジェクトをå…
39è²¬ã™ã‚‹ã“と.
40# また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
41# 由に基づく請求からも,上記著作権者
42およびTOPPERSプロジェクトを
43# å…
44è²¬ã™ã‚‹ã“と.
45#
46# 本ソフトウェアは,無保証で提供されているものである.上記著作権者
47お
48# よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
49# に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
50# アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
51# の責任を負わない.
52#
53# $Id$
54#++
55
56#= tecsgen : TECS のジェネレータ
57#
58#Authors:: 石川 拓也(HRP2Plugin)
59#Authors:: 原  拓(動的結合仕様)
60#Authors:: 河田 智明(NotifierPlugin)
61#Authors:: 高田 広章(ASP3 への TECS 組込み)
62#Authors:: 高木 信尚(ランタイムヘッダ)
63#Authors:: 成瀬 有美(TECS flow 実装
64)
65#Authors:: 鵜飼 敬幸(ATK1Plugin)
66#Authors:: 大山 博司(ジェネレータ実装
67, RPCPlugin, TracePlugin, MrubyBridgePlugin)
68#Authors:: 山本 将也(ジェネレータ初期プロトタイプ実装
69)
70#Authors:: 小南 靖雄(テストコードの一部)
71#Authors:: 安積 卓也(ASP+TECS, EV3RT+TECS, mruby on TECS等実装
72)
73# Authors list is in i-ro-ha order.
74#Version:: see version.rb
75$Copyright = "Copyright(c) 2008-2019, TOPPERS project. All rights reserved."
76$License = "TOPPERS License"
77
78# This doesn't work as expected in exerb version (Ruby 1.8.7?)
79$tecsgen_base_path = File.dirname( File.expand_path __FILE__ )
80
81
82###
83#= Array initializer の '{', '}' で囲まれた場合
84# mikan AggregateInitializer など、クラスを変更すべきである
85class Array
86 #=== CDL の文字列を生成する
87 def to_CDL_str
88 str = '{ '
89 delim = ''
90 self.each{ |v|
91 str += delim + v.to_CDL_str
92 delim = ', '
93 }
94 str += ' }'
95 return str
96 end
97
98 def show_tree( indent )
99 indent.times{ print " " }
100 print( "Array\n" )
101 self.each{ |m|
102 m.show_tree( indent+1 )
103 }
104 end
105end
106
107#=== RUBY ライブラリをロードする
108#
109# -L, $RUBYLIB, システム(/usr/lib/rub..など) の順にサーチが行われる
110# exerb 対応のため、上記パスにファイルが見つからない場合 require を実行してみる
111#
112# プラグインの場合は b_fatal = false を指定。ファイルがなくてもエラー出力後、処理続行
113# b_fatal = false の場合 tecslib/core がサーチパスに追加される
114#RETURN::Bool : true=成功、 false=失敗 失敗した場合、Generator.error は呼びå…
115ƒã§å‡ºåŠ›ã™ã‚‹
116def require_tecsgen_lib( fname, b_fatal = true )
117 dbgPrint( "require_lib: #{fname}\n")
118 set_kcode $KCODE_TECSGEN
119 begin
120 b_require = false
121 b_exception = false
122
123 # -L 、 $RUBYLIB で指定されたパスおよびシステムのパスからサーチ
124 # exerb では $LOAD_PATH は ["."] のみå…
125¥ã£ã¦ã„るようだ
126 ($library_path+$LOAD_PATH).each{ |path|
127 [ "", "tecslib/plugin/" ].each { |lp|
128 lib = File.expand_path( path ) + '/' + lp + fname
129
130 if File.exist? lib then # ファイル存否と他のエラーを区別するため存在確認をする
131 begin
132 require( lib )
133 b_require = true
134 rescue Exception => evar
135 b_exception = true
136 print_exception( evar )
137 end
138 break
139 end
140 }
141 if b_require then
142 break
143 end
144 }
145
146 if b_require == false && b_exception == false then
147 # exerb 対応 "." をサーチパスの最初に加える
148 # "tecslib/" は RPCPlugin.rb, TracePlugin.rb のために用意してある
149 # RPCPlugin.rb, TracePlugin.rb が tecslib 下でなければ不要になるが、このようにしておく
150 ["","tecslib/plugin/"].each{ |lp|
151 path = lp + fname
152 begin
153 require path
154 return true
155 rescue LoadError => e
156 # p "LoadError to load #{fname}"
157 # 2015.12.18 exerb 版でプラグインのロードでエラーが出るので、無視する. おそらく昔からエラーは出ていた
158 # print_exception( e )
159 rescue Exception => e
160 b_exception = true
161 # 文法エラーなどが発生
162 print_exception( e )
163 break
164 end
165 }
166 end
167
168 if b_require == false then
169 # 見つからなかった
170 if b_exception == false then
171 STDERR << "tecsgen: Fail to load #{fname}. Check $RUBYLIB environment variable or -L option\n"
172 end
173 # tecsgen を構成するファイルの場合は中止する
174 if b_fatal then
175 STDERR << "tecsgen: Exit because of unrecoverble error\n"
176 exit 1
177 end
178 return false
179 end
180 return true
181 ensure
182 # $KCODE を CDL の文字コードに戻しておく
183 set_kcode $KCODE_CDL
184 end
185end
186
187#=== 例外の表示
188#evar:: Exception
189def print_exception( evar )
190# もしスタックトレースが出るまでい時間がかかるようならば、次をコメントアウトしてみるべし
191 print "*** Begin Ruby exception message ***\n"
192 puts( evar.to_s )
193
194 if $debug then
195 puts "#### stack trace ####"
196 pp evar.backtrace
197 end
198 print "*** End Ruby exception message ***\n"
199end
200
201def dbgPrint( str )
202 if $debug then
203 print str
204 end
205end
206
207def dbgPrintf( *param )
208 if $debug then
209 printf *param
210 end
211end
212
213#=== エラーおよび警告のレポート
214def print_report
215 msg = nil
216
217 if Generator.get_n_error != 0 then
218 msg = "#{Generator.get_n_error} error"
219 msg = "#{msg}s" if Generator.get_n_error >= 2
220 end
221
222 if Generator.get_n_warning != 0 then
223 msg = "#{msg} " if msg
224 msg = "#{msg}#{Generator.get_n_warning} warning"
225 msg = "#{msg}s" if Generator.get_n_warning >= 2
226 end
227
228 puts msg if msg
229end
230
231#=== $KCODE を設定
232def set_kcode kcode
233 if ! $b_no_kcode then
234 $KCODE = kcode
235 end
236end
237#----- class TECSGEN -------#
238class TECSGEN
239
240 @@current_tecsgen = nil
241
242 def self.init( addtional_option_parser = nil )
243 initialize_global_var
244 analyze_option addtional_option_parser
245 load_modules
246 if ! $TECSFLOW then
247 setup
248 end
249
250 dbgPrint "tecspath: #{$tecsgen_base_path}, __FILE__=#{__FILE__}\n"
251 dbgPrint "ARGV(remained): #{ARGV}, argments=#{$arguments}\n"
252 end
253
254 #----- initialize -------#
255 def initialize
256 @cell_list = nil
257 @cell_list2 = nil
258 @celltype_list = nil
259 @root_namespace = nil
260
261 #--- obsolete ---# replaced to TOOL_INFO
262 @cell_location_list = []
263 @join_location_list = []
264 end
265
266 def run1
267 @@current_tecsgen = self
268
269 syntax_analisys ARGV
270 semantics_analisys_1
271 semantics_analisys_2
272
273 @celltype_list = Celltype.get_celltype_list
274 @cell_list = Cell.get_cell_list
275 @cell_list2 = Cell.get_cell_list2
276
277 @@current_tecsgen = nil
278 end
279
280 def run2
281 @@current_tecsgen = self
282
283 optimize_and_generate
284 finalize
285
286 @@current_tecsgen = nil
287 end
288
289 #----- initialize_global_var -----#
290 def self.initialize_global_var
291
292 require 'optparse'
293 #2.0 require 'runit/assert.rb'
294 require 'kconv'
295 $b_no_kcode = RUBY_VERSION >= "1.9.0" ? true : false
296 # Use Ruby 1.9 M17N code (use Ruby 1.8 code if false).
297 if ! $b_no_kcode then
298 require 'jcode'
299 end
300 require 'pp'
301 # include RUNIT::Assert
302
303 ### グローバル変数定義 ###
304
305 # コマンドライン引数  (Makefile.templ へ出力)
306 $arguments = ""
307 ARGV.each { |a| $arguments += " " + a }
308
309 $unopt = false # bool: disable optimizing both call and entry port
310 $unopt_entry= false # bool: disable optimizing entry port
311 $gen_base = "gen" # string: folder path to place generated files
312 $gen = $gen_base # string: folder path to place generated files
313 $generate_all_template = false # bool: generarete template files for all celltypes (if non cell exist or system celltypes)
314 $generate_no_template = false # bool: generarete no template file (neither celltype code nor Makefile)
315 $idx_is_id = false # bool: all components are idx_is_id
316 $unique_id = false # bool: assign unique id to each cell (otherwise begin from 1 for each celltype)
317 $debug = false # bool: tecsgen debug message
318 $dryrun = false # bool: dryrun mode: syntax is checked, but not generate any files
319 $show_tree = false # bool: show parsing tree
320 $verbose = false # bool: verbose mode: show some messages
321 $yydebug = false # bool: yydebug: parser debug mode (need bnf-deb.tab.rb)
322 $run_dir = Dir.pwd # string: tecsgen/tecscde start up directory
323 $base_dir = { } # string=>bool: base dir for import_path (key:base_dir, val:actually used or specified directly)
324 $import_path = [ "." ] # string array : import/import_C path
325 $import_path_opt = [] # [String]
326 $library_path = [ $tecsgen_base_path ] # string array : path to dir where tecsgen.rb placed
327 $define = [ ] # string array : define
328 $ram_initializer = false # bool: generate ram initializer
329 $region_list = {} #string array : region path which is generated
330 $generating_region = nil # Region: Region to optimisze & generate code # コマンドラインオプションではない
331 # Cell#is_generate? にて参ç…
332§ã•ã‚Œã‚‹
333 $unit_test = false # bool: unit test verification
334 $kcode = nil # nil | String: Kanji code type "euc"|"sjis"|"none"|"utf8"
335 $force_overwrite = false # bool: force overwrite all files if file contents not differ
336 $no_banner = false # bool: not print banner
337 $print_version = false # bool: print version
338 $target = "tecs" # String: target name, ARGV[0] から再設定する("tecs" は仮のターゲット)
339 $no_default_import_path = false # bool: no default import path
340 $c_suffix = "c" # suffix for C progorams (for C++ source)
341 $h_suffix = "h" # suffix for C progoram headers (for C++ source)
342
343 if ENV['TECSGEN_DEFAULT_RAM'] then
344 rom_ram_defalult = "ram"
345 else
346 rom_ram_defalult = "rom"
347 end
348 if rom_ram_defalult == "rom" then
349 $rom = true # bool: ROM support : generate CB separately
350 else
351 $rom = false # bool: ROM support : generate CB separately
352 end
353 $b_cpp_specified = false
354 if $cpp == nil then
355 $cpp = "gcc -E -DTECSGEN"
356 end
357 if ENV[ 'TECS_CPP' ]then
358 $cpp = ENV[ 'TECS_CPP' ]
359 $b_cpp_specified = true
360 end
361 if ENV[ 'TECSPATH' ] then
362 $tecspath = ENV[ 'TECSPATH' ]
363 else
364 $tecspath = "#{$tecsgen_base_path}/tecs"
365 end
366
367 # # 文字コードの設定
368 if $IN_EXERB then
369 # KCODE_CDL, $KCONV_CDL を仮に設定する (tecs_lang.rb ですぐに再設定される)
370 $KCODE_CDL = "SJIS" # string: "EUC" | "SJIS" | "NONE" | "UTF8"
371 $KCONV_CDL = Kconv::SJIS # const: NONE には ASCII を対応させる
372 else
373 $KCODE_CDL = "EUC" # string: "EUC" | "SJIS" | "NONE" | "UTF8"
374 $KCONV_CDL = Kconv::EUC # const: NONE には ASCII を対応させる
375 end
376 # $KCODE_TECSGEN, $KCONV_TECSGEN を仮に設定する (tecs_lang.rb ですぐに再設定される)
377 $KCODE_TECSGEN = "UTF8" # string: "EUC" このファイルの文字コード(オプションではなく定数)
378 $KCONV_TECSGEN = Kconv::UTF8 # const:
379 set_kcode( $KCODE_TECSGEN ) # このファイルの文字コードを設定
380
381 end # initialize_global_var
382
383 def self.analyze_option( additional_option_parser )
384
385 ### tecsgen コマンドオプション解析 ###
386 ARGV.options {|parser|
387 parser.banner = "Usage: tecsgen [options] files"
388 parser.on('-D', '--define=def', 'define cpp symbol for import_C') { |define|
389 $define << define
390 }
391 parser.on('-G', '--generate-region=path', 'generate region') { |path|
392 if path =~ /^::/ then
393 gen_path = path
394 else
395 gen_path = "::" + path
396 end
397 $region_list[ gen_path ] = true
398 }
399 parser.on('-I', '--import-path=path', 'imoprt/import_C path') { |path|
400 $import_path << path
401 $import_path_opt << path
402 }
403 parser.on('-L', '--library-path=path', 'path to dir where tecsgen.rb (obsolete, unnecessary to specify -L, those passes are gotten from tecsgen.rb') { |path|
404 $library_path << path
405 }
406 parser.on('-R', '--RAM-initializer', 'generate RAM initializer. INITIALIZE_TECS() must be called before running any TECS code.' ){
407 $ram_initializer = true
408 }
409 parser.on('-U', '--unoptimize', 'unoptimize') {
410 $unopt = true
411 }
412 parser.on('--unoptimize-entry', 'unoptimize entry port') {
413 $unopt_entry = true
414 }
415 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' ){
416 |arg|
417 $cpp = arg
418 $b_cpp_specified = true
419 }
420 parser.on('-d', '--dryrun', 'dryrun' ){
421 $dryrun = true
422 }
423 parser.on('-f', '--force-overwrite', 'force overwrite all files') {
424 $force_overwrite = true
425 }
426 parser.on('-g', '--gen=dir', 'generate dir') { |dir|
427 $gen = $gen_base = dir
428 }
429 parser.on('-i', '--idx_is_id', 'set idx_is_id to all celltypes') {
430 $idx_is_id = true
431 }
432 # parser.on('-k', '--kcode=code', 'set kanji code: euc|sjis|none|utf8, none is default') { |code|
433 parser.on('-k', '--kcode=code', "set kanji code: euc|sjis|none|utf8") { |code|
434 $kcode = code
435 }
436 # old_mode は V1.0.C.22 で廃止
437 # parser.on('-o', '--old-mode', 'old mode' ){
438 # $old_mode = true
439 # }
440 parser.on('-r', '--ram', 'RAM only' ){
441 $rom = false
442 }
443 parser.on('-s', '--show-tree', 'show parsing tree' ){
444 $show_tree = true
445 }
446 parser.on('-t', '--generator-debug', 'generator debug' ){
447 $debug = true
448 $verbose = true
449 }
450 parser.on('-u', '--unique-id', 'assign unique id for each cell' ){
451 $unique_id = true
452 }
453 parser.on('-v', '--verbose', 'verbose mode' ){
454 $verbose = true
455 }
456 parser.on('-y', '--yydebug', 'yydebug' ){
457 $yydebug = true
458 }
459 parser.on( '--no-banner', 'not display banner') {
460 $no_banner = true
461 }
462 parser.on( '--version', 'print version') {
463 $print_version = true
464 }
465 parser.on( '--unit-test', 'unit verification (test tecsgen itself)') {
466 $unit_test = true
467 }
468 parser.on( '--generate-all-template', 'generate all celltypes\' templates') {
469 $generate_all_template = true
470 }
471 parser.on( '--generate-no-template', 'generate no template') {
472 $generate_no_template = true
473 }
474 parser.on( '--no-default-import-path', 'no default import path' ){
475 $no_default_import_path = true
476 }
477 parser.on( '--c-suffix=c', 'C program suffix (default: c)' ){
478 | suffix |
479 $c_suffix = suffix
480 }
481 parser.on( '--h-suffix=h', 'C program header suffix (default: h)' ){
482 | suffix |
483 $h_suffix = suffix
484 }
485 # parser.on( '--include_path_opt_format', 'cpp include path option format, default: "-I %s"' ){
486 # }
487 parser.version = #{$version}
488 parser.release = nil
489 if additional_option_parser
490 additional_option_parser.call( parser )
491 end
492 parser.parse!
493 }
494
495 if ARGV.empty? && ! $print_version && ! $unit_test && ! $TECSFLOW
496 ARGV.options{|parser|
497 puts parser.help
498 exit 1
499 }
500 end
501
502 end # analyze_option
503
504 def self.load_modules
505 ### tecsgen モジュールのロード ####
506 # -L でパス指定可能としたため、ここからロードを開始する
507
508 # tecsgen バージョンファイルのロード
509 # これを実行するまで tecsgen のバージョンを表示できない
510 # このファイルを誤って読み込むと、異なるバージョン名を表示してしまう
511 require_tecsgen_lib 'tecslib/version.rb'
512 if $title then
513 STDERR << "#{$title} version #{$tool_version} (tecsgen version #{$version}) #{$Copyright}\n"
514 elsif ! $no_banner || $print_version
515 STDERR << "tecsgen version #{$version} #{$Copyright}\n"
516 end
517 if $verbose then
518 STDERR << "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]\n"
519 end
520 if $print_version && ARGV.empty? && ! $TECSFLOW
521 exit
522 end
523
524 # 文字コード決定のため最初に読みこむ
525 require_tecsgen_lib 'tecslib/core/tecs_lang.rb'
526
527 unless $yydebug then
528 require_tecsgen_lib 'tecslib/core/bnf.tab.rb'
529 else
530 require_tecsgen_lib 'tecslib/core/bnf-deb.tab.rb'
531 end
532
533 # syntaxobj.rb には Node が定義されているので、早い段階で require
534 require_tecsgen_lib 'tecslib/core/syntaxobj.rb'
535 require_tecsgen_lib 'tecslib/core/pluginModule.rb'
536 require_tecsgen_lib 'tecslib/core/plugin.rb'
537 require_tecsgen_lib 'tecslib/core/messages.rb'
538 require_tecsgen_lib 'tecslib/core/types.rb'
539 require_tecsgen_lib 'tecslib/core/value.rb'
540 require_tecsgen_lib 'tecslib/core/componentobj.rb'
541 require_tecsgen_lib 'tecslib/core/expression.rb'
542 require_tecsgen_lib 'tecslib/core/optimize.rb'
543 require_tecsgen_lib 'tecslib/core/tecsgen.rb'
544 require_tecsgen_lib 'tecslib/core/generate.rb'
545 require_tecsgen_lib 'tecslib/core/gen_xml.rb'
546 require_tecsgen_lib 'tecslib/core/tool_info.rb'
547 require_tecsgen_lib 'tecslib/core/tecsinfo.rb'
548 require_tecsgen_lib 'tecslib/core/unjoin_plugin.rb'
549 require_tecsgen_lib 'tecslib/plugin/CelltypePlugin.rb'
550 require_tecsgen_lib 'tecslib/plugin/CompositePlugin.rb'
551 require_tecsgen_lib 'tecslib/plugin/CellPlugin.rb'
552 require_tecsgen_lib 'tecslib/plugin/SignaturePlugin.rb'
553 require_tecsgen_lib 'tecslib/plugin/ThroughPlugin.rb'
554 require_tecsgen_lib 'tecslib/plugin/DomainPlugin.rb'
555 require_tecsgen_lib 'tecslib/plugin/MultiPlugin.rb'
556
557 # C 言語パーサ
558 require_tecsgen_lib 'tecslib/core/C_parser.tab.rb'
559 require_tecsgen_lib 'tecslib/core/ctypes.rb'
560
561 if $unit_test then
562 exit 1
563 end
564
565 end # load_modules
566
567 def self.setup
568 # $import_path, $tecspath を調整
569 TECSGEN.adjust_exerb_path
570
571 # $import_path に環境変数 $TECSGEN およびその直下を追加
572 if $no_default_import_path == false then
573 # $TECSGEN および、その直下のディレクトリをパスに追加
574 if $tecspath != "." then
575 TECSGEN.add_import_path $tecspath
576 dir = nil
577 begin
578 Dir.foreach( $tecspath ){ |f|
579 if f != "." && f != ".." && File.directory?( $tecspath + '/' + f ) then
580 TECSGEN.add_import_path( $tecspath + '/' + f )
581 end
582 }
583 rescue
584 # 無視
585 end
586 end
587 end
588
589 # デフォルト設定
590 TECSGEN.set_default_config
591
592 # $target の設定
593 $target = ARGV[0]
594 pos = $target.rindex( /[:\\\/]/ )
595 if pos then
596 $target = $target[pos+1..-1] # ディレクトリ区切りを除いた文字列
597 end
598 pos = $target.rindex( /\./ )
599 if pos then
600 $target = $target[0..pos-1] # 拡張子を取り除いた文字列
601 end
602
603 # gen ディレクトリの作成
604 begin
605 if ! File.directory?( $gen_base ) then
606 Dir.mkdir( $gen_base )
607 end
608 rescue
609 print( "Cannot mkdir #{$gen_base}. If the path has hierarchy, please create directory by manual.\n" )
610 exit 1
611 end
612 end # setup
613
614 #=== TECSGEN#get_celltype_list
615 def get_celltype_list
616 @celltype_list
617 end
618
619 #=== TECSGEN#get_cell_list
620 def get_cell_list
621 @cell_list
622 end
623
624 def get_root_namespace
625 @root_namespace
626 end
627end # TECSGEN
628
629# 複数のジェネレータインスタンスを生成することは、可能だが、以下の問題がある
630# クラス変数のリセットを確実に行う必
631要がある
632
633if $TECSCDE != true && $TECSFLOW != true then
634 begin
635 TECSGEN.init
636 tecsgen = TECSGEN.new
637 tecsgen.run1
638 tecsgen.run2
639 tecsgen.dump_tecsgen_rbdmp
640 rescue => evar
641 print_exception( evar )
642 STDERR << "tecsgen: exit because of unrecoverble error.\n"
643 STDERR << " please retry after resolve early error.\n"
644 STDERR << " if no error has occured, please report to TOPPERS TECS WG (users@toppers.jp or com-wg@toppers.jp).\n"
645 exit 1
646 end
647end
Note: See TracBrowser for help on using the repository browser.