Comments (4)
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.
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.
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.
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)
- 支持最新版Python3语法
- Async / Await Support for the Python parser HOT 4
- Python Code Generator and Tree-Rewrite Engine for Python Parser HOT 3
- How to parse/tokenize only INDENT and DEDENT tokens? HOT 2
- lexer freezes on this Python code HOT 1
- Problem when using listener mode
- Use dt-python-parser client-side in a browser ? HOT 1
- auto-complete HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dt-python-parser.