Replies: 1 comment
-
@samguyer the For a working example see |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I am new to Ohm, but have spent many decades working with parsers in various languages. (Compared to tools like yacc/lex, Ohm is such a joy to use!) What I'm trying to do is create a simple query language, which I will use to filter a data set. The query language is essentially just a predicate that will be applied to each data item. What I want to do is parse the filter expression, attach the semantics, but then apply those semantics to each data item to determine if it should be included in the results or not. I don't see an obvious way to invoke the semantic action with an argument. I suppose I could just use closure capture to allow the semantic functions to directly access the data set, but that seems less appealing from a design standpoint. Is there a better way?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions