From: Lex Williams Date: 2008-08-28T02:44:40+09:00 Subject: Treetop question Hi guys ! I started to learn to use treetop , so I would have a question : if I create a grammar this way : grammar Tester rule basic ([a-f] [a-f] [a-f] [a-f] [a-f]) { def val text_value end } end end and use it in the following code : require "rubygems" require "treetop" Treetop.load "tester" parser = TesterParser.new puts parser.parse("abcde").val I get the following error : x.rb:6: undefined method `val' for # (NoMethodError) . However , if I replace this : ([a-f] [a-f] [a-f] [a-f] [a-f]) with ([a-f] [a-f] [a-f] [a-f] [a-f] / '') then everything works . Could you explain why this happens ? -- Posted via http://www.ruby-forum.com/.