i'm playing around idea of creating simple dsl creating test data against api. let's api has unicycles, wheels, , seats.
i'd write:
show unicycle # lists unicycles new unicycle # creates new unicycle, assumes new wheel needs creation new unicycle new wheel # more explicit version of above new unicycle wheel 123 # new unicycle using specific wheel same idea goes seats , on. underneath map simple crud calls. overkill use treetop, parslet, citrus, etc job this? easier regex parsing? or there alternative?
i've written few simple , few complex parsers treetop , it. know nothing parslet. aside fact have spend time learn how use it, don't see of downside using treetop type of purpose you've described. i'd using regexes themselves, you'll end building lot of structure treetop provides within framework.
one alternative comes mind: depending on how simple complete grammar statements want create , if aren't wedded natural language, implement functionality of you've shown far thor.
let me know if have other questions.
Comments
Post a Comment