1.1 --- a/moinformat/parsers/table.py Tue Dec 12 22:53:20 2017 +0100
1.2 +++ b/moinformat/parsers/table.py Wed Dec 13 00:50:09 2017 +0100
1.3 @@ -19,15 +19,15 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -from moinformat.parsing import get_patterns
1.8 +from moinformat.parsers.common import get_patterns
1.9 +from moinformat.parsers.moin import MoinParser
1.10 from moinformat.tree import Table, TableAttrs, TableCell, TableRow, Text
1.11 -from moinformat import Parser
1.12
1.13
1.14
1.15 # Parser functionality.
1.16
1.17 -class TableParser(Parser):
1.18 +class TableParser(MoinParser):
1.19
1.20 "A parser for improved table syntax."
1.21
1.22 @@ -85,7 +85,7 @@
1.23 # Regular expressions.
1.24
1.25 syntax = {}
1.26 - syntax.update(Parser.syntax)
1.27 + syntax.update(MoinParser.syntax)
1.28 syntax.update({
1.29 # At start of line:
1.30 "rowsep" : r"^==(?!.*==\s*?$)(?=\N*?)", # == not-heading ws-excl-nl
1.31 @@ -101,7 +101,7 @@
1.32
1.33 # Pattern details.
1.34
1.35 - table_region_pattern_names = Parser.region_pattern_names + [
1.36 + table_region_pattern_names = MoinParser.region_pattern_names + [
1.37 "columnsep", "continuation", "regionend", "rowsep",
1.38 ]
1.39
1.40 @@ -110,11 +110,11 @@
1.41 # Pattern handlers.
1.42
1.43 handlers = {}
1.44 - handlers.update(Parser.handlers)
1.45 + handlers.update(MoinParser.handlers)
1.46 handlers.update({
1.47 - "columnsep" : Parser.end_region,
1.48 + "columnsep" : MoinParser.end_region,
1.49 "continuation" : parse_continuation,
1.50 - "rowsep" : Parser.end_region,
1.51 + "rowsep" : MoinParser.end_region,
1.52 "regionend" : parse_table_end,
1.53 })
1.54