Comments (2)
Just report my work around. I've add a backward function
for the lexer. In a lexer rule I search for the whole text. Do rexgex match unwanted part, count its length, call this function, and sub this unwanted part from the whole matched. Hooray! Its work. :)
from ply.
Oh... that's all my bad. I'm just old fashion guy from lex/flex rexgex style. There is a better way to deal with this rexgex directly in Python:
match(?=require)
btw, could you write some short documentation on this?
from ply.
Related Issues (20)
- sequence item 0: expected str instance, float found HOT 1
- What types of codes are the PLY suitable for? HOT 2
- Are there any recommendations for grammar rules references to parse C language?
- Exporting grammar for documentation
- Invalid Syntax when importing module in yacc
- Configuring ID
- Space as a part of lexeme HOT 2
- Allow cloning a parser HOT 1
- How can I assign p arguments when there are two non-terminals side by side (PLY) HOT 7
- Whether tok.type can be acquired at parser
- Parse HQL with STRUCT Comment returns empty
- Simple typo in doc/ply.md about error handler example HOT 1
- Python 3.11: inability to use global inline flags HOT 3
- yacc argument "write_tables" is missing in 3.11 HOT 5
- Warn user about tuple flattening in precedence table HOT 3
- PyPI package HOT 2
- Trying to get in touch regarding a security issue
- "global flags not at the start of the expression" error when using in-line global regex flag with Python 11+ HOT 1
- t_AUTOINCREMENT error ?
- Please make a new release 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 ply.