On 1/22/21 10:34 AM, vnr wrote:
Hello 😊

I'm trying to use the combinator Pry parser library (https://code.dlang.org/packages/pry/0.3.2), but, as I'll explain in the rest of this message, it seems to be a bad version of the lib that dub downloads me.

So, simply by adding pry as a dependency on a virgin project, and using features that are present in the documentation and examples, dub indicates that these features are non-existent. I have identified the following combinators that were not recognized: `delimited`, `optional`, `skipWs`, `slice`, `utfString` and also the `stk `atom. There may be others.

Searching in the code and in the different versions, it seems that the combinators I quoted are not part of the old versions (under 0.3.2), but it is indeed this version that I included in the blank project...

Here is a simple example (by the way, the examples in the "example" folder don't work for me either):
```d
import pry;
import std.stdio;

void main()
{
     alias S = SimpleStream!string;
     with(parsers!S)
     {
         auto p = delimited(range!('0', '9').rep, tk!',');
         auto s = "3,3,4".stream;
         string[] values;
         S.Error err;
         auto r = p.parse(s, values, err);
         writeln(r);
     }
}
```
With the following dub.sdl :
```sdl
name "test"
dependency "pry" version="~>0.3.2"
```
By building, I get:
```bash
$ dub build
pry 0.3.2: target for configuration "library" is up to date.
test ~master: building configuration "application"...
source\app.d(9,12): Error: undefined identifier delimited
```

What's wrong with all this? How come I'm using the "newest" version of pry, but an older version of the library seems to be used instead?

Is there a problem with the way I use dub, or is the library too old (4 years old anyway)?

It just needs a tag. delimited (for example) added here:

https://github.com/DmitryOlshansky/pry-parser/commit/808d01c30b50a928f5795dab7e6c0a7a392899b0

May of 2017, Last tag was v0.3.2 on January 2017.

Just add an issue, ask Dmitry to release a new version.

-Steve

Reply via email to