kr.motd.maven.sphinx.dist.docutils.parsers.rst.tableparser$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1? f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
This module defines table parser classes,which parse plaintext-graphic tables
and produce a well-formed data structure suitable for building a CALS table.
:Classes:
- `GridTableParser`: Parse fully-formed tables represented with a grid.
- `SimpleTableParser`: Parse simple tables, delimited by top & bottom
borders.
:Exception class: `TableMarkupError`
:Function:
`update_dict_of_lists()`: Merge two dictionaries containing list values.
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
reStructuredText
__docformat__ setlocal
re org/python/core/imp importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject; " #
! $ sys & docutils ( java/lang/String * DataError ,
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; . /
! 0 docutils.utils 2 strip_combining_chars 4 org/python/core/PyObject 6 getname .(Ljava/lang/String;)Lorg/python/core/PyObject; 8 9
: TableMarkupError < TableMarkupError$1
__module__ ? __name__ A ?
Raise if there is any problem with table markup.
The keyword argument `offset` denotes the offset of the problem
from the table's start line.
C org/python/core/Py E EmptyObjects [Lorg/python/core/PyObject; G H F I org/python/core/PyFunction K f_globals Lorg/python/core/PyObject; M N O
__init__$2 getlocal (I)Lorg/python/core/PyObject; R S
T pop V __getattr__ X 9
7 Y offset [
newInteger (I)Lorg/python/core/PyInteger; ] ^
F _ __call__ m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; a b
7 c __setattr__ e
7 f getglobal h 9
i __init__ k
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; m n
7 o f_lasti I q r s None u N F v #docutils/parsers/rst/tableparser$py x Lorg/python/core/PyCode; Q z y { j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V } ~
L getf_locals ()Lorg/python/core/PyObject; ? ?
? > z y ? makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject; ? ?
F ? java/util/Arrays ? fill (([Ljava/lang/Object;Ljava/lang/Object;)V ? ?
? ? TableParser ?
TableParser$3 R
Abstract superclass for the common parts of the syntax-specific parsers.
? u head_body_separator_pat ? :Matches the row separator between head rows and body rows. ? ?? ? double_width_pad_char ? 3Padding character for East Asian double-width text. ? parse$4n
Analyze the text `block` and return a table data structure.
Given a plaintext-graphic table in `block` (list of lines of text; no
whitespace padding), parse the table, construct and return the data
necessary to construct a CALS table or equivalent.
Raise `TableMarkupError` if there is any problem with the markup.
? setup ? S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; a ?
7 ? find_head_body_sep ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; a ?
7 ? parse_table ? structure_from_cells ? (ILorg/python/core/PyObject;)V ?
? ? z y ? parse ? find_head_body_sep$5 >Look for a head/body row separator line; store the line index. ? range ? len ? block ? __iter__ ? ?
7 ? __getitem__ 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
7 ? match ? __nonzero__ ()Z ? ?
7 ?
head_body_sep ? LMultiple head/body row separators (table lines %s and %s); only one allowed. ? org/python/core/PyTuple ? _add ? ?
7 ? ([Lorg/python/core/PyObject;)V } ?
? ? _mod ? ?
7 ? g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; a ?
7 ?
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException; ? ?
F ? replace ? = ? - ? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V ? ?
7 ? __iternext__ ? ?
7 ? _eq ? ?
7 ? _sub ? ?
7 ? KThe head/body row separator may not be the first or last line of the table. ? ? z y ? ? z y ? GridTableParser ? GridTableParser$6 i
Parse a grid table using `parse()`.
Here's an example of a grid table::
+------------------------+------------+----------+----------+
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
+========================+============+==========+==========+
| body row 1, column 1 | column 2 | column 3 | column 4 |
+------------------------+------------+----------+----------+
| body row 2 | Cells may span columns. |
+------------------------+------------+---------------------+
| body row 3 | Cells may | - Table cells |
+------------------------+ span rows. | - contain |
| body row 4 | | - body elements. |
+------------------------+------------+---------------------+
Intersections use '+', row separators use '-' (except for one optional
head/body row separator, which uses '='), and column separators use '|'.
Passing the above table to the `parse()` method will result in the
following data structure::
([24, 12, 10, 10],
[[(0, 0, 1, ['Header row, column 1']),
(0, 0, 1, ['Header 2']),
(0, 0, 1, ['Header 3']),
(0, 0, 1, ['Header 4'])]],
[[(0, 0, 3, ['body row 1, column 1']),
(0, 0, 3, ['column 2']),
(0, 0, 3, ['column 3']),
(0, 0, 3, ['column 4'])],
[(0, 0, 5, ['body row 2']),
(0, 2, 5, ['Cells may span columns.']),
None,
None],
[(0, 0, 7, ['body row 3']),
(1, 0, 7, ['Cells may', 'span rows.', '']),
(1, 1, 7, ['- Table cells', '- contain', '- body elements.']),
None],
[(0, 0, 9, ['body row 4']), None, None, None]])
The first item is a list containing column widths (colspecs). The second
item is a list of head rows, and the third is a list of body rows. Each
row contains a list of cells. Each cell is either None (for a cell unused
because of another cell's span), or a tuple. A cell tuple contains four
items: the number of extra rows used by the cell in a vertical span
(morerows); the number of extra columns used by the cell in a horizontal
span (morecols); the line offset of the first line of the cell contents;
and the cell contents, a list of lines of text.
compile \+=[=+]+=\+ *$ setup$7 __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;
7
disconnect bottom right org/python/core/PyList
? _mul ?
7 done cells org/python/core/PyDictionary
? rowseps colseps! z y#
parse_table$8
Start with a queue of upper-left corners, containing the upper-left
corner of the table itself. Trace out one rectangular cell, remember
it, and add its upper-right and lower-left corners to the queue of
potential upper-left corners of further cells. Process the queue in
top-to-bottom order, keeping track of how much of each text column has
been seen.
We'll end up knowing all the row and column boundaries, cell positions
and their dimensions.
& unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;()
F* _le, ?
7- scan_cell/ __not__1 ?
72 update_dict_of_lists4 mark_done6 ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; a8
79 get_2D_block; = append? extendA sortC check_parse_completeE "Malformed table; parse incomplete.G% z yI mark_done$9 @For keeping track of how much of each text column has been seen.L __debug__N AssertionErrorP S(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException; ?R
FSK z yU check_parse_complete$10 2Each text column should have been completely seen.X _neZ ?
7[ False] True_W z ya scan_cell$11 :Starting at the top-left corner, start tracing out a cell.d +f
scan_righthc z yj
scan_right$12 r
Look for the top-right corner of the cell, and make note of all column
boundaries ('+').
m scan_downo ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; aq
7rl z yt scan_down$13 j
Look for the bottom-right corner of the cell, making note of all row
boundaries.
w scan_lefty |{v z y} scan_left$14 ?
Noting column boundaries, look for the bottom-left corner of the cell.
It must line up with the starting point.
? scan_up? _isnot? ?
7? z y?
scan_up$15 T
Noting row boundaries, see if we can return to the starting point.
?? z y? structure_from_cells$16 h
From the data collected by `scan_cell()`, convert to the final data
structure.
? keys? ()V }?
? dellocal?
? _is? ?
7? &Cell (row %s, column %s) already used.? _isub? ?
7? Unused cells remaining.?? z y? z y? SimpleTableParser? SimpleTableParser$17Q
Parse a simple table using `parse()`.
Here's an example of a simple table::
===== =====
col 1 col 2
===== =====
1 Second column of row 1.
2 Second column of row 2.
Second line of paragraph.
3 - Second column of row 3.
- Second item in bullet
list (row 3, column 2).
4 is a span
------------
5
===== =====
Top and bottom borders use '=', column span underlines use '-', column
separation is indicated with spaces.
Passing the above table to the `parse()` method will result in the
following data structure, whose interpretation is the same as for
`GridTableParser`::
([5, 25],
[[(0, 0, 1, ['col 1']),
(0, 0, 1, ['col 2'])]],
[[(0, 0, 3, ['1']),
(0, 0, 3, ['Second column of row 1.'])],
[(0, 0, 4, ['2']),
(0, 0, 4, ['Second column of row 2.',
'Second line of paragraph.'])],
[(0, 0, 6, ['3']),
(0, 0, 6, ['- Second column of row 3.',
'',
'- Second item in bullet',
' list (row 3, column 2).'])],
[(0, 1, 10, ['4 is a span'])],
[(0, 0, 12, ['5']),
(0, 0, 12, [''])]])
? =[ =]*$? -[ -]*$? span_pat? setup$18 columns?
border_end? table?? z y? parse_table$19 ?
First determine the column boundaries from the top border, then
process rows. Each row may consist of multiple lines; accumulate
lines until a row is complete. Call `self.parse_row` to finish the
job.
?
parse_columns? parse_row? rstrip? strip? _iadd? ?
7? _lt? ?
7?? z y? parse_columns$20 U
Given a column span underline, return a list of (begin, end) pairs.
? find? ? (Column span incomplete in table line %s.?? z y? init_row$21 setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;??
F?
IndexError? org/python/core/PyException? (Lorg/python/core/PyObject;)Z ??
?? /Column span alignment problem in table line %s.? java/lang/Throwable?? z y? init_row? parse_row$22f
Given the text `lines` of a row, parse it and append to `self.table`.
The row is parsed according to the current column spec (either
`spanline` if provided or `self.columns`). For each column, extract
text from each line, and check for text in column margins. Finally,
adjust for insignificant whitespace.
?
check_columns?? z y? check_columns$23 ?
Check for text in column margins and text overflow in the last column.
Raise TableMarkupError if anything but whitespace is in column margins.
Adjust the end value for the last column if there is text overflow.
? maxint? max? _gt? ?
7? 'Text in column margin in table line %s.?? z y structure_from_cells$24 z y? z y update_dict_of_lists$25 ?
Extend the list values of `master` with those from `newdata`.
Both parameters must be dictionaries containing list values.
items
setdefault z y (Ljava/lang/String;)V org/python/core/PyFunctionTable
? self %Ldocutils/parsers/rst/tableparser$py; y newCode ?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;
F z y args! kwargs# structure% i' line) corners+ top- left/ result1 cellblock3 before5 after7 col9 last;
newcolseps=
newrowseps? rowindexA colindexC colspecsE _[299_20]G onerowI _[302_18]K rowsM _[303_16]O remainingQ rownumS colnumU morerowsW morecolsY numheadrows[ headrows] bodyrows_
firststarta firstendc starte
text_foundg colsi endk beginm colspeco linesq spanlines span_offsetu roww
first_liney lastcol{ _[504_17]} nextstart text? new_end?
main_start? main_end? _[526_20]? first_body_row? master? newdata? key? values? getMain ()Lorg/python/core/PyCode; main ([Ljava/lang/String;)V x }
y???
y? org/python/core/CodeLoader? createSimpleBootstrap 9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;??
?? runMain 5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V??
F? getCodeBootstrap !()Lorg/python/core/CodeBootstrap; #org/python/core/PyRunnableBootstrap? )getFilenameConstructorReflectionBootstrap 2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;??
??
call_function S(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
y? >
y? Q
y? ?
y? ?
y? ?
y?
y?
y?%
y?K
y?W
y?c
y?l
y?v
y?
y??
y??
y??
y??
y??
y??
y??
y??
y??
y?
y?
y? org/python/core/PyRunnable? Lorg/python/compiler/APIVersion; value % Lorg/python/compiler/MTime; `9p? Lorg/python/compiler/Filename; j/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/docutils/parsers/rst/tableparser.py org/python/core/ThreadState? H java/lang/Object? Code LineNumberTable StackMap
SourceFile RuntimeVisibleAnnotations ! y ? z > z Q z ? z ? z ? z z z % z K z W z c z l z v z z ? z ? z ? z ? z ? z ? z ? z ? z ? z z z ? ? ?+? ? +? ? W+? ? N+-? N+? +? %N+-? N+? '+? %N+'-? N+? )? +N--S-+? 1N-2:+-? :+? 3? +N-5S-+? 1N-2:+5? :+? ? 7N+-? ;-__S=-? ?? ?:+=? :-? ?++? ? JN?-? ?? ?:+?? :-? ?+[? ? 7N+?? ;-__S?-??? ?:+?? :-? ?+H? ? 7N+?? ;-__S?-?? ?:+?? :-? ?+? ? JN? LY+? P-? ? ? ?N+5-? N+? t? w? ? . + [ H > ? h L+@+B? ;? +D? ? +$? D? W+&? ? JN? LY+? P-? |? ?N+l-? N+? ?? ?
$ &