apiaryio/snowcrash — pull request #203 by zdne (2014-09-15 19:03:40+00:00)
Title: New parser architecture.

Closes #114. This PR introduced new parser architecture on our way to proposed [Parser Components](https://github.com/apiaryio/snowcrash/wiki/Parser-Components).

This PR separates Markdown-AST producing into a standalone library – [Markdown Parser](https://github.com/apiaryio/markdown-parser).

## Concept
Snow Crash parser uses the Markdown Parser to parse the input Markdown buffer and thus create Markdown AST. This tree is then processed by the Snow Crash. The processing of the Markdown AST tree is done traversing the tree "top-down" splitting the concerns into [API Blueprint section](https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md#def-blueprint-section)-specific processors (`SectionProcessor`).

All of the section processors have uniform interface invoked by the `SectionParser::parse()` routine. This routine uses processor's specific "adapters" (e.g. `HeaderSectionAdapter` or `ListSectionAdapter`) to iterate over different Markdown structures. The parser in conjunction with processors produces the out blueprint AST as defined in [Blueprint.h](src/Blueprint.h).

---

Related links:

- [GitHub: Refactor Regression Issues Milestone](https://github.com/apiaryio/snowcrash/milestones/Refactor%20Regression%20Issues)
- [GitHub: Refactor Progress](https://github.com/apiaryio/snowcrash/wiki/Refactor-Progress)
- [Trello: Product – Parser Architecture Refactor](https://trello.com/c/Yd4S7lcq/67-parser-architecture-refactor)
- [Trello: Project – Snow Crash Refactor](https://trello.com/c/RcdTX9Dy/1657-snow-crash-refactor)
- [Trello: Regression Tests](https://trello.com/c/ahJn7lxB/1826-run-regression-tests-on-production)
- [Gist: Parser Architecture Concept](https://gist.github.com/zdne/55b7a38f52ca642e123b)