-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Use a PEG parser? #281
Comments
Related, I propose to start a project of org file samples which cover all the possibilities of the grammar. The community could use it to demonstrate issues which could then be used by developers to run tests. There are some examples out there but none quite comprehensive. [EDIT: I've started laying out some of the simplest examples.] |
Or maybe just commit to this EBNF grammar. (I only just learned about it.) I’m assuming the GPL 3 license isn’t an issue. |
Some very interesting ideas. I'd like to get more feedback from a broader audience for this kind of change, but It's great to think big |
It's been years since I had to read EBNF but I like the ideas a lot. Currently the problems I have is prioritizing what to work on and finding time to do dev work. |
I haven’t looked at this in a while but I do think that putting the parse tree on a firmer footing opens up possibilities for new features. For instance you could enable using the punch clock features of org-mode. Like I said above, I’m happy to brainstorm either here or on the chat. |
Okay this is a more extreme idea. It’s probably worth bringing to the broader org community. (Maybe worg?)
[EDIT: FWIW, I tried to start a https://lists.gnu.org/archive/html/emacs-orgmode/2021-07/msg00355.html.]
If we had a better developed AST we’d have more direct access to things like SCHEDULE dates for integration with calendars or managing agendas, etc.
The actual org-mode parser is pretty permissive allowing things like skipping levels of headlines. There are projects out there which produce an AST with JavaScript which could be leveraged but necessarily make choices for parts of org made less explicit.
What if we had a stricter better defined syntax? This would make it easier to develop tools like MobileOrg that are more interoperable.
I’ve started working on a PEG representation for the org grammar. There are fairly active projects that implement PEG parsers which could then be used.
This is fairly bold proposal though and there are many angles from which to approach the discussion.
In any event, my sense is that this approach has fruit to bear but I’m unsure of where to take it and am looking for people to brainstorm with. If you have suggestions, please let me know.
org-mode-grammar.txt
The text was updated successfully, but these errors were encountered: