diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-07-15 20:00:24 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-07-15 20:00:24 +0900 |
| commit | 7249ca3a6fdf51f6b7ea66ac6854edd5e02ae5ec (patch) | |
| tree | 37a42621228a6f7a87ef02ae08d4613b2151a1a5 /src/mml_composemusic_mcp/parser_base.py | |
| parent | 9cbb60cf68ab2a8bd9ccc0dca4fbd46f2ae9b928 (diff) | |
feat: MMLパーサーと意味解析を厳格化
- ppmckの終端分岐付きリピートとL制御トラックを実装
- case、構文構造、音長、エフェクト値域の検証を強化
- Pyxel拡張コマンドのarityと参照検証を追加
- リピート展開上限と構文・意味エラー時の合成停止を追加
- BNF、設計書、適合監査、回帰テストを更新
Diffstat (limited to 'src/mml_composemusic_mcp/parser_base.py')
| -rw-r--r-- | src/mml_composemusic_mcp/parser_base.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mml_composemusic_mcp/parser_base.py b/src/mml_composemusic_mcp/parser_base.py index 506a33e..2625c5d 100644 --- a/src/mml_composemusic_mcp/parser_base.py +++ b/src/mml_composemusic_mcp/parser_base.py @@ -33,6 +33,11 @@ class ParserContext: def expect(self, *types: TokenType) -> Token | None: return self.match(*types) + def synchronize(self, *types: TokenType) -> None: + """Advance to a recovery token without ever consuming past EOF.""" + while self.peek().type not in (*types, TokenType.EOF): + self.advance() + def add_error( self, code: ErrorCode, |
