You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have tried the import_lark branch out (#1446). I must admit, I am a complete beginner with Lark and so I'm not sure if my error is due to that, or due to something else.
What I a trying to do is create a grammar and parser for Snakemake which is a DSL built on top of python. i.e., any python syntax is valid snakemake syntax, and then there is snakemake-specific syntax on top of that.
I want to keep the Snakemake grammar definition separate from the Python grammar, hence why I stumbled across this issue.
Here is a small example of what I was trying to do (using lark installed from the linked branch (import_star))
@mbhall88 Feel free to open a new discussion/issue.
Anyway, when importing grammars, you still have call all the relevant %ignore statements from the root grammar. (in this case, all the ignores inside python.g)
start is just the default root name. You can change it by providing the "start" parameter to Lark.
So I have tried the
import_lark
branch out (#1446). I must admit, I am a complete beginner with Lark and so I'm not sure if my error is due to that, or due to something else.What I a trying to do is create a grammar and parser for Snakemake which is a DSL built on top of python. i.e., any python syntax is valid snakemake syntax, and then there is snakemake-specific syntax on top of that.
I want to keep the Snakemake grammar definition separate from the Python grammar, hence why I stumbled across this issue.
Here is a small example of what I was trying to do (using lark installed from the linked branch (
import_star
))When I try to import the
parse_snakemake_file
function and run it I get the followingagain, this could be my misunderstanding - I wasn't certain what to use for
start
as that doesn't seem to be defined in the python grammer?Also, I am happy to move this to a separate issue so as not to clutter this issue.
Originally posted by @mbhall88 in #1397 (comment)
The text was updated successfully, but these errors were encountered: