Skip to content

Commit

Permalink
Merge pull request #41 from ECN/feature-rewrite-parser-in-formal-grammar
Browse files Browse the repository at this point in the history
Feature rewrite parser in formal grammar
  • Loading branch information
campb303 authored Aug 2, 2021
2 parents 58bf454 + 206ed36 commit 5c10453
Show file tree
Hide file tree
Showing 5 changed files with 449 additions and 853 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def get_all_dependencies():
# Custom version of python-ldap without SASL requirements
"python-ldap @ git+https://github.itap.purdue.edu/ECN/python-ldap/@python-ldap-3.3.1",
"easyad",
"dataclasses"
"dataclasses",
"pyparsing"
],
extras_require={
"dev": conditional_dependencies["dev"],
Expand Down
5 changes: 5 additions & 0 deletions src/webqueue2api/parser/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ def __init__(self, path: str):
class QueueDoesNotExistError(Exception):
def __init__(self, path: str):
self.message = f"Directory {path} not found."
super().__init__(self.message)

class ParseError(Exception):
def __init__(self, line_number: int, message: str = "Unable to parse item."):
self.message = f"{message} at line {line_number}"
super().__init__(self.message)
Loading

0 comments on commit 5c10453

Please sign in to comment.