ProgClub.js

From ProgClub
Revision as of 00:31, 12 April 2016 by John (talk | contribs) (Imported from jj5-test...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ProgClub.js is the ProgClub JavaScript pretty printer. That's the software that formats your JavaScript code according to the ProgClub JavaScript syntax standard. For other projects see projects.

Status

Under way. Not released yet, there's stuff TODO.

Motivation

Why this software? Because we wanted a pretty-printer for dealing with (normalizing) the syntax used by the JsPHP upstream developers. By normalizing the code we wanted to import we could fix issues with the syntax we didn't like (they don't use semicolons!) and also make sure whitespace changes were irrelevant.

Administration

Contributors

Members who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.

Upstream contributors:

Copyright

Copyright 2016, Contributors.

License

Licensed under the {New BSD, MIT, or GPL, or link to license file} license.

Components

Libraries, tools, services or media from third parties used under license:

Resources

Downloads

No downloads at this time.

Source code

The repository can be browsed online:

https://www.progclub.org/pcrepo/progclub.js/branches/0.1

The latest stable released version of the code is available from:

https://www.progclub.org/svn/pcrepo/progclub.js/tags/latest/0.1

Or if you want the latest version for development purposes:

https://www.progclub.org/svn/pcrepo/progclub.js/branches/0.1

Links

Specifications

Functional specification

The functional specification describes what the project does.

The software processes an input JavaScript file and outputs that file in the ProgClub standard JavaScript syntax. It can be run on the command-line (in Node.js) or in a web browser.

Technical specification

The technical specification describes how the project works.

The project uses an ANTLR4 compiler compiler to generate an ECMAScript (Standard ECMA-262 5.1 Edition from June 2011) lexer/parser which we use in a custom processor (written in JavaScript) which formats output.

Notes

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

Copy and paste your way to victory!

Notes for developers

If you're looking to set up a development environment for this project here's what you need to know:

Generating the lexer/parser

To generate the lexer/parser you need to use the ANTLR4 tool, which is a Java application. You only need to do this if you've modified the ECMAScript grammar. Run the build-parser.sh script to update the lexer/parser components:

$ ./build-parser.sh

Testing the pretty printer

To test the pretty printer use the run.sh script:

$ ./run.sh

Tasks

TODO

Things to do, in rough order of priority:

  • Pretty printing

Done

Stuff that's done. Latest stuff on top.

  • JE 2016-04-11: imported initial version from jj5-test where it was incubated.
  • JE 2016-04-11: created the project in svn.
  • JE 2016-04-11: created project page.