expressir 2.4.51-arm-linux → 2.4.52-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/expressir.gemspec +1 -1
- data/grammar-parg/atoms_to_parg.rb +136 -14
- data/grammar-parg/atoms_to_parg_jit.rb.txt.bak +315 -0
- data/grammar-parg/deepest.rb +21 -0
- data/grammar-parg/express-grammar.artifact.json +1 -1
- data/grammar-parg/express-grammar.parg +145 -295
- data/grammar-parg/express_keywords.parg +123 -130
- data/grammar-parg/express_literals.parg +5 -11
- data/grammar-parg/express_operators.parg +23 -32
- data/grammar-parg/express_remarks.parg +5 -17
- data/grammar-parg/parity-model.rb +3 -1
- data/grammar-parg/parity.sh +11 -7
- data/lib/expressir/3.2/expressir_core.so +0 -0
- data/lib/expressir/3.3/expressir_core.so +0 -0
- data/lib/expressir/3.4/expressir_core.so +0 -0
- data/lib/expressir/4.0/expressir_core.so +0 -0
- data/lib/expressir/express/core.rb +7 -0
- data/lib/expressir/express/grammar/express-grammar.artifact.json +1 -1
- data/lib/expressir/express/grammar/parg/express_keywords.parg +125 -0
- data/lib/expressir/express/grammar/parg/express_literals.parg +8 -0
- data/lib/expressir/express/grammar/parg/express_operators.parg +25 -0
- data/lib/expressir/express/grammar/parg/express_remarks.parg +7 -0
- data/lib/expressir/express/grammar/parser.rb +10 -1
- data/lib/expressir/express/remark_scanner.rb +21 -0
- data/lib/expressir/version.rb +1 -1
- metadata +9 -5
- data/grammar-parg/express.parg +0 -57
- data/grammar-parg/express_structure.parg +0 -11
data/grammar-parg/parity.sh
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Corpus parity (issue #578 STEP 1 gate): every .exp fixture must parse
|
|
3
3
|
# identically through the DSL and the edition-2 artifact.
|
|
4
|
-
# PARITY_LIB: a parsanol checkout whose lib/ carries
|
|
5
|
-
# PARITY_LIB=~/src/lutaml/parsanol-
|
|
4
|
+
# PARITY_LIB: a parsanol checkout whose lib/ carries unreleased fixes —
|
|
5
|
+
# PARITY_LIB=~/src/lutaml/parsanol-noedition1/lib ./parity.sh
|
|
6
|
+
# (applies to the CLI artifact lane too, not just the in-process one)
|
|
6
7
|
set -uo pipefail
|
|
7
8
|
cd "$(dirname "$0")"
|
|
8
|
-
EXE
|
|
9
|
+
EXE="${PARSANOL_EXE:-$(bundle exec which parsanol)}"
|
|
10
|
+
ARTIFACT="$(pwd)/express-grammar.artifact.json"
|
|
9
11
|
LIB="${PARITY_LIB:-}"
|
|
10
12
|
|
|
11
13
|
# Oversized fixtures bypass the CLI argv limit: parse through the
|
|
@@ -13,14 +15,16 @@ LIB="${PARITY_LIB:-}"
|
|
|
13
15
|
big_parity() {
|
|
14
16
|
ruby ${LIB:+-I "$LIB"} -e '
|
|
15
17
|
require "parsanol"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
# The split artifact replays its source; the component sources must
|
|
19
|
+
# sit beside it (imports_dir), exactly as the gem lane passes them.
|
|
20
|
+
artifact = Parsanol::PARG::Artifact.from_json(
|
|
21
|
+
File.read(ARGV[1]), imports_dir: File.dirname(ARGV[1]))
|
|
18
22
|
begin
|
|
19
23
|
artifact.parse("syntax", File.read(ARGV[0]), mode: :ruby)
|
|
20
24
|
exit 0
|
|
21
25
|
rescue StandardError
|
|
22
26
|
exit 1
|
|
23
|
-
end' "$1" > /dev/null 2>&1
|
|
27
|
+
end' "$1" "$ARTIFACT" > /dev/null 2>&1
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
pass=0; fail=0; skipped=0
|
|
@@ -43,7 +47,7 @@ for f in $(find /Users/mulgogi/src/lutaml/expressir/spec -name "*.exp" | sort);
|
|
|
43
47
|
fi
|
|
44
48
|
src="$(cat "$f")"
|
|
45
49
|
# artifact accept?
|
|
46
|
-
if ruby "$EXE" parg parse
|
|
50
|
+
if ruby ${LIB:+-I "$LIB"} "$EXE" parg parse "$ARTIFACT" --entry syntax "$src" \
|
|
47
51
|
> /tmp/par-artifact.log 2>&1; then art=ok; else art=fail; fi
|
|
48
52
|
# DSL accept?
|
|
49
53
|
if bundle exec ruby -e '
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -40,6 +40,13 @@ module Expressir
|
|
|
40
40
|
JSON.parse(::Expressir::Core.parse_to_model_hash(source, path))
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
# Scan remarks (issue #20): an Array of Hashes mirroring
|
|
44
|
+
# RemarkScanner::Remark's fields (position, end_position, line,
|
|
45
|
+
# text, tag, format), straight from the Rust scanner.
|
|
46
|
+
def self.scan_remarks(source)
|
|
47
|
+
::Expressir::Core.scan_remarks(source)
|
|
48
|
+
end
|
|
49
|
+
|
|
43
50
|
# Parse EXPRESS source into the hydrated model directly: the
|
|
44
51
|
# extension walks the wire definition once and constructs every
|
|
45
52
|
# node through Serializable.instantiate (lutaml-model's fast
|