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

Support parsing c++ specific and other esoteric syntax #36

Open
samuel opened this issue May 29, 2015 · 3 comments
Open

Support parsing c++ specific and other esoteric syntax #36

samuel opened this issue May 29, 2015 · 3 comments

Comments

@samuel
Copy link
Owner

samuel commented May 29, 2015

For better compatibility with the standard parser should parse the rarer bits of the IDL.

https://thrift.apache.org/docs/idl

@lithammer
Copy link

We have this in most of our Thrift definitions and makes the parser crash:

namespace py.twisted txthrift.service.common

This is the error it generates.

$ generator common.thrift go
<reader>:5:1 (94): rule SyntaxError: parser: syntax error

Also, I'm not sure this was an appropriate issue for this.

@samuel
Copy link
Owner Author

samuel commented Jun 4, 2015

Interesting, I assume that's accepted by the official thrift tool? They're spec shows namespace scope as NamespaceScope ::= '*' | 'cpp' | 'java' | 'py' | 'perl' | 'rb' | 'cocoa' | 'csharp' but that's likely out of date. Following that the parser in this package just allows [a-z]+ . I'll change it to allow . in scopes.

@lithammer
Copy link

Interesting, I assume that's accepted by the official thrift tool?

Yes it is. The output is different as well from regular Python, not just the namespace/import path. So there's definitely support for it.

I'll change it to allow . in scopes.

Super! It seems e7cab3d fixed my issue. Thanks!

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