Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

### Unreleased

### Added

* `delphin.tdl.ConfigEntry` ([#391])
* `delphin.tdl.ConfigEnvironment` ([#391])

### Maintenance

* Removed `requirements.txt`; it was unnecessary and out of date
Expand Down Expand Up @@ -49,6 +54,11 @@
* `tdl.AVM` initialization uses `AVM.aggregate()` instead of
assignment of values on features ([#395])

### Maintenance

* Changed `delphin.tdl` from a simple module to a backwards-compatible
package


## [v1.9.1]

Expand Down Expand Up @@ -1696,6 +1706,7 @@ information about changes, except for
[#379]: https://github.com/delph-in/pydelphin/issues/379
[#383]: https://github.com/delph-in/pydelphin/issues/383
[#386]: https://github.com/delph-in/pydelphin/issues/386
[#391]: https://github.com/delph-in/pydelphin/issues/391
[#395]: https://github.com/delph-in/pydelphin/issues/395
[#396]: https://github.com/delph-in/pydelphin/issues/396
[#402]: https://github.com/delph-in/pydelphin/issues/402
75 changes: 75 additions & 0 deletions delphin/tdl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
__all__ = [
'AVM',
'DIFF_LIST_LAST',
'DIFF_LIST_LIST',
'EMPTY_LIST_TYPE',
'LIST_HEAD',
'LIST_TAIL',
'LIST_TYPE',
'BlockComment',
'ConfigEntry',
'ConfigEnvironment',
'Conjunction',
'ConsList',
'Coreference',
'DiffList',
'FileInclude',
'InstanceEnvironment',
'LetterSet',
'LexicalRuleDefinition',
'LineComment',
'Regex',
'String',
'TDLError',
'TDLSyntaxError',
'TDLWarning',
'Term',
'TypeAddendum',
'TypeDefinition',
'TypeEnvironment',
'TypeIdentifier',
'WildCard',
# '_Environment',
# '_MorphSet',
'format',
'iterparse',
]

from delphin.tdl._exceptions import (
TDLError,
TDLSyntaxError,
TDLWarning,
)
from delphin.tdl._format import format
from delphin.tdl._model import (
AVM,
DIFF_LIST_LAST,
DIFF_LIST_LIST,
EMPTY_LIST_TYPE,
LIST_HEAD,
LIST_TAIL,
LIST_TYPE,
BlockComment,
ConfigEntry,
ConfigEnvironment,
Conjunction,
ConsList,
Coreference,
DiffList,
FileInclude,
InstanceEnvironment,
LetterSet,
LexicalRuleDefinition,
LineComment,
Regex,
String,
Term,
TypeAddendum,
TypeDefinition,
TypeEnvironment,
TypeIdentifier,
WildCard,
# _Environment,
# _MorphSet,
)
from delphin.tdl._parse import iterparse # parse, decode
17 changes: 17 additions & 0 deletions delphin/tdl/_exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from delphin.exceptions import (
PyDelphinException,
PyDelphinSyntaxError,
PyDelphinWarning,
)


class TDLError(PyDelphinException):
"""Raised when there is an error in processing TDL."""


class TDLSyntaxError(PyDelphinSyntaxError):
"""Raised when parsing TDL text fails."""


class TDLWarning(PyDelphinWarning):
"""Raised when parsing unsupported TDL features."""
Loading
Loading