Code Monkey home page Code Monkey logo

Comments (4)

3breadt avatar 3breadt commented on July 20, 2024

This is not easily done.

The used java.xml parser does not provide line number information. One would need to implement a custom SAX handler that tracks location information. Or maybe use a third party library.

The ASCII property list parser is only parser where location information is available. But only the offset within the file, not the line or column number.

For binary property lists the offset within the file is available, but that information is hardly useful.

from dd-plist.

HiranChaudhuri avatar HiranChaudhuri commented on July 20, 2024

Still it makes sense to have good information what to look at in case of error.
In binary files row and column would not make sense, I agree. But having a location path and a byte offset would be the best that can be offered and therefore should.
For ASCII and XML there is definitely a way to markup location path and row/column information.

The parser generator ANTLR is able to produce really good parsing errors, however I am unsure about the grammar for plist files. Hence I came to this project, which has a stunning parser but bad error information.

from dd-plist.

3breadt avatar 3breadt commented on July 20, 2024

@HiranChaudhuri Please take a look at this pull request #95 and check if that addresses your concerns.

from dd-plist.

3breadt avatar 3breadt commented on July 20, 2024

All requested features should be taken care of by the merged PR #95 .

from dd-plist.

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.