scala/scala-parser-combinators
58.8
Adequate · 14 November 2026
2.6k
lines of production code
Scala
primary language
5
measurements over time
What this system is
Features
Add JVM-specific PositionCache for parsing input
A new PositionCache trait is introduced in the JVM source directory (jvm/src/main/scala/scala/util/parsing/input/PositionCache.scala) to manage character index caching for parsing inputs. This implementation uses a ThreadLocal wrapping a WeakHashMap to store index arrays, ensuring that cache data is isolated per thread and does not leak references unnecessarily, which addresses potential memory or concurrency issues associated with using DynamicVariable in this context.
jvm · high confidence
Add Scala Native support for parsing input position caching
This change introduces a new \PositionCache\ trait within the \scala.util.parsing.input\ package, specifically located in the \native\ source directory. The implementation provides a no-op cache for character sequence positions, ensuring that parsing operations behave consistently on Scala Native by avoiding unsupported map operations. This enables the parsing library to function correctly on the Scala Native platform.
native · high confidence
Add Scala.js support to the syntactical parser components
The \StandardTokenParsers\, \StdTokenParsers\, and \TokenParsers\ classes in the \scala.util.parsing.combinator.syntactical\ package have been added to the shared source directory, enabling cross-compilation for Scala.js. This change allows users to utilize these specific token-parsing components in Scala.js environments, extending the library's compatibility beyond the JVM.
shared/src/main/scala/scala/util/parsing/combinator/syntactical · high confidence
Add standard token definitions for lexical parsing
The \token\ package now includes \StdTokens\ and \Tokens\ traits that define the core token types used by the combinator library. \Tokens\ provides the abstract \Token\ base class along with \ErrorToken\ and \EOF\ implementations, while \StdTokens\ extends this to offer standard token classes for keywords, numeric literals, string literals, and identifiers. This establishes the foundational data structures for lexical analysis within the parser combinators.
shared/src/main/scala/scala/util/parsing/combinator/token · high confidence
Initial release of Scala Parser Combinators library
The \scala.util.parsing.combinator\ package is introduced, providing a suite of generic parser combinator components. This includes the core \Parsers\ trait for constructing parsers from primitives and composition operators, \RegexParsers\ which adds implicit conversions for strings and regular expressions and handles whitespace skipping, and \JavaTokenParsers\ offering pre-defined parsers for Java-style identifiers and literals. The library also supports \PackratParsers\ for memoized, linear-time parsing with left-recursion support, and provides \ImplicitConversions\ to simplify applying functions to nested parser results.
shared/src/main/scala/scala/util/parsing/combinator · high confidence
Introduce lexical parsing components for Scala.js
Added new \Lexical.scala\, \Scanners.scala\, and \StdLexical.scala\ files to the \shared\ source directory, making the lexical parsing components available for cross-compilation to Scala.js. This change enables the \StdLexical\ parser to function in JavaScript environments by sharing the core scanner and tokenization logic previously available only on the JVM.
shared/src/main/scala/scala/util/parsing/combinator/lexical · high confidence
Introduce new parsing input abstractions for character streams and positions
The \scala.util.parsing.input\ package now includes a suite of new classes and traits to handle character input and source positioning. This adds \Reader\ as the base interface for character streams, with concrete implementations like \CharArrayReader\, \CharSequenceReader\, \PagedSeqReader\, and \StreamReader\ to read from arrays, character sequences, paged sequences, and Java readers respectively. It also introduces a position tracking system with the \Position\ trait, \NoPosition\, and \OffsetPosition\ (which supports line/column calculation and caching), along with a \Positional\ trait for associating positions with objects. These components provide the foundational input and location tracking capabilities for the parser combinator library.
shared/src/main/scala/scala/util/parsing/input · high confidence
Behavioural changes
Add no-op PositionCache for Scala.js
A new PositionCache trait has been added to the Scala.js source tree, providing a dummy implementation of the position index cache. This implementation uses an empty AbstractMap that ignores all put operations, effectively disabling position caching for the JavaScript platform to ensure compatibility with the 1.0.x series.
js · high confidence
Repository governance and documentation overhaul
The project has transitioned to a community-maintained model under the Apache 2.0 license, replacing previous licensing and governance structures. This change is accompanied by the addition of a Code of Conduct, a standardized .gitignore for modern Scala tooling (sbt, Metals, VS Code), and a .mailmap to consolidate contributor identities. Documentation has been refreshed with a new README featuring build badges for Scala 2.12, 2.13, and 3, links to Scaladex, and a dedicated Getting Started guide, while legacy support channels like Gitter and Travis-CI have been removed in favor of GitHub Discussions and GitHub Actions.
(repo-wide) · high confidence
Scala 2.13-specific implementation for PagedSeq
The library now provides version-specific implementations for the \ScalaVersionSpecificPagedSeq\ trait within the \scala.util.parsing.input\ package. For Scala 2.13 and later, the trait implements \iterableFactory\ to return \collection.IndexedSeq\, aligning with changes in the standard library's collection hierarchy. For Scala 2.12 and earlier, the trait remains empty, ensuring backward compatibility while allowing the codebase to leverage Scala 2.13-specific collection features where available.
shared/src/main/scala-2.13- · high confidence
Test coverage
Added comprehensive test suite for Scala parser combinators; Added tests for OffsetPosition line handling and PagedSeq stack overflow safety; Added unit tests for StdLexical tokenization and error handling.
Dependencies
Upgrade to Scala 2.13.18, 2.12.21, and 3.3.8 with cross-platform support
The build system has been updated to support Scala versions 2.13.18, 2.12.21, and 3.3.8, replacing previous versions. This change enables cross-compilation for JVM, JavaScript, and Native platforms, with specific compiler flags and test configurations tailored for each platform and Scala version (e.g., enabling unused warnings on Scala 2.13 and 3, and disabling forked tests for Scala.js and Native). The project also includes OSGi support for the JVM platform and maintains binary compatibility checks via MiMa, with specific filters applied.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 59 → 59 (-0.7)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 75 → 70 (-5.1)
- Architecture 100 → 100 (+0.0)
- Maturity 52 → 54 (+1.7)
- Readiness 56 → 53 (-3.4)
- Security 70 → 70 (+0.0)
Resolved (1)
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 2 commits — 2 feature/other, 0 fixes
By area
- (root) — 1 commit
- project/build.properties — 1 commit
Notable commits
- change: Update sbt, scripted-plugin to 1.13.1
- change: Update scala3-library, ... to 3.3.9
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
scala/scala-parser-combinators was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 82cf33ded8919ef832e07ee16eabd810695ba7f6 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.