From: Clifford Heath Date: 2008-02-04T05:24:58+09:00 Subject: Re: Treetop: Can the parser be put inside a module? Chiyuan Zhang wrote: > I'm wondering if Treetop can provide (or is it already have?) a > mechanize like this: > > module MyModule > Treetop.load("my") > end > so that I'll get a MyModule::MyParser instead of a top-level MyParser. The Treetop meta-grammar allows you to define your grammar inside a module, even more than one level. The parser will be emitted inside a module of the same name. module MyModule grammar MyLang rule top ... end end end Clifford Heath