-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Автотесты для 8 и 9 задания. #136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чот миллион копий грамматик --- это ад, конечно.
|
||
EBNF_GRAMMARS = [ | ||
"""S -> ( Sab c* ) | ( a* Sbc ) | ||
Sab -> a ( Sab | $ ) b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А тут с пробелами всё нормально?
cfg.CFG.from_text( | ||
"S -> S1 | S2\nS1 -> Sab | S1 c\nSab -> $ | a Sab b\nS2 -> Sbc | a S2\nSbc -> b Sbc c" | ||
), | ||
cfg.CFG.from_text("S -> a | b | S c S | S d S | e S f | g S"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Просто я уже сам запутался. Почему где-то надо терминалы и нетерминалы пробелами разделять, а где-то не надо.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Терминалы и нетерминалы всегда надо разделять. Это я так пишу нетерминал
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, формулировки норм. С пробелами понял.
Посмотрите на формулировку, пожалуйста.