Discussion:
[Cucumber] Cucumber access to AST
Add Reply
Connie Ioannou
2018-07-04 15:05:30 UTC
Reply
Permalink
Raw Message
Hello,

I am trying to gain access to the AST created for the .feature file in the
environment of Eclipse.
I have seen around that package gherkin.ast can be used, and found
access cs, and js.
Links I followed to find that package lead to not found errors in github
and I don't know if it was removed or just renamed.
Can anyone help me to understand how I can get access to AST from the
current implementation available on https://github.com/cucumber/cucumber

Thank you,
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
aslak hellesoy
2018-07-04 18:35:21 UTC
Reply
Permalink
Raw Message
Hi Connie,

Here is a test illustrating how to access the Gherkin AST:
https://github.com/cucumber/cucumber/blob/8e43b4ca62e8dbf238a7b1fbb775e5b6fbf74a43/gherkin/java/src/test/java/io/cucumber/gherkin/SubprocessCucumberMessagesTest.java#L18-L33

You need to add this dependency:

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>gherkin</artifactId>
<version>6.0.0-SNAPSHOT</version>
</dependency>

And this repo (because it's currently only available as a SNAPSHOT):

<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

Once you have access to the AST - what are you planning to use it for?

Cheers,
Aslak
Post by Connie Ioannou
Hello,
I am trying to gain access to the AST created for the .feature file in the
environment of Eclipse.
I have seen around that package gherkin.ast can be used, and found
access cs, and js.
Links I followed to find that package lead to not found errors in github
and I don't know if it was removed or just renamed.
Can anyone help me to understand how I can get access to AST from the
current implementation available on https://github.com/cucumber/cucumber
Thank you,
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...