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
Enhance documentation #42
Comments
Also, the README should document how to configure whitespace. |
@jameskeane: What do you mean by "configure whitespace"? |
Hi @dmajda, I am not sure if @jameskeane is referring to the same issue, but from my point of view the following code: var parser = PEG.buildParser("start = name:([a-v, 0-9, _])+ ");
console.log(parser.parse(" abc ")); Should either fail or avoid white spaces. Instead, a character array is returned with included white spaces as such [' ', 'a', 'b', 'c', ' ']. |
@zkhalapyan The @dignifiedquire I have yet to see a documentation system for JavaScript that does not suck (simple syntax, well-designed default template, does not force any coding style — especially in OO, allows inclusion of other documents like READMEs, allows using Markdown or other reasonable markup format,...). Basically I'd like to see YARD for JavaScript. (Yes, I know, it's hard to do such a tool. Harder than for Ruby.) My current idea about the documentation format therefore is bunch of Markdown files & a script to make a simple website from them. Anyway, I'd like to look at documentation in the 0.9 cycle, after solving more important problems with PEG.js itself in 0.8. It's not my focus now. |
@dmajda Maybe then a github page? Looks nice and is very simple to setup. I can provide a pull request for that if you'd like. |
I agree with @dignifiedquire - github wiki pages would be very convenient for writing docs. |
Updated the OP to reflect my current direction for this issue. |
Realistically, the documentation should be moved to extracted documentation at this point. All of the existing docs can be imported without problems if the right tool is chosen I will happily get that done in a few weeks if the codebase is put into a position to accept PRs, and if a maintainer is willing to merge and release |
Github wikis are easy looking, but they won't be kept up to date any more than any other page is. Extracted documentation, which is in the codebase, will be, and then having it put up in production is a trivial use of github pages I can have a proof of concept done in an hour |
Right now, the documentation is just a couple of markdown files with simple examples and quick overviews. We should add more documents:
Tutorial/Quick Start
that shows the capabilities of PEG.js on a gradually improved example grammar/parserThe API references, AST docs and specs should be detailed enough so that anybody would be able to reimplement PEG.js just using these documents.
The text was updated successfully, but these errors were encountered: