Skip to content

Commit a25ae7c

Browse files
committed
Migrate sunshine docs from old documentation website
1 parent 85a76a0 commit a25ae7c

4 files changed

Lines changed: 28 additions & 12 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Running Spoofax from the Command-Line
2+
3+
You can run parts of a Spoofax language from the command-line with the Sunshine command-line interface. This is a separate Java application that loads a Spoofax language and gives the following options:
4+
5+
* Parse, to parse a single file and print the AST
6+
* Analyze, to parse and analyze a single file and print the analyzed AST
7+
* Transform, to parse, analyze and transform a single file and print the analyzed AST
8+
* Build, to run a builder on a single file, which will parse, possibly analyze, transform and print the result
9+
10+
Use the `--help` flag for details.
11+
12+
## Installation
13+
14+
On any release notes page you can find the Sunshine JAR under Command-line utilities. This is an executable JAR with a command-line interface.
15+
16+
## Nailgun
17+
18+
If you use the command-line interface often or multiple times you may wish to speed up the process.
19+
Every time to run Sunshine, there is overhead of the JVM startup time and the loading time for the Spoofax language.
20+
21+
If you wish to speed this up you can use the `server` command of Sunshine. This starts up a Nailgun server.
22+
Install the [Nailgun client](https://www.martiansoftware.com/nailgun/), then use `ng sunshine --help` to see the commands available.
23+
24+
The commands on the server are slightly different from the normal commands as loading a language is a separate command now.
25+
Languages are still loaded lazily, so the first time a language is used it will take longer, but after that things should run noticeably faster.
26+

content/howtos/statix/index.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

content/howtos/stratego/index.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,11 @@ nav:
152152
- howtos/installation/install-from-source.md
153153
- howtos/installation/install-spoofax-on-macos-arm.md
154154
- Static Semantics:
155-
- howtos/statix/index.md
156155
- howtos/statix/debugging.md
157156
- howtos/statix/migrating-from-nabl2.md
158157
- howtos/statix/migrating-to-concurrent-solver.md
159158
- howtos/statix/signature-generator.md
160159
- Transformation:
161-
- howtos/stratego/index.md
162160
- howtos/stratego/generate-signature.md
163161
- howtos/stratego/run-stratego-programs.md
164162
- howtos/stratego/generate-pretty-printer.md
@@ -169,6 +167,8 @@ nav:
169167
- howtos/stratego/stratego-1-to-2.md
170168
- Editor Services:
171169
- howtos/editor-services/rename-refactoring.md
170+
- Command-Line Interface:
171+
- howtos/command-line/index.md
172172
- Development:
173173
- howtos/development/index.md
174174
- howtos/development/spoofax-dev-requirements.md

0 commit comments

Comments
 (0)