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

Eof parse error #30

Open
choubacha opened this issue Feb 25, 2018 · 3 comments
Open

Eof parse error #30

choubacha opened this issue Feb 25, 2018 · 3 comments

Comments

@choubacha
Copy link

I'm getting an EOF error when trying to parse the stellar x files:

$ xdrgen xdr/Stellar-SCP.x
Failed: parse error: Eof: namespace stellar
{

https://github.com/stellar/stellar-core/tree/master/src/xdr

Any idea what might cause this?

@jsgf
Copy link
Owner

jsgf commented Feb 26, 2018

namespace stellar at the top of the file is not part of the grammar it parses. I've never seen that in a .x file before, so maybe it's a new/non-standard extension.

Edit: yep https://github.com/xdrpp/xdrpp/blob/47930c21ef0d5047dad79a5c87b4ff2412d0cbdd/doc/xdrc.1.md#extensions-to-rfc4506

@jsgf
Copy link
Owner

jsgf commented Feb 26, 2018

Also the %#include "xdr/Stellar-types.h" won't work because that only makes sense for C/C++. You need to define all the types within the .x file so that it can generate appropriate corresponding Rust types.

@choubacha
Copy link
Author

Interesting, I'll need to read the full rfc. Stellar uses these files for several libraries. The namespace seems like a nice addition to specify a mod it should be put into.

As for the includes, it may take some modifications to make them work for rust directly, which would be less ideal because maintenance of them as a separate set of .x will be frustrating. But the may do that for the other languages.

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