Open cre4ture opened 8 months ago
It's been a while since I really made progress on this project, but I really appreciate the feedback.
I'm guessing it's broken and will need fixing as part of #27 since I believe the correct grammar only treats leading X=Y
assignments specially.
There are other known issues with the grammar, not limited to, but including the cursed dangling else problem (if my memory serves).
I kind of lost steam for this project when I realized I needed a more rock solid foundations for the multi-language embedding, which I never took the time to solve (or is it unsolvable?).
I'm happy to open up the license, @cre4ture do you have any recommendations for a more permissive choice? MIT? Apache? Beerware?
@cre4ture would you be interested in writing a failing test case for this? Otherwise I think I'll add one.
I'm also no license expert, nor do I have a dedicated opinion about it. But the project uutils
that I currently contribute to is under MIT and I'm adviced to only use similar licenses (MIT, Apache, BSD, ...). Details: url.
I will leave the test case creation to you. oursh
is a good project but currently not my focus.
@cre4ture swapped the license over to MIT, but still haven't really had time to start working on this.
Thanks again for the issue though.
Essentially:
FOO=1 BAR=2 echo BAZ=
FOO
and BAR
should be set, and BAZ=
should be a single word printed to STDOUT.
Today, FOO=1
and BAR=2
are Assignment
productions (see below):
However, later we want BAZ=
to be a single WORD
(including the equal sign). This is tricky because the lexer has no
notion of where things are in the grammar. So it currently always treats the equal sign as a special token, not part of a WORD
.
Hi, I'm currently doing experiments with this crate as I try to use it as part of an other application das needs shell-style syntax parser. In general I had a good impression about the features an the quality of oursh. But after I ran some first tests I figured out that oursh currently has a major limitation: It doesn't allow the equal sign "=" or if keyword to be part of a programs argument list.
Maybe there are even more things that are not allowed. I will probably go with an other crate anyway due to license restrictions. But I wanted you to know about the finding.