I\'m trying to break open a Packages.gz using Ruby\'s treetop and I\'ve having trouble making keywords and values unambiguous. Here\'s my treetop grammar:
I\'m trying to use Treetop to parse an ERB开发者_开发百科 file.I need to be able to handle lines like the following:
I am writing a small, really simple lisp parser in ruby with the treetop gem just to experiment with it. However, it is not really working out how I want it to, and the documentation is pretty poor so
I have this spec: it \'can parse armies with only section headers\' do list = <<-LIST :Core :Special
I\'m trying to get the basic of Treetop parsing. Here\'s a开发者_如何学编程 very simple bit of grammar so that I can say ArithmeticParser.parse(\'2+2\').value == 4.
Is it possibe to skip a rule by validating it using ruby code in treetop? Say there is somethi开发者_如何转开发ng like this:
I have a bunch of data in (what i think is) a tcl array. Basically it\'s in the form of {a {b c} d {e f} g}. It\'s only nested one deep, but isn\'t always nested, that is to say, a may just be a or it