v3.2
·
166 commits
to master
since this release
Add unit tests.
Change Log
- Improve errors handling in the example tests runner.
- Add tests:
- unit tests:
- in the building configuration:
- describe tests building;
- add a custom target as a workaround for CMake bugs;
- for the
lexermodule:- add utility features for the
tokenclass:- operators:
==operator;- stream insertion operator;
to_tuple()function;
- operators:
- make functions public:
match_lexeme()function;find_matched_token()function;
- add tests for functions:
get_offset()function;match_lexeme()function;find_matched_token()function;tokenize()function;
- add utility features for the
- for the
parsermodule:- add utility features for the
ast_nodeclass:- operators:
==operator;- stream insertion operator;
to_tuple()function;
- operators:
- add tests for classes:
- without mocks:
empty_parserclass;match_parserclass;
- with mocks:
alternation_parserclass;concatenation_parserclass;dummy_parserclass;exception_parserclass;lookahead_parserclass;repetition_parserclass;typing_parserclass;
- without mocks:
- add utility features for the
- in the building configuration:
- for the example:
- add utility features:
- add the
errorstest group; - rename the
io_test()function totest_json_output(); - add the
test_error_output()function;
- add the
- add general test cases for all error types.
- add utility features:
- unit tests:
Возможности
- лексинг ASCII-текста:
- задание лексем посредством регулярных выражений;
- парсинг ASCII-текста:
- описание грамматики на EBNF непосредственно в коде программы (посредством DSL);
- представление результата в виде дерева парсинга:
- задание имени ноды в дереве парсинга;
- парсеры:
- терминальные:
- пустота;
- определённые:
- текст;
- лексема;
- комбинаторы:
- альтернатива (упорядоченная);
- объединяющие:
- следование;
- повторение:
- 0 или 1 раз (опциональность);
- 0 или больше раз;
- 1 или больше раз;
- любое число раз в указанном диапазоне;
- проверяющие:
- исключение;
- просмотр вперёд:
- позитивный;
- негативный.
- терминальные:
Скриншоты
Лексический анализ
Синтаксический анализ

