Added grammar builder#128
Added grammar builder#128hosford42 wants to merge 1 commit intoigordejanovic:language-def-redesignfrom
Conversation
|
Hi, @igordejanovic! Let me know if this needs anything to get it up to par. |
|
@hosford42 Thanks much for the contribution! I just skimmed through the implementation and it looks very good. I'll do the full review in the next couple of days. |
igordejanovic
left a comment
There was a problem hiding this comment.
@hosford42 Excellent work! Everything looks good. I have just some minor styling issues (please see bellow). It would be nice to add some docs for this feature but I think that can wait until this gets merged to master.
|
|
||
| This method only gets called if the normal lookup mechanism for an attribute fails. In other words, we only | ||
| get here if someone requests an attribute that this object doesn't have. When this happens, we call self.end() | ||
| and then get try to get the attribute from the parent. If we are correct in doing so, everything is beautiful. |
| @@ -0,0 +1 @@ | |||
| __version__ = None | |||
There was a problem hiding this comment.
This file is autogenerated by setuptools_scm so should not be committed to git repo
There was a problem hiding this comment.
So sorry, this was not supposed to have been included in the commit! I only fudged it so I could work directly off the development version while debugging.
| from typing import Dict, Union, List, Iterator, TypeVar, ContextManager, Optional, Callable, Any, Sequence | ||
|
|
||
| from parglare.exceptions import GrammarBuilderValidationError | ||
| from parglare.grammar import MULT_ONE_OR_MORE, MULT_ZERO_OR_MORE, MULT_OPTIONAL, Terminal, MULT_ONE |
There was a problem hiding this comment.
parglare is using PEP-8. That means 79 line length. I'm ok to go up to 90. You can add flake8 line length setting in config.cfg like this and check your source for violations.
|
Hi @igordejanovic. I'll try to get these changes done later today. Thanks for the feedback, and I'm happy to hear you are pleased. |
Code review checklist
CHANGELOG.md, no needto update for typo fixes and such).