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

New Feature: Dump parsed config via outputter (after edit) #14

Open
gianks opened this issue Mar 1, 2022 · 2 comments
Open

New Feature: Dump parsed config via outputter (after edit) #14

gianks opened this issue Mar 1, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gianks
Copy link

gianks commented Mar 1, 2022

Hi, this is not really an issue but a feature request.

It would be really nice if after parsing the configuration, one could dump it back out, possibly after altering the data structure as needed.

Thanks for this nice project!

@egberts
Copy link
Owner

egberts commented Mar 4, 2022

yeah, it is called a outputter (not a generator, as I had incorrectly stated firstly).

I have been looking at various add-on to the pyparsing module for generating from its graph tree.

Even am looking at alternative parser that may have a builtin generator.

At the moment, one could add members to pyparsing to support this.

Still tabulating cost effectiveness of development time here, but this is one feature that is rather high on my list.

@egberts egberts closed this as completed May 21, 2022
@egberts egberts reopened this May 21, 2022
@egberts egberts added enhancement New feature or request good first issue Good for newcomers labels May 21, 2022
@egberts
Copy link
Owner

egberts commented May 21, 2022

I'm conferring with the @ptmcg (author of pyparsing) about the re-outputting of the config file.

One thing we have to remember, any comment lines will be lost.

There are two general classes of parsers, and only one of them can save comments as well as inline comments of Python/C/C++ varieties.:

  • token to AST (pyparsing, antler, any PEG parser).
  • All Text (TextEdit, PyCharm, CLion++)

@egberts egberts changed the title New Feature: Dump parsed config (after edit) New Feature: Dump parsed config via outputter (after edit) Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants