Skip to content

Commit eba54b1

Browse files
committed
update package file docs
1 parent 74eb4d4 commit eba54b1

File tree

9 files changed

+75
-72
lines changed

9 files changed

+75
-72
lines changed

pyformlang/__init__.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
"""Pyformlang is a python module to perform operation on formal languages.
22
3-
How to use the documentation
4-
----------------------------
5-
Documentation is available in two formats: docstrings directly
6-
in the code and a readthedocs website: https://pyformlang.readthedocs.io.
3+
:mod:`pyformlang`
4+
=================
75
86
Available subpackages
97
---------------------
10-
:mod:`pyformlang.regular_expression`:
8+
:mod:`~pyformlang.regular_expression`:
119
Regular Expressions.
12-
:mod:`pyformlang.finite_automaton`:
10+
:mod:`~pyformlang.finite_automaton`:
1311
Finite Automata (deterministic, non-deterministic,
1412
with/without epsilon transitions).
15-
:mod:`pyformlang.fst`:
13+
:mod:`~pyformlang.fst`:
1614
Finite State Transducers.
17-
:mod:`pyformlang.cfg`:
15+
:mod:`~pyformlang.cfg`:
1816
Context-Free Grammars.
19-
:mod:`pyformlang.pda`:
17+
:mod:`~pyformlang.pda`:
2018
Push-Down Automata.
21-
:mod:`pyformlang.indexed_grammar`:
19+
:mod:`~pyformlang.indexed_grammar`:
2220
Indexed Grammars.
23-
:mod:`pyformlang.rsa`:
21+
:mod:`~pyformlang.rsa`:
2422
Recursive Automata.
25-
:mod:`pyformlang.fcfg`:
23+
:mod:`~pyformlang.fcfg`:
2624
Context-Free Grammars with Features.
25+
26+
How to use the documentation
27+
----------------------------
28+
Documentation is available in two formats: docstrings directly
29+
in the code and a readthedocs website: https://pyformlang.readthedocs.io.
2730
"""
2831

2932
from . import finite_automaton

pyformlang/cfg/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.cfg.CFG`:
8+
:class:`~pyformlang.cfg.CFG`:
99
The main context-free grammar class.
10-
:class:`pyformlang.cfg.Production`:
10+
:class:`~pyformlang.cfg.Production`:
1111
A class to represent a production in a CFG.
12-
:class:`pyformlang.cfg.CFGObject`:
12+
:class:`~pyformlang.cfg.CFGObject`:
1313
A general CFG object representation.
14-
:class:`pyformlang.cfg.Variable`:
14+
:class:`~pyformlang.cfg.Variable`:
1515
A variable in context-free grammar.
16-
:class:`pyformlang.cfg.Terminal`:
16+
:class:`~pyformlang.cfg.Terminal`:
1717
A terminal in context-free grammar.
18-
:class:`pyformlang.cfg.Epsilon`:
18+
:class:`~pyformlang.cfg.Epsilon`:
1919
The epsilon symbol (special terminal).
20-
:class:`pyformlang.cfg.ParseTree`:
20+
:class:`~pyformlang.cfg.ParseTree`:
2121
A parse tree of the grammar.
22-
:class:`pyformlang.cfg.DerivationDoesNotExistError`:
22+
:class:`~pyformlang.cfg.DerivationDoesNotExistError`:
2323
An exception that occurs if the given word cannot
2424
be derived from the grammar.
2525
"""

pyformlang/fcfg/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.fcfg.FCFG`:
8+
:class:`~pyformlang.fcfg.FCFG`:
99
A context-free grammar with features.
10-
:class:`pyformlang.fcfg.FeatureStructure`:
10+
:class:`~pyformlang.fcfg.FeatureStructure`:
1111
A feature structure containing constraints.
12-
:class:`pyformlang.fcfg.FeatureProduction`:
12+
:class:`~pyformlang.fcfg.FeatureProduction`:
1313
A production in the FCFG.
14-
:class:`pyformlang.fcfg.CFGObject`:
14+
:class:`~pyformlang.fcfg.CFGObject`:
1515
The general CFG object used in FCFG.
16-
:class:`pyformlang.fcfg.Variable`:
16+
:class:`~pyformlang.fcfg.Variable`:
1717
A variable in FCFG.
18-
:class:`pyformlang.fcfg.Terminal`:
18+
:class:`~pyformlang.fcfg.Terminal`:
1919
A terminal in FCFG.
20-
:class:`pyformlang.fcfg.Epsilon`:
20+
:class:`~pyformlang.fcfg.Epsilon`:
2121
The epsilon terminal.
22-
:class:`pyformlang.fcfg.ParseTree`:
22+
:class:`~pyformlang.fcfg.ParseTree`:
2323
A parse tree of the grammar.
24-
:class:`pyformlang.fcfg.NotParsableError`:
24+
:class:`~pyformlang.fcfg.NotParsableError`:
2525
An exception that occurs when the given grammar cannot be parsed.
26-
:class:`pyformlang.fcfg.ContentAlreadyExistsError`:
26+
:class:`~pyformlang.fcfg.ContentAlreadyExistsError`:
2727
An exception raised when trying to add content that already exists.
28-
:class:`pyformlang.fcfg.FeatureStructuresNotCompatibleError`:
28+
:class:`~pyformlang.fcfg.FeatureStructuresNotCompatibleError`:
2929
An exception raised when trying to unify incompatible structures.
30-
:class:`pyformlang.fcfg.PathDoesNotExistError`:
30+
:class:`~pyformlang.fcfg.PathDoesNotExistError`:
3131
An exception raised when looking for a path that does not exist.
3232
3333
Sources

pyformlang/finite_automaton/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.finite_automaton.FiniteAutomaton`:
8+
:class:`~pyformlang.finite_automaton.FiniteAutomaton`:
99
An abstract class representing the general finite automaton.
10-
:class:`pyformlang.finite_automaton.EpsilonNFA`:
10+
:class:`~pyformlang.finite_automaton.EpsilonNFA`:
1111
A non-deterministic finite automaton with epsilon transitions.
12-
:class:`pyformlang.finite_automaton.NondeterministicFiniteAutomaton`:
12+
:class:`~pyformlang.finite_automaton.NondeterministicFiniteAutomaton`:
1313
A non-deterministic finite automaton without epsilon transitions.
14-
:class:`pyformlang.finite_automaton.DeterministicFiniteAutomaton`:
14+
:class:`~pyformlang.finite_automaton.DeterministicFiniteAutomaton`:
1515
A deterministic finite automaton.
16-
:class:`pyformlang.finite_automaton.State`:
16+
:class:`~pyformlang.finite_automaton.State`:
1717
A state (or node) in an automaton.
18-
:class:`pyformlang.finite_automaton.Symbol`:
18+
:class:`~pyformlang.finite_automaton.Symbol`:
1919
A symbol (part of the alphabet) in an automaton.
20-
:class:`pyformlang.finite_automaton.Epsilon`:
20+
:class:`~pyformlang.finite_automaton.Epsilon`:
2121
The epsilon (or empty) symbol.
22-
:class:`pyformlang.finite_automaton.TransitionFunction`:
22+
:class:`~pyformlang.finite_automaton.TransitionFunction`:
2323
An interface representing the transition function in a finite automaton.
24-
:class:`pyformlang.finite_automaton.NondeterministicTransitionFunction`:
24+
:class:`~pyformlang.finite_automaton.NondeterministicTransitionFunction`:
2525
A non-deterministic transition function.
26-
:class:`pyformlang.finite_automaton.DeterministicTransitionFunction`:
26+
:class:`~pyformlang.finite_automaton.DeterministicTransitionFunction`:
2727
A deterministic transition function.
28-
:class:`pyformlang.finite_automaton.DuplicateTransitionError`:
28+
:class:`~pyformlang.finite_automaton.DuplicateTransitionError`:
2929
An error that occurs when trying to add a non-deterministic edge to a
3030
deterministic automaton.
31-
:class:`pyformlang.finite_automaton.InvalidEpsilonTransitionError`:
31+
:class:`~pyformlang.finite_automaton.InvalidEpsilonTransitionError`:
3232
An exception that occurs when adding an epsilon transition to a
3333
non-epsilon NFA.
3434
"""

pyformlang/fst/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.fst.FST`:
8+
:class:`~pyformlang.fst.FST`:
99
A Finite State Transducer.
10-
:class:`pyformlang.fst.TransitionFunction`:
10+
:class:`~pyformlang.fst.TransitionFunction`:
1111
A transition function in FST.
12-
:class:`pyformlang.fst.State`:
12+
:class:`~pyformlang.fst.State`:
1313
A state in FST.
14-
:class:`pyformlang.fst.Symbol`:
14+
:class:`~pyformlang.fst.Symbol`:
1515
A symbol in FST.
16-
:class:`pyformlang.fst.Epsilon`:
16+
:class:`~pyformlang.fst.Epsilon`:
1717
An epsilon symbol.
1818
"""
1919

pyformlang/indexed_grammar/__init__.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.indexed_grammar.IndexedGrammar`:
8+
:class:`~pyformlang.indexed_grammar.IndexedGrammar`:
99
An indexed grammar.
10-
:class:`pyformlang.indexed_grammar.Rules`:
10+
:class:`~pyformlang.indexed_grammar.Rules`:
1111
A representation of a set of indexed grammar rules.
12-
:class:`pyformlang.indexed_grammar.ReducedRule`:
12+
:class:`~pyformlang.indexed_grammar.ReducedRule`:
1313
An indexed grammar rule of any of possible forms.
14-
:class:`pyformlang.indexed_grammar.ConsumptionRule`:
14+
:class:`~pyformlang.indexed_grammar.ConsumptionRule`:
1515
A consumption rule, consuming something from the stack.
16-
:class:`pyformlang.indexed_grammar.EndRule`:
16+
:class:`~pyformlang.indexed_grammar.EndRule`:
1717
An end rule, turning a variable into a terminal.
18-
:class:`pyformlang.indexed_grammar.ProductionRule`:
18+
:class:`~pyformlang.indexed_grammar.ProductionRule`:
1919
A production rule, pushing something on the stack.
20-
:class:`pyformlang.indexed_grammar.DuplicationRule`:
20+
:class:`~pyformlang.indexed_grammar.DuplicationRule`:
2121
A duplication rule, duplicating the stack.
22-
:class:`pyformlang.indexed_grammar.CFGObject`:
22+
:class:`~pyformlang.indexed_grammar.CFGObject`:
2323
A general CFG object used in indexed grammars.
24-
:class:`pyformlang.indexed_grammar.Variable`:
24+
:class:`~pyformlang.indexed_grammar.Variable`:
2525
A variable in indexed grammars.
26-
:class:`pyformlang.indexed_grammar.Terminal`:
26+
:class:`~pyformlang.indexed_grammar.Terminal`:
2727
A terminal in indexed grammars.
28-
:class:`pyformlang.indexed_grammar.Epsilon`:
28+
:class:`~pyformlang.indexed_grammar.Epsilon`:
2929
An epsilon terminal.
3030
"""
3131

pyformlang/pda/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.pda.PDA`:
8+
:class:`~pyformlang.pda.PDA`:
99
A push-down automaton.
10-
:class:`pyformlang.pda.TransitionFunction`:
10+
:class:`~pyformlang.pda.TransitionFunction`:
1111
A transition function in push-down automaton.
12-
:class:`pyformlang.pda.State`:
12+
:class:`~pyformlang.pda.State`:
1313
A state in push-down automaton.
14-
:class:`pyformlang.pda.Symbol`:
14+
:class:`~pyformlang.pda.Symbol`:
1515
A symbol in push-down automaton.
16-
:class:`pyformlang.pda.StackSymbol`:
16+
:class:`~pyformlang.pda.StackSymbol`:
1717
A stack symbol in push-down automaton.
18-
:class:`pyformlang.pda.Epsilon`:
18+
:class:`~pyformlang.pda.Epsilon`:
1919
The epsilon symbol.
2020
"""
2121

pyformlang/regular_expression/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
99
Available Classes
1010
-----------------
11-
:class:`pyformlang.regular_expression.Regex`:
11+
:class:`~pyformlang.regular_expression.Regex`:
1212
A regular expression.
13-
:class:`pyformlang.regular_expression.PythonRegex`:
13+
:class:`~pyformlang.regular_expression.PythonRegex`:
1414
A regular expression closer to Python format.
15-
:class:`pyformlang.regular_expression.MisformedRegexError`:
15+
:class:`~pyformlang.regular_expression.MisformedRegexError`:
1616
An error occurring when the input regex is incorrect.
1717
"""
1818

pyformlang/rsa/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
66
Available Classes
77
-----------------
8-
:class:`pyformlang.rsa.RecursiveAutomaton`:
8+
:class:`~pyformlang.rsa.RecursiveAutomaton`:
99
A recursive automaton.
10-
:class:`pyformlang.rsa.Box`:
10+
:class:`~pyformlang.rsa.Box`:
1111
A constituent part of a recursive automaton.
12-
:class:`pyformlang.rsa.Symbol`:
12+
:class:`~pyformlang.rsa.Symbol`:
1313
A nonterminal of the Box.
1414
1515
References

0 commit comments

Comments
 (0)