David Masterson <dsmasterson92...@outlook.com> writes:
> Tim Cross <theophil...@gmail.com> writes: > >> I suspect the best model for moving forward is for new features and >> enhancements to be initially implemented as add on contribution packages >> rather than as extensions/enhancement to the core 'org-mode' package. >> Such packages, if found to be popular or useful to a large number of >> org-mode users could then be considered for inclusion as part of the >> main org-mode package. The nature of elisp makes this type of model very >> suitable as you can modify almost any aspect of org-mode via add on >> packages in a consistent and stable manner and avoid impacting the core >> functionality until the extension/enhancement has matured >> sufficiently. > > What is the current status of having a BNF (or...?) parser for Org > files? In particular, the parser rules that could then be adopted by > tools that use Org files on other systems (iPhone, Android, ...)? Given > the availability of parser generators (bison...), this would be good for > breaking into smartphones where Emacs doesn't run. While not BNF, Tom Gillespie has been working on documentation of the org grammar as part of a broader objective to make it easier for other external tools to parse org files. Below is a message he recently posted to the list. Note that I think this is a slightly different topic to the development/maintenance of org-mode. The external packages I was referring to are still Elisp based packages. Non-Elisp tools which can parse and possibly edit org files would be a good thing for accessing org files on other devices and outside of Emacs. However, such tools will always be more limited because of the complexity of adding things like multiple export formats, babel tangling of src blocks etc (most of which was really only viable in Emacs because Emacs already had support for much of that functionality - a subtle point of org mode often overlooked is that what it primarily did was take existing Emacs functionality and 'wrapped' it in a UI layer to provide a more consistent and 'directed' interface to existing Emacs functionality). > From Tom Gillespie <tgb...@gmail.com> > Dear all, > Here is a draft of a formal grammar for Org mode [1]. It is still > in a rough state, despite quite a bit of work. However, following some > changes to improve performance for parsing real (big) Org files, I > think it is time to share it with the community so that we can start > to gather feedback. There are a number of opportunities that I have > found for simplifying the org grammar (sometimes by extending it to > make it more regular, and in the process adding useful features) that > are much easier to understand with this grammar in hand as a > reference. The grammar itself is implemented using Racket's #lang brag > (see [2] for an overview of brag's syntax). I had considered trying to > break it up into literate sections in an Org file, but for now decided > to leave it as a single file to simplify the development workflow. As > a result the full implementation is fairly long [3]. Comments and > feedback would be greatly appreciated. Best! > Tom > 1. https://github.com/tgbugs/laundry > 2. https://docs.racket-lang.org/brag/#%28part._.The_language%29 > 3. https://github.com/tgbugs/laundry/blob/master/org-mode/parser.rkt -- Tim Cross