Skip to content

Rework cfg #14

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

Open
wants to merge 30 commits into
base: rework_architecture
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f967892
add cfg annotations
bygu4 Oct 19, 2024
4f73b85
add cfg annotations
bygu4 Dec 1, 2024
3f1c19c
add final cfg annotations
bygu4 Oct 19, 2024
a462635
add pda module annotations, rework pda objects
bygu4 Oct 20, 2024
dda8612
finish pda annotation
bygu4 Oct 21, 2024
b7947e2
use Hashable as input type, correct some annotations, correct pda ite…
bygu4 Dec 1, 2024
f3e4034
refactor cfg to pda conversion, add grammar abstract class to manage …
bygu4 Dec 2, 2024
89fd2a4
correct start state checks in pda
bygu4 Dec 2, 2024
ff69840
create object module for better structure
bygu4 Dec 2, 2024
4418f09
correct object imports
bygu4 Dec 2, 2024
1b9dfbc
add CFGConvertible interface
bygu4 Dec 2, 2024
e27a1b1
handle null start states in pda
bygu4 Dec 2, 2024
0231483
update pda tests, correct cfg parsers annotations
bygu4 Dec 2, 2024
570bf02
update tests, correct transition function of pda, correct CFGConverti…
bygu4 Dec 2, 2024
7f877f5
add fcfg annotations
bygu4 Oct 28, 2024
4dc06ce
correct parsing with cyk table
bygu4 Dec 3, 2024
291d9d0
generalize some cfg methods, make from_text method generic to use in …
bygu4 Dec 3, 2024
0e600fc
correct contains method of pda
bygu4 Dec 3, 2024
1039177
add copying of cfg, correct cfg normal from transformation
bygu4 Dec 3, 2024
704a508
add pda copying
bygu4 Dec 3, 2024
fd9ae41
use Hashable in feature_structure
bygu4 Dec 3, 2024
b73cae4
correct epsilon checks
bygu4 Dec 3, 2024
73aa2e7
correct object equality checks, use Tuple as input for transition fun…
bygu4 Dec 4, 2024
7e027f3
rework objects, correct equality checks, add more general representat…
bygu4 Dec 4, 2024
1e73e4b
add remove_transition method for pda, update tests
bygu4 Dec 4, 2024
9b057ae
add start symbol setter for cfg
bygu4 Dec 4, 2024
626711e
add production and start symbol adding for cfg, correct epsilon equality
bygu4 Dec 5, 2024
a653966
correct fcfg production properties and adding
bygu4 Dec 7, 2024
f418913
unify terminal representations
bygu4 Dec 29, 2024
770cecf
correct formal objects equality
bygu4 Dec 29, 2024
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
13 changes: 12 additions & 1 deletion pyformlang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,21 @@

"""

from . import finite_automaton
from . import regular_expression
from . import cfg
from . import fst
from . import indexed_grammar
from . import pda
from . import rsa
from . import fcfg


__all__ = ["finite_automaton",
"regular_expression",
"cfg",
"fst",
"indexed_grammar",
"pda",
"rsa"]
"rsa",
"fcfg"]
17 changes: 8 additions & 9 deletions pyformlang/cfg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@

"""

from .variable import Variable
from .terminal import Terminal
from .production import Production
from .cfg import CFG
from .epsilon import Epsilon
from .llone_parser import LLOneParser
from .cfg import CFG, CFGObject, Variable, Terminal, Epsilon, Production
from .parse_tree import ParseTree, DerivationDoesNotExist

__all__ = ["Variable",

__all__ = ["CFGObject",
"Variable",
"Terminal",
"Epsilon",
"Production",
"CFG",
"Epsilon",
"LLOneParser"]
"ParseTree",
"DerivationDoesNotExist"]
Loading