Difference between revisions of "ProgClub.js"

From ProgClub
Jump to: navigation, search
(→‎Testing the pretty printer: TODO: browser info)
m (→‎Done: work, work...)
Line 116: Line 116:
 
Stuff that's done. Latest stuff on top.
 
Stuff that's done. Latest stuff on top.
  
* [[User:John|JE]] 2016-04-11: started on [[ProgClub standard JavaScript format]].
+
* [[User:John|JE]] 2016-04-11: started on [[ProgClub standard JavaScript format]] documentation.
 
* [[User:John|JE]] 2016-04-11: imported initial version from [https://www.progclub.org/pcrepo/jj5-test/trunk/ jj5-test] where it was incubated.
 
* [[User:John|JE]] 2016-04-11: imported initial version from [https://www.progclub.org/pcrepo/jj5-test/trunk/ jj5-test] where it was incubated.
 
* [[User:John|JE]] 2016-04-11: created the project in svn.
 
* [[User:John|JE]] 2016-04-11: created the project in svn.
 
* [[User:John|JE]] 2016-04-11: created project page.
 
* [[User:John|JE]] 2016-04-11: created project page.

Revision as of 01:39, 12 April 2016

ProgClub.js is the ProgClub JavaScript pretty printer. That's the software that formats your JavaScript code according to the ProgClub standard JavaScript format. 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 MIT 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 format. 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 on the command-line use the run.sh script:

$ ./run.sh

TODO: explain how to run in a browser.

Tasks

TODO

Things to do, in rough order of priority:

  • Pretty printing

Done

Stuff that's done. Latest stuff on top.