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

[Bug] Support generics for %type and %extends [sf#73] #75

Closed
lsf37 opened this Issue Feb 15, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@lsf37
Member

lsf37 commented Feb 15, 2015

Reported by carlburch on 2005-05-31 18:22 UTC
I had reason to want a generic in the method's return type:

%type Token<JavaTokenType>

JFlex kindly tells me that '<' is an unexpected character. I had to
work around it by defining a subclass that extends the desired type.

I wanted generics with %implements, too, but interestingly JFlex has
no trouble with that. Although I haven't run into a reason to do the
same for %extends, it has the same limitation as %type.

If you decide to support generics, then I'd preemptively point out that
there are several other weird characters that could potentially occur
too: space, comma, question mark, ampersand.

(Thanks for JFlex!)

@lsf37 lsf37 changed the title from Support generics for %type and %extends to [Bug] Support generics for %type and %extends [sf#73] Feb 15, 2015

@lsf37 lsf37 added this to the feature request milestone Feb 15, 2015

@lsf37 lsf37 closed this Feb 15, 2015

@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

Commented by lsf37 on 2008-05-27 05:14 UTC
Logged In: YES
user_id=93534
Originator: NO

Took a while, but I've now implemented this in revision 356.

Generics syntax for %class and the new %ctorargs is supported as well.

Cheers,
Gerwin

Member

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2008-05-27 05:14 UTC
Logged In: YES
user_id=93534
Originator: NO

Took a while, but I've now implemented this in revision 356.

Generics syntax for %class and the new %ctorargs is supported as well.

Cheers,
Gerwin

@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

Updated by lsf37 on 2008-05-27 11:46 UTC

  • status: open --> closed
Member

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2008-05-27 11:46 UTC

  • status: open --> closed

@lsf37 lsf37 removed this from the feature request milestone Feb 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment