Decorative site banner
Project icon

com.io7m.jlexing

  • About
  • Releases
  • Manual
  • Sources
  • License
  • Issues
Maven Central Version Maven Snapshot Code Coverage

jlexing


A package containing various types commonly used in lexical analyzers and parsers.

Features


  • Common immutable lexical position types.
  • High coverage test suite.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Motivation


Many io7m projects contain hand-written parsers and lexers. The jlexing package exists to declare common lexer types so that nearly-identical versions of those types don't have to be repeatedly written for every project.

Usage


The LexicalPositionType represents a span in a region of text. It includes a mutable builder for constructing immutable LexicalPosition values:

final LexicalPosition.Builder<Path> b0 = LexicalPosition.builder(); b0.setLine(23); b0.setColumn(24); b0.setColumnEnd(30); b0.setFile(Optional.of(path0)); b0.setFile(path1); final LexicalPosition<Path> p = b0.build();

Releases & Development Snapshots


Releases


You can subscribe to the atom feed to be notified of project releases.

The most recently released version of the package is 3.2.0.

3.2.0 Release (2024-05-07Z)

  • Update org.immutables:value:2.10.0 → 2.10.1.

The compiled artifacts for the release (and all previous releases) are available on Maven Central.

Maven Modules


<dependency> <group>com.io7m.jlexing</group> <artifactId>com.io7m.jlexing.tests</artifactId> <version>3.2.0</version> </dependency><dependency> <group>com.io7m.jlexing</group> <artifactId>com.io7m.jlexing.core</artifactId> <version>3.2.0</version> </dependency>

Previous Releases


The changelogs for the most recent previous releases are as follows:

3.1.0 Release (2022-12-06Z)

  • Add the ability for lexical positions to represent spans.

3.0.0 Release (2022-04-09Z)

  • Require JDK 17 (Backwards incompatible)

2.0.0 Release (2017-12-07Z)

  • Add LexicalType interface that providers can implement
  • Publish Java 9 modules, require JDK 9 (Backwards incompatible)

1.1.0 Release (2017-04-25Z)

  • Add convenient LexicalPositions type to construct positions tersely.

Development Snapshots


At the time of writing, the current unstable development version of the package is 3.3.0-SNAPSHOT.

Development snapshots may be available in the Central Portal Snapshots repository. Snapshots are published to this repository every time the project is built by the project's continuous integration system, but snapshots do expire after around ninety days and so may or may not be available depending on when a build of the package was last triggered.

Manual


This project does not have any user manuals or other documentation beyond what might be present on the page above.

Sources


This project uses Git to manage source code.

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

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

Issues


This project uses GitHub Issues to track issues.

License


Copyright © 2023 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.

Last Updated 2025-08-09T14:56:47Z