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

Error: template instance Char!('0') Char is not a template declaration, it is a class #4

Closed
alexrp opened this issue Mar 11, 2012 · 6 comments

Comments

@alexrp
Copy link
Contributor

alexrp commented Mar 11, 2012

Code:

mixin(grammar("Binary <- '0' ('b' / 'B') [01]+"));

Am I doing it wrong or is this a bug?

@alexrp
Copy link
Contributor Author

alexrp commented Mar 11, 2012

Ah, turns out it should be [0-1]. That works perfectly. Is this by design?

@alexrp
Copy link
Contributor Author

alexrp commented Mar 12, 2012

Hm, this does seem like a bug, actually. The following fails too:

mixin(grammar("Identifier <- [a-zA-Z_] [a-zA-Z0-9_]*"));

@PhilippeSigaud
Copy link
Owner

It's a hijacking problem between the grammar-generated Char parser and the built-in Char. I think DMD is not very helpful with this.

Since the built-in Char is not used anymore (I changed the grammar to use Lit!("a") for 'a', I'll drop it.

@PhilippeSigaud
Copy link
Owner

Both examples seem to work now. I'm closing this.

@alexrp
Copy link
Contributor Author

alexrp commented Mar 17, 2012

Have you pushed the changes that fix this? (Which commit?)

@PhilippeSigaud
Copy link
Owner

On Sat, Mar 17, 2012 at 08:29, Alex Rønne Petersen
reply@reply.github.com
wrote:

I don't know exactly. I was away several days and coming back I tried
to compile your tests and they all passed. I may have done that 4-5
days ago, while committing something else.

PhilippeSigaud pushed a commit that referenced this issue Sep 5, 2018
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

2 participants