New parser #1

Merged
merged 31 commits into from Mar 28, 2013

Projects

None yet

3 participants

@dirk
Collaborator
dirk commented Mar 27, 2013

Includes (hopefully) more robust handling of the syntax, especially nesting and the hierarchy of blocks/elements. Also parsing of standard and simple tables (albeit without colspan or rowspan capability) and line blocks. Probably a few other things I've forgotten about too.

@ethnt

I'd actually use case and when here instead of if and elsif, since you're just checking test_line. Use different conditionals for the next line of text, since it's checking a different set of data.

@ethnt

Since this file is so big, maybe consider making a Handler class, so you could call Handle.bullet_list and so on. It would certainly clean this file up. Even better, give each one its own file in lib/burst/handlers/.

Owner
dirk replied Mar 24, 2013

Oooh... I like that idea. And with Parser now providing unshift and shift there is an external API for handlers to work with instead of manipulating the parser's instance variables directly.

@ethnt
ethnt commented on 35e2b18 Mar 24, 2013

I know that this file isn't complete, but I'd just work on white space. It is pretty readable already, but #slurp is pretty condensed.

@jm
Owner
jm commented Mar 28, 2013

Merging this now because it's amazing. Any tweaks you want to make, feel free to push to this repo (I added you as a collaborator). 👍

@jm jm merged commit 2b762f6 into jm:master Mar 28, 2013
@dirk
Collaborator
dirk commented Mar 28, 2013

Okay sweet! Any specific features/specification-sections that you'd like to see implemented?

@jm
Owner
jm commented Mar 28, 2013

I know that the directive things are numerous and important. There were like 20-30 of them if I recall. I'm going to start doing some render tests this week to compare the results of what we use now with what we're producing here and will have some more specific recommendations.

@dirk
Collaborator
dirk commented Mar 28, 2013

Sounds good. I'll work on directive coverage and header hierarchy tomorrow (not sure how the reference parser does it, but knowing them it's sure to be... interesting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment