Skip to content

feat: Remove period support from formal notation#57

Merged
netkeep80 merged 5 commits intonetkeep80:mainfrom
konard:issue-56-01373fc8d0f5
Feb 13, 2026
Merged

feat: Remove period support from formal notation#57
netkeep80 merged 5 commits intonetkeep80:mainfrom
konard:issue-56-01373fc8d0f5

Conversation

@konard
Copy link
Contributor

@konard konard commented Feb 13, 2026

Summary

This PR implements the changes requested in #56 to completely remove the requirement for terminating periods (.) at the end of formulas in the formal notation. Based on feedback, periods are no longer supported as separators - only commas and newlines work.

Changes Made

1. Parser Updates

  • Modified parseStatement() in src/core/parser.ts to remove period (.) support entirely
  • Only commas (,) and newlines are now accepted as optional statement separators
  • Updated parseExpr() helper to not append a period
  • Updated the grammar documentation in the parser file to reflect the new syntax

2. Documentation

Updated formal notation documentation to reflect the new syntax:

  • docs/mts/formal-notation.md - Updated EBNF grammar to remove period support
  • docs/mts/specification-v0.1.md - Updated EBNF grammar to remove period support

3. Tests

  • Removed test for "should parse multiple statements with periods"
  • Updated all test cases to remove periods from examples
  • Updated error recovery tests to reflect the new syntax
  • All tests pass (255 passed, 3 skipped)

Test Results

All tests pass successfully:

  • ✅ Unit tests for parser, lexer, prover, normalizer, fileIO, stringAnum
  • ✅ Integration tests for MTL formulas
  • ✅ All linter checks pass (only pre-existing warnings remain)

New Syntax

The formal notation now supports only these separator formats:

// With commas
 =  -> ,
♂v = ♂v -> v

// With newlines only (no separators)
 =  -> 
♂v = ♂v -> v

// Mixed (commas and newlines)
 =  -> 
♂v = ♂v -> v,
r♀ = r -> r♀

Periods are no longer supported as statement separators.

Fixes

Fixes #56


🤖 This PR was created automatically by the AI issue solver

Adding .gitkeep for PR creation (created with --gitkeep-file flag).
This file will be removed when the task is complete.

Issue: netkeep80#56
@konard
Copy link
Contributor Author

konard commented Feb 13, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-02-13T23:02:48.333Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

Remove the requirement for periods (.) at the end of formulas.
Periods, commas, and newlines can now be used as optional separators
between statements, but are not required.

Changes:
- Parser: Made DOT and COMMA tokens optional separators in parseStatement()
- Updated grammar documentation to reflect optional separators
- Updated all example .mtl files to remove terminating periods
- Updated documentation in formal-notation.md and specification-v0.1.md
- Updated tests to reflect new behavior

Fixes netkeep80#56

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] Убрать терминирующие точки feat: Make terminating periods optional in formal notation Feb 13, 2026
@konard konard marked this pull request as ready for review February 13, 2026 23:09
@konard
Copy link
Contributor Author

konard commented Feb 13, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.623552
  • Calculated by Anthropic: $2.552272 USD
  • Difference: $-0.071280 (-2.72%)
    📎 Log file uploaded as Gist (630KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@netkeep80
Copy link
Owner

Нет, ты не понял, точки вообще не нужны!
Либо новая строка либо запятая!

@konard konard marked this pull request as draft February 13, 2026 23:13
@konard
Copy link
Contributor Author

konard commented Feb 13, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-02-13T23:13:20.521Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

Based on feedback from netkeep80, periods should not be supported at all
as separators. Only commas and newlines should work as statement separators.

Changes:
- Updated parser to remove DOT token support in parseStatement()
- Updated parseExpr() helper to not append period
- Updated EBNF grammar in formal-notation.md and specification-v0.1.md
- Updated all test cases to remove periods
- All 255 tests pass successfully

Addresses feedback in PR netkeep80#57

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@konard konard changed the title feat: Make terminating periods optional in formal notation feat: Remove period support from formal notation Feb 13, 2026
Updated all E2E tests to use newlines instead of periods as statement
separators, consistent with the new parser behavior.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review February 13, 2026 23:23
@konard
Copy link
Contributor Author

konard commented Feb 13, 2026

PR готов к ревью

Все изменения выполнены согласно отзыву:

  1. Полностью удалена поддержка точек - теперь только запятые и переносы строк
  2. Обновлен парсер - удалена обработка DOT токена
  3. Обновлена документация - EBNF грамматика в formal-notation.md и specification-v0.1.md
  4. Обновлены все тесты - unit, integration и E2E тесты
  5. CI проходит успешно - все 255 тестов проходят

Периоды (.) больше не поддерживаются как разделители операторов. Используйте только запятые (,) или переносы строк.

@konard
Copy link
Contributor Author

konard commented Feb 13, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.219162
  • Calculated by Anthropic: $2.902165 USD
  • Difference: $-0.316996 (-9.85%)
    📎 Log file uploaded as Gist (1020KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@netkeep80 netkeep80 merged commit b9f969e into netkeep80:main Feb 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Убрать терминирующие точки

2 participants