feat(job-array-one-based-index): bounded job-identity and element-selection parser in libxce (task 1.1)

parse_jobsel() parses c-a-ts-seq with an optional [k] or [a-b] under a
fixed grammar and check order (syntax, field widths, array-identity
alignment, element bound, reversed range), saturating digits so an
oversized number cannot wrap; plus is_array_tag(), jobsel_element_id(),
jobsel_strerror() and JOBID_FIELD_MAX_* constants. The selection-cases
conformance table runs in the libxce suite.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-01 09:01:57 +00:00
parent 590860f73d
commit 6e6c599d27
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
6 changed files with 501 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# Implementation Plan
- [ ] 1. Foundation: bounded job identities and array ID allocation in libxce
- [ ] 1.1 Add the bounded job-identity and element-selection parser
- [x] 1.1 Add the bounded job-identity and element-selection parser
- Parse a written identity with an optional single element or element range under the fixed grammar (no sign, no inner whitespace, optional surrounding spaces/tabs), accumulating digits with an overflow guard
- Evaluate the checks in the fixed order: syntax, field widths, alignment of the array identity when an element part is present, element-number bound, reversed range; report only the first failure
- Provide the array-marking test (tag equals the array tag only), the element-identity composition helper and a message for each rejection