Sha256: deaea8498863099441319e970494b3f14f21c24bce0a5f8c09f2c981619f501a
Contents?: true
Size: 499 Bytes
Versions: 5
Compression:
Stored size: 499 Bytes
Contents
########################### # cstest.rb (use rp5 run .. # test of cs_grammar library ########################### load_library 'cs_grammar' def setup size 150, 250 background 0 fill(200, 200, 0) f = create_font('Arial', 16, true) text_font(f) (0 .. 7).each do |i| grammar = Grammar.new( 'baaaaaa', { 'b<a' => 'b', # context sensitive rule replace a when preceded by b 'b' =>'a' } ) text grammar.generate(i), 30, i * 25 end end
Version data entries
5 entries across 5 versions & 1 rubygems