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

Fix ini example #16

Closed
wants to merge 2 commits into from
Closed

Fix ini example #16

wants to merge 2 commits into from

Conversation

fabiim
Copy link

@fabiim fabiim commented Mar 2, 2019

  • Support white space around equal separator in INI files

The grammar as it was failed to support white space around name=value
entries in an INI file. I faced these errors:

    thread 'main' panicked at 'unsuccessful parse: Error { variant: ParsingError { positives: [char], negatives: [] }, location: Pos(8), line_col: Pos((1, 9)), path: None, line: "username = noha␊", continued_line: None }', src/libcore/result.rs:997:5
  • Finish file with new line

    As it stands the current grammar does not parse the given file
    correctly. Not sure how to fix it in the grammar otherwise I
    would.

    thread 'main' panicked at 'unsuccessful parse: Error { variant: ParsingError { positives: [char], negatives: [] }, location: Pos(223), line_col: Pos((15, 17)), path: None, line: "interface = eth1", continued_line: None }', src/libcore/result.rs:997:5

As it stands the current grammar does not parse the given file
correctly [1]. Not sure how to fix it in the grammar otherwise I
would.

```
thread 'main' panicked at 'unsuccessful parse: Error { variant: ParsingError { positives: [char], negatives: [] }, location: Pos(223), line_col: Pos((15, 17)), path: None, line: "interface = eth1", continued_line: None }', src/libcore/result.rs:997:5
```
The grammar as it was failed to support white space around name=value
entries in an INI file. I faced these errors:

```
thread 'main' panicked at 'unsuccessful parse: Error { variant: ParsingError { positives: [char], negatives: [] }, location: Pos(8), line_col: Pos((1, 9)), path: None, line: "username = noha␊", continued_line: None }', src/libcore/result.rs:997:5
```
@wirelyre
Copy link
Contributor

Whitespace in INI files is addressed in the "Whitespace" section near the end of the chapter.

Can I ask which steps you took to get the parse error without reaching that section? Maybe you stopped right at the beginning of "Program initialization"?

Evidently the ordering is confusing. Maybe it's possible to restructure that chapter.

@cianoc
Copy link

cianoc commented Sep 11, 2019

I just identified one problem with the chapter here.
#19

@fabiim fabiim closed this Oct 15, 2020
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