Giter VIP home page Giter VIP logo

Comments (4)

HaydenOrz avatar HaydenOrz commented on August 29, 2024

Hi joshi1983,
Thanks for your feedback!

The problem you mentioned about the error in the lexer method, that is a bug and we will fix it recently;

In addition, regarding the problem of comment matching in the grammar you mentioned, the root rule of dt-python-parser does not contain comment-related lexical rules, when matching to comments, dt-python-parser will skip it directly, and this comment lexical rule actually matches all characters except for line breaks

from dt-python-parser.

joshi1983 avatar joshi1983 commented on August 29, 2024

Thanks for replying.

Unrelated to the lexer bug, is there a way to accurately identify INDENT, DEDENT, NEWLINE, and ENDMARKER tokens other than looking at symbol.text? INDENT, DEDENT, NEWLINE, ENDMARKER are valid identifiers in Python so looking at symbol.text alone could rarely give me false positives if someone named a variable "INDENT".
I'm checking invokingState for them to distinguish them from variables but that risks false negatives when I don't know all possible invokingStates for the intended cases. invokingState is also likely to change with future versions of DT Python Parser.

from dt-python-parser.

joshi1983 avatar joshi1983 commented on August 29, 2024

HaydenOrz thanks for your pull request. I hope someone merges it soon so the fix becomes part of the main fork.

from dt-python-parser.

joshi1983 avatar joshi1983 commented on August 29, 2024

HaydenOrz thanks for your pull request.
wewoor thanks for merging the pull request.

I manually tested HaydenOrz's changes and the original bug is fixed with his changes.
I'm closing the issue since the bug is fixed.

from dt-python-parser.

Related Issues (9)

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.