Initial import.
[vtparse.git] / vtparse_check_tables.rb
blob2bfa1224e4b875d2172de7cc2b6cc039e7c90aef
2 require 'vtparse_tables'
5 # check that for every state, there is a transition defined
6 # for every character between 0 and A0.
9 table = {}
11 anywhere_array = expand_ranges($states[:ANYWHERE])
13 $state_tables.each { |state, table|
14     next if state == :ANYWHERE
16     table.each_with_index { |val, i|
17         if not (val or $state_tables[:ANYWHERE][i])
18             raise "No transition defined from state #{state}, char 0x#{i.to_s(16)}!"
19         end
20     }
23 puts "Tables had all necessary transitions defined."