Skip to content

Releases: johnsiilver/halfpike

Fix issue with EOF parsing

14 Aug 18:23
Compare
Choose a tag to compare
Pre-release

Seems like I had a bug with parsing when we didn't have a blank line when we reached EOF.

That didn't seem to be much of a problem when using halfpike to lex/parse something like a router config, where you are sweeping over a lot of details. But when using it to parse an IDL language where every character is important, this was a problem.

So, we'd have something like this:

{
  a: "b"
}```

The last line would emit Item{Type: ItemEOF, Val: "}"}, when it should emit two values, one of ItemText and one of ItemEOF.

Also, I was doing some weird stuff with EOF.  There is no EOF character in UTF-8, we simply know how large the file is.  Because the lexer is run based, I was emitting a character to signal EOF. That character was not good, so I'm using the control character now of '\x01'.  But I was also emitting that character in Raw in some places. I've stopped doing that, as that isn't real.  

Left a debug line in

07 Jul 00:32
Compare
Choose a tag to compare
Left a debug line in Pre-release
Pre-release

Puts out a bunch of annoying character.

Bug regression fix

07 Jul 00:27
Compare
Choose a tag to compare
Bug regression fix Pre-release
Pre-release

Had a bug where a Line.Raw might start with \n if the line before it was a blank line. Since we don't want that, chopping it off in the lexer before the Item gets sent along for parsing.

Also added a regression test and fixed up another test.

And added stringer go generate for ItemType.

Update some bad README stuff

06 Jul 03:28
Compare
Choose a tag to compare
Pre-release
v0.3.1

update README

Add DecodeList{} type to handle decoding lists of items

06 Jul 03:20
Compare
Choose a tag to compare

You know, those damn pesky lists in a line, like ["something", "probably", "important"].

Well, they are a pain to handle and I wrote a generic way to decode them, as long as they are on a single line.

Merry Christmas to all.

Breaking Changes to make it easier to use, add more docs, etc.

05 Jul 01:06
Compare
Choose a tag to compare

Now with a README

Made Parser() easier to deal with and less circular in dependencies.
New "line" package to help parse lines from .Raw when you need all that whitespace.
....

Initial release

07 Mar 14:18
b6486d1
Compare
Choose a tag to compare
Initial release Pre-release
Pre-release

Includes the initial version of the HalfPike lexer/parser and examples.