diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 67ad006..7d4a6d2 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,4 +1,4 @@ -# Gitea act_runner (labels: ubuntu-latest / ubuntu-24.04 / ubuntu-22.04). +# Gitea act_runner (labels: ubuntu-latest / ubuntu-24.04 / ubuntu-22.04). # # One runner means one job at a time, so the cheap tier has to stay cheap: # push : baseline only, 11 bits, and not for docs-only commits @@ -17,6 +17,12 @@ on: pull_request: workflow_dispatch: +# A newer push cancels the older run instead of queueing behind it -- with a +# single runner that is the difference between one job and a backlog. +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: baseline: name: baseline (11 bit) diff --git a/drv/calc_lex.r8asm b/drv/calc_lex.r8asm index b7f94dc..c7e85bc 100644 --- a/drv/calc_lex.r8asm +++ b/drv/calc_lex.r8asm @@ -17,10 +17,20 @@ ; "语义上会咬人的几条");每轮先把 R 重置成 200,数字/命令分支只负责覆盖 R, ; 最后统一 output R —— 于是"跳过另一条分支"不需要 if/else。 ; +; 边界:数字只按任务要求用 bit4 粗筛,所以协议外的 0x10..0x1F、0x3A..0x3F +; 也会落进数字分支(本阶段不喂这些字符);协议内的数字/六个命令/空格/CR/ +; LF/TAB/大小写字母都按上面的规则输出。 +; ; 验证(8 个字符,正好读满;六个命令和空格都在里面): ; build/Release/r8forge_derive.exe drv/calc_lex.r8asm 0 -i "9 *+,-./" ; in 9 *+,-./ ; out 10 200 100 101 102 103 104 105 +; +; 这条纸带 45378 字符;上面这个输入 17120 步。 +; +; 固定读 8 个字符:更长的输入只吃前 8 个,剩下的不产生输出(stage 1 没有 +; EOF 处理)。例如 -i "0 5 9 + - . , *" 只读 "0 5 9 + "(含空格),输出 +; 1 200 6 200 10 200 101 200;要整行分派得等 stage 5 的主循环。 %include "asm/lib.r8asm" %include "asm/raw_sub_nc.r8asm" %include "asm/raw_add_nc.r8asm"