chomsky

Another language grammar parser
Download

chomsky Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Colin Thomas-Arnold
  • Publisher web site:
  • https://github.com/colinta/

chomsky Tags


chomsky Description

chomsky is yet another language grammar parser, inspired by modgrammar and pyparsing.Developer commentsI needed a language grammar parser for the plywood_ project, and modgrammar_ looked like it would be perfect, except I couldn't get the simplest of grammars to work. pyparsing_ is excellent, but doesn't give me objects back, only lists and strings - I need more than that. I would recommend pyparsing_ for *your* project. Unless you really want objects, or if you are doing a language (chomsky_ has lots of built-in stuff for making programming language grammars).Besides, I like writing parsers, and I know how I want this one to work, so screw it, I'll do it myself!INSTALLATION pip install chomskyUSAGEMatchers``Matcher`` objects are the most basic building blocks. They are not smart,they return only strings and lists, and they make no assumptions about what youmight be trying to build. For instance, the ``Word`` Matcher does not assumethat you want to consume whitespace.``Matcher`` objects are great for building a small parsing language forconsistent data, where ``Grammar`` objects are not needed. But for building alanguage parser, you will probably use the more heavy-duty Grammar buildingblocks.Product's homepage


chomsky Related Software