Project icon

com.io7m.jsx

Build status Maven Central Codecov

The jsx package implements a configurable S-expression parser.

(f (g (x y)))

The parser can be configured to optionally accept/reject various syntactic features such as multi-line strings and square brackets.

Contents

Features

  • Hand-coded lexer and parser with full support for tokens using characters outside of the Unicode BMP
  • Optional square brackets
    [f (g [x y])]
  • Optional multi-line strings
  • Fully documented (Javadoc) and expression language specification.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Releases

The most recently published version of the software is 4.0.0.

Source code and binaries are available from the repository.

Documentation

Documentation for the 4.0.0 release is available for reading online.

Documentation for current and older releases is archived in the repository.

User documentation

Maven

The following is a complete list of the project's modules expressed as Maven dependencies:

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.cmdline</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.core</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.documentation</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.parser.api</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.parser</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.prettyprint</artifactId>
  <version>4.0.0</version>
</dependency>

<dependency>
  <groupId>com.io7m.jsx</groupId>
  <artifactId>com.io7m.jsx.tests</artifactId>
  <version>4.0.0</version>
</dependency>

Each release of the project is made available on Maven Central within ten minutes of the release announcement.

Changes

Subscribe to the releases atom feed.

2024-05-10 Release: com.io7m.jsx 4.0.0
2024-04-20 Change: Update ch.qos.logback:logback-classic:1.4.14 → 1.5.6.
2024-04-20 Change: Update org.slf4j:slf4j-api:2.0.10 → 2.0.13.
2024-04-20 Change: Update junit.version:5.10.1 → 5.10.2.
2024-05-08 Change: Update com.io7m.jlexing:com.io7m.jlexing.core:3.1.0 → 3.2.0.
2024-05-10 Change: Move to new organization.
2024-05-10 Change: (Backwards incompatible) Require JDK 21.
2024-05-10 Change: Update com.io7m.jeucreader:com.io7m.jeucreader.core:3.0.0 → 3.0.1.
2023-07-24 Release: com.io7m.jsx 3.1.1
2023-07-24 Change: Add missing escapes from the trivial serializer.
2023-06-19 Release: com.io7m.jsx 3.1.0
2023-06-19 Change: Provide a more complete solution to escape characters in printers.
2023-06-19 Release: com.io7m.jsx 3.0.3
2023-06-19 Change: Ensure slashes are escaped in quoted string printers.
2023-06-19 Release: com.io7m.jsx 3.0.2
2023-06-19 Change: Ensure pretty printers escape quotes. (tickets: 13 )
2023-06-19 Change: Update ch.qos.logback:logback-classic 1.4.7 → 1.4.8.
2022-09-18 Release: com.io7m.jsx 3.0.1
2022-09-18 Change: Improve lexical information in error messages for unexpected EOFs.
2022-09-18 Change: ch.qos.logback:logback-classic -> 1.3.0-alpha14 -> 1.4.1
2022-09-18 Change: org.junit.jupiter:junit-jupiter-api -> 5.8.1 -> 5.9.0
2022-09-18 Change: org.junit.jupiter:junit-jupiter-engine -> 5.8.1 -> 5.9.0
2022-09-18 Change: org.slf4j:slf4j-api -> 2.0.0-alpha7 -> 2.0.1
2022-04-09 Release: com.io7m.jsx 3.0.0
2022-03-13 Change: (Backwards incompatible) Require JDK 17. Implement structures as records.
2017-12-07 Release: com.io7m.jsx 2.0.0
2017-12-07 Change: (Backwards incompatible) Make exceptions implement LexicalType (tickets: 7 )
2017-12-07 Change: Publish services (tickets: 5 )
2017-11-28 Release: com.io7m.jsx 1.0.0
2017-11-26 Change: (Backwards incompatible) Use URIs instead of Paths in lexical information
2017-11-26 Change: (Backwards incompatible) Use immutable value types in the definitions of SExpressionType
2017-11-26 Change: (Backwards incompatible) SExpressionListType is now Iterable
2017-11-28 Change: (Backwards incompatible) Lexical information for SExpressionType is no longer Optional
2017-11-24 Release: com.io7m.jsx 0.9.0
2017-11-24 Change: Add configurable comment tokens (tickets: 1 )
2017-11-24 Change: Optionally start lexical positions at a given line (tickets: 2 )
2017-11-24 Release: com.io7m.jsx 0.8.0
2016-11-10 Change: Add combinators for validating S-expressions.
2017-04-06 Change: Rename project. Use the new primogenitor POM and 2017 project conventions.
2017-04-06 Change: (Backwards incompatible) Use jlexing 0.2.1, numerous API changes for consistency (see japicmp report for details).
2017-11-16 Change: (Backwards incompatible) All modules are now Java 9 modules. JDK 9 is now required.
2017-11-16 Change: (Backwards incompatible) Removed dependency on com.io7m.jnull.
2016-10-04 Release: com.io7m.jsx 0.7.0
2016-10-04 Change: Add command line tool for formatting s-expressions.
2016-08-05 Release: com.io7m.jsx 0.6.0
2016-08-05 Change: Update plugins and dependencies.
2016-08-05 Change: The produced jars are now OSGi bundles.
2016-08-05 Change: (Backwards incompatible) Reorganize APIs and implementations into their own modules/bundles.
2016-08-05 Change: (Backwards incompatible) Use immutables.org to generate configuration types.
2016-05-31 Release: com.io7m.jsx 0.5.1
2016-05-31 Change: Switch to an iterative implementation of the lexer that uses constant stack space (tickets: 4 )
2016-05-29 Release: com.io7m.jsx 0.5.0
2016-05-11 Change: (Backwards incompatible) Remove list extension from the SExpressionListType (tickets: 3 )
2016-05-11 Change: Add pretty printers based on JPPLib
2015-11-12 Release: com.io7m.jsx 0.4.1
2015-11-12 Change: (Backwards incompatible) Make filenames part of the lexer configuration.
2015-10-20 Release: com.io7m.jsx 0.4.0
2015-10-20 Change: (Backwards incompatible) Rewrite to use Java 8 and rename all types.
2015-03-28 Release: com.io7m.jsx 0.2.0
2015-03-28 Change: Initial release.

Sources

This project uses Git to manage source code.

Repository: https://www.github.com/io7m-com/jsx

$ git clone https://www.github.com/io7m-com/jsx

License

Copyright © 2024 Mark Raynsford <code@io7m.com> https://www.io7m.com

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.

Bug Tracker

The project uses GitHub Issues to track issues.