Comments (11)
What I miss in the documentation is some clarity about which features of lex/flex are supported: yytext
, yyleng
, yymore
/yyless
, yywrap
, REJECT
, ECHO
, start conditions, character tables, %{
and %}
delimiters.... Another thought: ideally, the documentation would be usable to someone who has no experience with lex or yacc, as many in the latest generation of CS majors have never used those tools due to the proliferation of alternative tools and changing priorities in CS education, and I suspect the Rust community has more than its share of such people.
But I'm not complaining. I'm just grateful that you are willing and able to share your code with me! I echo @pablosichert's sentiments. The first time I went searching for a lexer/parser generator solution in Rust, I came to the conclusion that I would have to write my own if I wanted something with the (rather humble) feature set I needed. I didn't find grmtools until later. So far, it is the only library of its kind that I would actually recommend to someone. Thanks!
from grmtools.
What I miss in the documentation is some clarity about which features of lex/flex are supported: yytext, yyleng, yymore/yyless, yywrap, REJECT, ECHO, start conditions, character tables, %{ and %} delimiters.
I take your point on this: I think that I can cover most of this fairly easily.
Another thought: ideally, the documentation would be usable to someone who has no experience with lex or yacc
This is a lot of work :) What I think we can easily do, and building on your first point, is to point people at the exiting yacc docs and then explain the differences more clearly.
I will try and raise a PR on this in the coming days.
from grmtools.
I take your point about the README's brevity, though I hope that the quickstart goes some way to rectifying that.
As a quick fix, we could probably just copy over parts of the (or the entire) quickstart guide into the README, which should save some people with particularly short attention spans an extra click.
from grmtools.
@pablosichert I didn't know about "manage topics" before, and I must admit that I'm not sure how many people find things that way, but it certainly does no harm to add them in -- I've just done so.
from grmtools.
I assumed that those might be used to create the HTML "keywords" meta tag, so that search engines pick them up.
Just inspected the HTML source and I seem to be wrong.
Maybe it helps anyway, thank you!
from grmtools.
For my part I'm very happy with the progress that has been made here so far, thank you!
Going to close this one, as there isn't anything actionable left (or should be moved into separate, smaller issues).
from grmtools.
I'm glad you've found this useful, and thanks for pointing out limitations -- it helps make things better! There's been no particular intent to keep this quiet, nor any intent so far to publicise it. I view the libraries herein as semi-mature, in the sense that I'm still prepared to make breaking API changes (e.g. #125) if it usefully improves things. That said, I've been using these libraries in other projects fairly happily, and I know others have too, which is a decent sign that things are probably ready for a somewhat wider audience. I take your point about the README
's brevity, though I hope that the quickstart goes some way to rectifying that. I will beef up the README
. We'll probably have a 0.5.0
release at some point this week or so and maybe that will help find these libraries a few more users!
from grmtools.
I will have a go at the README then.
from grmtools.
Thanks! As well as doing this, it might be worth checking that the quickstart guide is still 100% accurate and as simple as it could be. It wouldn't surprise me if it could be improved.
from grmtools.
I'd like to suggest some tags that could be put onto the main page of the repository (as an owner, you should be able to see the edit
button on the top):
parser generator
, lexer
, parser
, grammar
, rust
and maybe also lex
, yacc
/ bison
, flex
...because I would have really liked back then to find this repo by those search terms.
Edit: Looks like most of those are already in place for the crates, but could also be copied into the GitHub page:
Line 11 in 92a15bd
Line 10 in 92a15bd
Line 12 in 92a15bd
Line 10 in 92a15bd
from grmtools.
Another thought: ideally, the documentation would be usable to someone who has no experience with lex or yacc
Might be worth linking to an article of BNF somewhere in the docs, e.g. https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form, and state that it is assumed that the reader is somewhat familiar with it.
from grmtools.
Related Issues (20)
- write .l with var for lrlex HOT 1
- Generated code incompatible with `-D rust-2018-idioms` HOT 7
- Broken links for YACC and LEX Manual in grmtools-book HOT 5
- %ignore like in flex HOT 8
- Is it possible to perform side effects while parsing? HOT 3
- Would be nice to have an online playground HOT 8
- Order of execution of grammar statements? HOT 7
- Bug in grmtools documentation - traits not displaying required method names HOT 12
- Is there a way to avoid global variables for compile time data structures? HOT 5
- Request for example of handling string literals in lexer HOT 2
- error when using fake UMINUS token in %prec directive HOT 9
- GDB Support? HOT 5
- Add support for comments in lrlex files HOT 3
- Explain why Copy is required for a type specified %parse-param HOT 7
- Nondeterministic generation of Rust code HOT 2
- Support lex-style definitions HOT 1
- Trying to replicate `tinylang.yy` and `tinylang.l` syntax with `nimbleparse` HOT 5
- Weird that `nimbleparse` works on `java7.y` `java7.l` even though the `GT` symbol in both is different. HOT 1
- Online Yacc/Lex editor/tester HOT 6
- Detailed debug info for reduce/reduce shift/reduce errors? HOT 27
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 grmtools.