<commit_before># Spoofax Sunshine

Sunshine is a runtime library which runs Spoofax-based languages  outside of Eclipse.

## Limitations
Many. This is most likely an incomplete list:

* Only one language at a time
* No support for concrete object syntax embedding
* Completely single-threaded
* Not all Spoofax primitives are implemented
* Only supports multi-file analysis. Classic `editor-analyse` is not supported.

## Usage
Basically:

    java -cp sunshine.jar Main --help

This will cause Sunshine to start and display a list of supported parameters.

A basic example of command line parameters is given below, which causes Sunshine to analyse all files in the project directory incrementally and run the *webdsl-metrics* builder on *yellowgrass.app*.

    java -cp sunshine.jar Main
    --lang WebDSL
    --ctree ../../webdsl2/include/webdsl.ctree
    --jar ../../webdsl2/include/webdsl.jar
    --jar ../../webdsl2/include/webdsl-java.jar
    --jar ../../webdsl2/lib/task.jar
    --table ../../webdsl2/include/WebDSL.tbl
    --ssymb Unit
    --ext app
    
    --project ../../yellowgrass/
    --builder webdsl-metrics
    --build-on yellowgrass.app

### Hack for parsing
If you want to also get parse errors you need to change all calls to `parse-file` to something else which calls the Sunshine `parse-file` primitive, for example:

    sunshine-parse-file = prim("SSL_EXT_parse_file")

This primitive can parse files in any language that is registered. If parsing produces messages these are reported to console.

### Dependencies
The following are required in *lib* to compile and run Sunshine:

* Apache Commons IO: *commons-io-2.4.jar*
* Google Guava: *guava-14.0.jar*
* SDF2IMP: *sdf2imp.jar*
* Stratego/XT: *strategoxt.jar*
<commit_msg>Remove ‘single language’ as a limitation from Readme.<commit_after># Spoofax Sunshine

Sunshine is a runtime library which runs Spoofax-based languages  outside of Eclipse.

## Limitations
Many. This is most likely an incomplete list:

* No support for concrete object syntax embedding
* Completely single-threaded
* Not all Spoofax primitives are implemented
* Only supports multi-file analysis. Classic `editor-analyse` is not supported.

## Usage
Basically:

    java -cp sunshine.jar Main --help

This will cause Sunshine to start and display a list of supported parameters.

A basic example of command line parameters is given below, which causes Sunshine to analyse all files in the project directory incrementally and run the *webdsl-metrics* builder on *yellowgrass.app*.

    java -cp sunshine.jar Main
    --lang WebDSL
    --ctree ../../webdsl2/include/webdsl.ctree
    --jar ../../webdsl2/include/webdsl.jar
    --jar ../../webdsl2/include/webdsl-java.jar
    --jar ../../webdsl2/lib/task.jar
    --table ../../webdsl2/include/WebDSL.tbl
    --ssymb Unit
    --ext app
    
    --project ../../yellowgrass/
    --builder webdsl-metrics
    --build-on yellowgrass.app

### Hack for parsing
If you want to also get parse errors you need to change all calls to `parse-file` to something else which calls the Sunshine `parse-file` primitive, for example:

    sunshine-parse-file = prim("SSL_EXT_parse_file")

This primitive can parse files in any language that is registered. If parsing produces messages these are reported to console.

### Dependencies
The following are required in *lib* to compile and run Sunshine:

* Apache Commons IO: *commons-io-2.4.jar*
* Google Guava: *guava-14.0.jar*
* SDF2IMP: *sdf2imp.jar*
* Stratego/XT: *strategoxt.jar*

{'fraction_non_alphanumeric': 0.09738041002277904, 'fraction_numerical': 0.00683371298405467, 'mean_word_length': 3.3263546798029555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2415569', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1014, 'n_words': 409}