Coder Social home page Coder Social logo

Comments (6)

iarna avatar iarna commented on August 29, 2024 1

@LongTengDao I've updated both the spec compliance test results and the benchmarks with your parser. It still can't complete all the tests, but it's running well enough that I can include it. It's very impressively fast for large strings!

from iarna-toml.

iarna avatar iarna commented on August 29, 2024

I'll give it a go!

from iarna-toml.

iarna avatar iarna commented on August 29, 2024

@LongTengDao The benchmarks are failing out pretty early with parse errors, for example:

key3 = -2E-2

Throws SyntaxError: Invalid Local Date instead of parsing that as the value -0.02.

I'll make a branch that includes your parser and you can try them out yourself!

I would encourage you to get your parser passing BurntSushi's tests (https://github.com/BurntSushi/toml-test) and/or mine (https://github.com/iarna/toml-spec-tests/tree/0.5.0) before trying to move into benchmarks.

from iarna-toml.

iarna avatar iarna commented on August 29, 2024

It doesn't have to be passing everything for me to include it, but… there are some tests that it seems to infinite loop on, and I can't run it through its paces till you at least fix those bugs.

Specifically, this benchmark 0B-types-scalar-string-multiline-1079-chars just hangs with your parser. That's it trying to parse this file: https://github.com/iarna/iarna-toml/blob/add-ltd-j-toml/benchmark/0B-types-scalar-string-multiline-1079-chars.toml

The branch add-ltd-j-toml adds support to the benchmark suite. It also (temporarily) adds a new file called ltd-benchmark-per-file.js which will run the detailed suite against only your parser, so you can more easily see where the problems are.

from iarna-toml.

LongTengDao avatar LongTengDao commented on August 29, 2024

@iarna Really thanks for your help!

I fixed a data type classification bug. It treated -2E-2 literal with two - as a local date, like 1111-11-11.

I found the infinite-loop-like status comes from a very slow RegExp trap /^(?:[^\\]+|\\[^])*"""/, which should be /^(?:[^\\]|\\[^])*"""/. Just a few characters will make it run a few minutes, amazing.

Then I use the tests to check over my parser (v0.5.42), now it looks good. Wish you run a good result, thank you!

from iarna-toml.

LongTengDao avatar LongTengDao commented on August 29, 2024

@iarna Wow! Thank you!

from iarna-toml.

Related Issues (20)

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.