Skip to content

v4.2

Choose a tag to compare

@thewizardplusplus thewizardplusplus released this 04 Jun 21:50
· 78 commits to master since this release

Restore possibilities for error handling.

Change Log

  • lexer module:
    • Add the tokenize() function with filters:
      • implement it;
      • cover it with tests;
      • use it in the example.
    • Add the tokenize_all() function:
      • implement it;
      • cover it with tests;
      • use it in the example.
  • parser module:
    • Add the parse() function:
      • implement it;
      • cover it with tests;
      • use it in the example.
    • Add the parse_all() function:
      • implement it;
      • cover it with tests;
      • in the example:
        • use it;
        • replace the utilities::integral_infinity constant to a code size in an exception.
  • exceptions module:
    • Add it.
    • Add the positional_exception class:
      • implement it;
      • use it in the example.
    • Add the unexpected_entity_exception class:
      • implement it;
      • use it in the example.

Возможности

  • лексинг ASCII-текста:
    • задание лексем посредством регулярных выражений;
    • возможность исключения токенов из результирующего списка;
  • парсинг ASCII-текста:
    • описание грамматики на EBNF непосредственно в коде программы (посредством DSL);
  • результат:
    • представление в виде:
      • CST;
      • AST;
    • задание имени ноды в дереве;
  • парсеры:
    • терминальные:
      • пустота;
      • определённые:
        • текст;
        • лексема;
    • комбинаторы:
      • альтернатива (упорядоченная);
      • объединяющие:
        • следование;
        • повторение:
          • 0 или 1 раз (опциональность);
          • 0 или больше раз;
          • 1 или больше раз;
          • любое число раз в указанном диапазоне;
      • проверяющие:
        • исключение;
        • просмотр вперёд:
          • позитивный;
          • негативный.

Скриншоты

Лексический анализ

Лексический анализ

Синтаксический анализ

Синтаксический анализ