Giter VIP home page Giter VIP logo

ledger-parser-adhoc's Introduction

ledger-parser-adhoc

An ad-hoc rewrite of the Ledger parser

Intent and Purpose

The idea behind this version of the parser is to create a custom parser from scratch, without the limitations imposed by differences between C++ and Rust.

This is a custom parser, based on the original Ledger parser in C++. Only the minimal functionality is intended to be ported to get a working version.

The intended goal is to have a minimal Ledger-syntax parser that can be compiled into WASM and used in a web application.

It is also supposed to parse some basic set of Ledger functionality and provide a data structure back. It is a library, not an executable. Although, there could be an executable built for the purpose of running tests.

Progress Plan

The initial step is to get just the minimal structure from Ledger and have a minimal working version, that can parse a very basic transaction (in tests/first.ledger).

Expand from there to parse more of the Ledger syntax.

Use existing tests from Ledger and Ledger2Beancount to confirm that the input is parsed.

Ledger Documentation

The guidelines are available at Ledger for Developers. There are the explanations for the main objects and functioning of the system. The core concepts should be mirrored in the Rust implementation.

Conclusion

The rewrite goal is proving elusive as a huge code structure from Ledger still needs to be ported over. Once the parsing starts, the work with references prove to be too much of a mess due to Rust's limits on fields and references.

Try using Box<> more and passing references.

It makes no sense to have just the parser, since the model structure is highly interwoven into the parser. The reporting components would depend on this and it makes sense to include the full Ledger functionality in the same library.

ledger-parser-adhoc's People

Contributors

alensiljak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.