On Fri, Jul 7, 2017 at 10:21 AM, Ken Mankoff <[email protected]> wrote:
> > On 2017-07-07 at 13:50, Martin Blais <[email protected]> wrote: > > A workaround for which part? > > I don't understand your question. > > The unclear question was about beancount syntax and embedding Org Babel > Code blocks in a beancount Org file. > > I'm new to the beancount syntax. Is there a way to have Org tables in a > beancount document? Or is "|" invalid as the first character of a line? > What about code? > It should ignore anything that isn't starting with a date or another valid syntax. That said, the amount of testing for what the bison/flex-generated parser can tolerate is fairly small. I wouldn't be surprised if you can break it. I thought if the line begins with a non-date or non-whitespace, it is a > comment, but that doesn't seem to be the case. > If you can establish some minimal examples that fail, please report them, I can have a look. (Note: I'm moving over the next three weeks and then going on an overdue vacation, so I won't have much time to do much until September. Best is to submit a patch, second best is to file a ticket.) In this case, can I put in a feature request for the parser to ignore Org > Babel code blocks, (i.e. all lines between "#+BEGIN_SRC" and "#+END_SRC") > Org tables (lines that begin with "|"), and Babel Results blocks > ("#+RESULTS:" and lines that begin with ":") > > I've looked at the lexer and parser code briefly, but it has been decades > since I have written a language. I will add this eventually if there is > interest in adding this feature to the language. > > -k. > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/beancount/m2van48h08.fsf%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhMbnfqGmezbf28F3dtBgM1RYc-8W_Cj72JRwixTRjdbPw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
