Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added harder examples and another python parser #138

Merged
merged 4 commits into from
Feb 27, 2013
Merged

Added harder examples and another python parser #138

merged 4 commits into from
Feb 27, 2013

Conversation

elssar
Copy link
Contributor

@elssar elssar commented Feb 27, 2013

Added hard_example.toml and hard_example.yaml that might break some parsers. Both config files written from the point of view of a user that parser writers hate.

Also added my almost complete python parser to the list of parsers.

@RichardVasquez
Copy link
Contributor

I feel half good. My parser read it just fine, as near as I can tell within the debugger

My output of the resulting data went a bit off the farm. Thanks for the test data.

(Later...)
Again, much thanks. Got some sleep and an hour's worth of staring at bug ugly code with resulting factoring, and my output is sane again, like so:

[the]
test_string = "You'll hate me after this - #"

[the.hard]
another_test_string = " Same thing, but with a string #"
harder_test_string = " And when "'s are in the string, along with # ""
test_array = [ "] ", " # " ]
test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ]

[the.hard.bit#]
what? = "You don't think some user won't do that?"
multi_line_array = [ "]" ]

@mojombo
Copy link
Member

mojombo commented Feb 27, 2013

Awesome, thanks!

mojombo pushed a commit that referenced this pull request Feb 27, 2013
Added harder examples and another python parser
@mojombo mojombo merged commit 5b6615b into toml-lang:master Feb 27, 2013
@C0mkid
Copy link
Contributor

C0mkid commented Feb 27, 2013

I would suggest making these examples even harder by adding whitespace within the keys (and around the keys) and also adding arrays like: [ [ "a", "b" ], [ 1, 2 ] ]

@elssar
Copy link
Contributor Author

elssar commented Feb 27, 2013

@C0mkid Whitespace in arrays should be trivial to solve, in fact that is how the arrays in the other example are written.

Whitespaces in keygroups, now that is interesting.

[ Keygroup ]      # I'm guessing spaces should be ignored
[ Keygroup]       # same here
[Keygroup ]       # and the same here
# This is where is gets interesting
[ Key Group]
[ Keygroup. Subgroup]
[ Keygroup .Subgroup]
# How should those be handled? 

@mojombo some clarifications please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants