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

Grammars2JSON.main() ignores command line and has hardcoded input file name #13

Open
jcflack opened this issue Mar 29, 2019 · 3 comments

Comments

@jcflack
Copy link

jcflack commented Mar 29, 2019

The 1.0.4 release of Grammars2JSON has a main method with a hard-coded input file name, rather than honoring command line arguments.

It is unfortunate because now it is referred to from the exificient.js demo web page, and the demo requires access to a generated grammar file.

https://exificient.github.io/javascript/

A grammar can be generated by running Grammars2JSON under jdb and setting a breakpoint at line 672, then storing the desired file name into xsd. But it is a bit of distraction from the demo.

@danielpeintner
Copy link
Member

@jcflack thanks for pointing us to this short-coming. I proposed a simple fix (see d964770)

FYI, https://exificient.github.io/javascript/ does usually not need to create grammar files on its own for JSON. This process is only needed for any other XML schema...

@jcflack
Copy link
Author

jcflack commented Apr 1, 2019

FYI, https://exificient.github.io/javascript/ does usually not need to create grammar files on its own for JSON. This process is only needed for any other XML schema...

Thanks!

I was referring only to the live in-browser demo located at that page. Unless I missed something, it comes pre-populated with a 'notebook' XML instance in the editorXML pane, but refuses to process it unless I first upload a notebook.xsd.grs from my local filesystem.

I did not see a way to obtain a copy of notebook.xsd.grs other than by downloading notebook.xsd from github and running Grammars2JSON on it.

That makes the "demo" page really a "demo" only for people who are fairly persistent. :)

@danielpeintner
Copy link
Member

I see what you refer to. In the case of XML one needs to generally create the grammars based on a dedicated schema.

Having said that, for the notebook example we could simply link the required grammars what we do now.
Please take a look at https://exificient.github.io/javascript/ again

Thanks. Hope this resolves this issue.

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