Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing in options to Composite Grammars #171

Open
davestevens opened this issue Feb 10, 2015 · 0 comments
Open

Passing in options to Composite Grammars #171

davestevens opened this issue Feb 10, 2015 · 0 comments

Comments

@davestevens
Copy link

I'm currently using the Ruby generation, I currently pass in objects to @init which I then use within the rules for computation.
I am attempting to utilize composite grammars but to do this I need to pass options through to the delegate. In the Ruby.stg there is the following:

newDelegate(gram) ::= <<
<gram.name>.new( <trunc(gram.delegators):{p|<p:delegateName()>, }>
  self, @input, :state => @state<@delegateOptions()>
)
>>

I have been searching and I can't see where @delegateOptions() comes from.
I want to be able to define it in the file which is performing the import to pass on extra options to the delegate. Is there any way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant