Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
a60ee97
feat: add grammar static analysis and error recovery tests
mikecovlee Jul 24, 2026
3380d21
chore: update version numbers across multiple package files
mikecovlee Jul 30, 2026
b11cb34
Drop-in parsergen/parsergen_cxx support via PARSERGEN_IMPL env var
mikecovlee Aug 9, 2026
330ad6d
Fix unified API usage: .ast() -> .get_ast(), .code_buff() -> .get_cod…
mikecovlee Aug 9, 2026
6198753
CI: install parsergen_cxx via cspkg build (proper extension installat…
mikecovlee Aug 9, 2026
cca9d99
CI: checkout parsergen with submodules (covscript-regex/pcre2 needed …
mikecovlee Aug 10, 2026
acd6574
CI: set CS_DEV_PATH when building parsergen_cxx (parsergen_cni target…
mikecovlee Aug 10, 2026
e964791
CI: fix cspkg install syntax for parsergen_cxx (build <dir> --install…
mikecovlee Aug 10, 2026
b6aa867
CI: pin Unix Makefiles generator for parsergen build (avoid Xcode def…
mikecovlee Aug 10, 2026
ca34348
CI: fix grammar analysis cs invocation - drop multiple -i, use cspkg …
mikecovlee Aug 10, 2026
fb7e95c
CI: install parsergen_cxx after install --fix to avoid revert, use pa…
mikecovlee Aug 10, 2026
331981b
chore: enforce LF via .gitattributes (match .editorconfig/CI)
mikecovlee Sep 9, 2026
de523ab
build: gitignore local parsergen artifacts used for C++/CNI 联调 (cse w…
mikecovlee Sep 9, 2026
9581022
build: gitignore local sdk_extension.cse 联调 artifact
mikecovlee Sep 9, 2026
47cc746
test: mkdir .ecs_output before codegen in test_cxx_migrate (was silen…
mikecovlee Sep 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce LF line endings across the repo (match .editorconfig / CI).
* text=auto eol=lf
78 changes: 75 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# ecs is a CovScript-to-CovScript transpiler. This CI:
# 1. Downloads a pre-built CovScript SDK from csbuild releases
# 2. Configures cspkg to use the bundled package repository
# 3. Installs remote dependencies (parsergen, regex, codec, sdk_extension)
# 4. Builds and installs ecs/ecs_parser/ecs_generator/ecs_bootstrap from local source
# 5. Runs non-interactive unit tests in unit_tests/
# 3. Builds parsergen_cxx (C++ parser extension) from source
# 4. Installs remote dependencies (parsergen, regex, codec, sdk_extension)
# 5. Builds and installs ecs/ecs_parser/ecs_generator/ecs_bootstrap from local source
# 6. Runs non-interactive unit tests in unit_tests/

name: CI

Expand Down Expand Up @@ -122,6 +123,49 @@ jobs:
CS_HOME="${{ steps.sdk.outputs.cs_home }}"
echo "COVSCRIPT_HOME=${CS_HOME}" >> "$GITHUB_ENV"
echo "${CS_HOME}/bin" >> "$GITHUB_PATH"
echo "PARSERGEN_IMPL=parsergen_cxx" >> "$GITHUB_ENV"

# ------------------------------------------------------------------ #
# 5.5. Build parsergen_cxx from source #
# ------------------------------------------------------------------ #
- name: Checkout parsergen
uses: actions/checkout@v5
with:
repository: mikecovlee/parsergen
ref: cxx_impl
path: parsergen-src
submodules: recursive

- name: Build parsergen_cxx (Unix)
if: runner.os != 'Windows'
shell: bash
env:
CS_DEV_PATH: ${{ steps.sdk.outputs.cs_home }}/
run: |
mkdir -p parsergen-src/cpp/build && cd parsergen-src/cpp/build
cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --target parsergen_cni --parallel 4
mkdir -p ../../build/imports
cp parsergen_cxx.cse ../../build/imports/

- name: Build parsergen_cxx (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake make
path-type: inherit

- name: Build parsergen_cxx (Windows build)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export CS_DEV_PATH="$(cygpath -u "${{ steps.sdk.outputs.cs_home }}")/"
mkdir -p parsergen-src/cpp/build && cd parsergen-src/cpp/build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build . --target parsergen_cni -- -j4
mkdir -p ../../build/imports
cp parsergen_cxx.cse ../../build/imports/

# ------------------------------------------------------------------ #
# 6. Install remote dependencies + build local packages #
Expand All @@ -138,10 +182,29 @@ jobs:
cspkg build . --install --yes
# Fix dependencies
cspkg install --fix --yes
# Install parsergen_cxx extension + updated parsergen (built from source
# in step 5.5). Done after 'install --fix' so the newer parsergen is
# not reverted to the older cspkg-repo version.
cspkg build parsergen-src --install parsergen_cxx parsergen --yes
echo ""
echo "=== Installed packages ==="
cspkg list

# ------------------------------------------------------------------ #
# 6.5. Grammar static analysis #
# Uses the CovScript parsergen (PARSERGEN_IMPL=parsergen): the #
# analyzer is a CovScript package designed for the script-built #
# grammar structure. #
# ------------------------------------------------------------------ #
- name: Grammar analysis
shell: bash
env:
PARSERGEN_IMPL: parsergen
run: |
echo "=== Grammar Static Analysis ==="
cspkg install parsergen_analysis --yes
cs misc/check_grammar.csc

# ------------------------------------------------------------------ #
# 7. Run unit tests #
# ------------------------------------------------------------------ #
Expand Down Expand Up @@ -187,3 +250,12 @@ jobs:
run: |
echo "=== Formatter Correctness Tests ==="
bash format_tests/run.sh

# ------------------------------------------------------------------ #
# 10. Error recovery tests #
# ------------------------------------------------------------------ #
- name: Error recovery tests
shell: bash
run: |
echo "=== Error Recovery Tests ==="
bash tests/run_recovery.sh
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.DS_Store
.ecs_output/
cspkg-repo/
cspkg-repo/
imports/parsergen_cxx.cse
# local 联调 parsergen artifacts (provided at build time, not committed)
imports/parsergen.csp
imports/parsergen_debug.csp
imports/sdk_extension.cse
2 changes: 1 addition & 1 deletion csbuild/ecs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Name": "ecs",
"Info": "Extended CovScript(ECS Lang) Header",
"Author": "Michael Lee",
"Version": "1.4.2",
"Version": "1.4.3",
"Target": "imports/ecs.csp",
"Dependencies": [
"sdk_extension"
Expand Down
2 changes: 1 addition & 1 deletion csbuild/ecs_bootstrap.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Name": "ecs_bootstrap",
"Info": "Extended CovScript(ECS Lang) Bootstrap",
"Author": "Michael Lee",
"Version": "1.7.1",
"Version": "1.8.0",
"Target": "imports/ecs_bootstrap.csp",
"Dependencies": [
"parsergen",
Expand Down
2 changes: 1 addition & 1 deletion csbuild/ecs_generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Name": "ecs_generator",
"Info": "Extended CovScript(ECS Lang) Generator",
"Author": "Michael Lee",
"Version": "4.1.0.3",
"Version": "4.1.0.4",
"Target": "imports/ecs_generator.csp",
"Dependencies": [
"parsergen",
Expand Down
2 changes: 1 addition & 1 deletion csbuild/ecs_parser.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Name": "ecs_parser",
"Info": "Extended CovScript(ECS Lang) Parser",
"Author": "Michael Lee",
"Version": "1.4.0",
"Version": "1.4.1",
"Target": "imports/ecs_parser.csp",
"Dependencies": [
"parsergen",
Expand Down
4 changes: 2 additions & 2 deletions ecs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env cs
#
# Extended Covariant Script Launcher v1.0.0
# Extended Covariant Script Launcher v1.0.1
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (C) 2017-2025 Michael Lee(李登淳)
# Copyright (C) 2017-2026 Michael Lee(李登淳)
#
# Email: mikecovlee@163.com
# Github: https://github.com/mikecovlee
Expand Down
6 changes: 3 additions & 3 deletions imports/ecs.csp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Extended Covariant Script Header: v1.4.2
# Extended Covariant Script Header: v1.4.3
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a clone of the License at
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Expand All @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# cloneright (C) 2017-2026 Michael Lee(李登淳)
# Copyright (C) 2017-2026 Michael Lee(李登淳)
#
# Email: mikecovlee@163.com
# Github: https://github.com/mikecovlee
Expand Down
Loading