https://github.com/apache/sling-org-apache-sling-repoinit-parser
Apache Sling RepoInit Parser
https://github.com/apache/sling-org-apache-sling-repoinit-parser
java sling
Last synced: over 1 year ago
JSON representation
Apache Sling RepoInit Parser
- Host: GitHub
- URL: https://github.com/apache/sling-org-apache-sling-repoinit-parser
- Owner: apache
- License: apache-2.0
- Created: 2017-10-18T16:21:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T17:49:26.000Z (over 1 year ago)
- Last Synced: 2024-10-28T19:00:31.149Z (over 1 year ago)
- Topics: java, sling
- Language: Java
- Homepage: https://sling.apache.org/
- Size: 380 KB
- Stars: 4
- Watchers: 30
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://sling.apache.org)
[](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-repoinit-parser/job/master/) [](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-repoinit-parser/job/master/test/?width=800&height=600) [](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-repoinit-parser) [](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-repoinit-parser) [](https://www.javadoc.io/doc/org.apache.sling/org.apache.sling.repoinit.parser) [](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.repoinit.parser%22) [](https://github.com/apache/sling-aggregator/blob/master/docs/groups/repoinit.md) [](https://www.apache.org/licenses/LICENSE-2.0)
# Apache Sling RepoInit Parser
This module is part of the [Apache Sling](https://sling.apache.org) project.
It implements the [Repository Initialization language](https://sling.apache.org/documentation/bundles/repository-initialization.html) parser.
To parse repoinit statements use the [RepoInitParser](./src/main/java/org/apache/sling/repoinit/parser/RepoInitParser.java) service.
The companion [jcr-repoinit](https://github.com/apache/sling-org-apache-sling-jcr-repoinit) module can execute the resulting `Operations` on a
JCR content repository.
The JavaCC parser grammar is defined in the [RepoInitGrammar.jjt](./src/main/javacc/RepoInitGrammar.jjt) file, which has links to
the JavaCC documentation.
## Dependent modules
The [Feature Model Analyser](https://github.com/apache/sling-org-apache-sling-feature-analyser) uses this
parser to validate repoinit statements embedded in feature models. It should be kept up to date with new
releases of this module.
The [bnd.bnd](./bnd.bnd) file defines an `org.apache.sling.repoinit.language` OSGi capability which indicates
the version of the repoinit language that this parser implements. That value should be incremented when the
grammar changes, so that modules that depend on those changes can require the appropriate version.
## Documenting the language
The [Sling Website Repository Initialization page](https://sling.apache.org/documentation/bundles/repository-initialization.html) describes
the general repoinit principles and is meant to show examples of _all_ possible language constructs.
The `concatenate-test-scenarios.sh` script found in this folder can be used to update the language examples
found at the end of that page.