Hello Fang-Peng,

thank you for sharing. I think having these are interesting tools!

On 09/04/2022 08:26, Fang-Pen Lin wrote:

I was working on my web base beancount SaaS product [...]

I am curious about the busyness model for such an enterprise, but maybe the Beancount mailing list is not the best place to discuss it...

I really like Python's black formatter and how it works. With the needs in mind, I built two projects:
>
    beancount-parser
    <https://github.com/LaunchPlatform/beancount-parser> - Standalone
    Lark based Beancount syntax parser

I don't know Lark much and I had just a quick look, but something seems odd: how do you handle indentation? I don't see anything about it in the grammar files. I realize that ignoring this aspect may be fine if the goal is to generate a syntax three to use in a formatting tool operating on known valid input files. Otherwise, this is not a validating parser. Maybe something to mention in the documentation.

The reason I don't use Beancount lib is that I want to handle things like comments and emac org syntax
Please note that preserving comments (org-mode headers are just a special kind of comments as far as the Beancount parser is concerned) is a goal for the overhaul of the parser coming in Beancount v3. If you feel to contribute, I would be very happy to review patches adding this feature to Beancount.

You can try the formatter online here if you don't want to install them:

https://beanhub.io/tools/beancount-formatter

I tries this, but whatever I enter, I always get an error:

  500
  Sorry! Something Went Wrong


Cheers,
Dan

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/14e189fd-b489-91c7-4e94-74970d0177bb%40grinta.net.

Reply via email to