Skip to content

Commit

Permalink
Fix .rst markup for tables and some code samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ptmcg committed Apr 30, 2022
1 parent e9e56bd commit 77206de
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 112 deletions.
54 changes: 27 additions & 27 deletions docs/HowToUsePyparsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1340,37 +1340,37 @@ Unicode character sets for international parsing
------------------------------------------------
Pyparsing includes the ``unicode`` namespace that contains definitions for ``alphas``, ``nums``, ``alphanums``,
``identchars``, ``identbodychars``, and ``printables`` for character ranges besides 7- or 8-bit ASCII. You can
access them using code like the following:
access them using code like the following::

import pyparsing as pp
ppu = pp.unicode

greek_word = pp.Word(ppu.Greek.alphas)
greek_word[...].parse_string("Καλημέρα κόσμε")

The following language ranges are defined:

========================== ================= ================================================
Unicode set Alternate names Description
-------------------------- ----------------- ------------------------------------------------
Arabic العربية
Chinese 中文
Cyrillic кириллица
Greek Ελληνικά
Hebrew עִברִית
Japanese 日本語 Union of Kanji, Katakana, and Hiragana sets
Japanese.Kanji 漢字
Japanese.Katakana カタカナ
Japanese.Hiragana ひらがな
Hangul Korean, 한국어
Latin1 All Unicode characters up to code point 255
LatinA
LatinB
Thai ไทย
Devanagari देवनागरी
BasicMultilingualPlane BMP All Unicode characters up to code point 65535
CJK Union of Chinese, Japanese, and Korean sets
========================== ================= ================================================
The following language ranges are defined.

========================== ================= ================================================
Unicode set Alternate names Description
-------------------------- ----------------- ------------------------------------------------
Arabic العربية
Chinese 中文
Cyrillic кириллица
Greek Ελληνικά
Hebrew עִברִית
Japanese 日本語 Union of Kanji, Katakana, and Hiragana sets
Japanese.Kanji 漢字
Japanese.Katakana カタカナ
Japanese.Hiragana ひらがな
Hangul Korean, 한국어
Latin1 All Unicode characters up to code point 255
LatinA
LatinB
Thai ไทย
Devanagari देवनागरी
BasicMultilingualPlane BMP All Unicode characters up to code point 65535
CJK Union of Chinese, Japanese, and Korean sets
========================== ================= ================================================

The base ``unicode`` class also includes definitions based on all Unicode code points up to ``sys.maxunicode``. This
set will include emojis, wingdings, and many other specialized and typographical variant characters.
Expand Down Expand Up @@ -1410,9 +1410,9 @@ Parser elements that are separately named will be broken out as their own sub-di
to going through and adding ``.set_name()`` calls on all your sub-expressions, you can use ``autoname_elements()`` after
defining your complete grammar. For example::

a = pp.Literal("a")
b = pp.Literal("b").set_name("bbb")
pp.autoname_elements()
a = pp.Literal("a")
b = pp.Literal("b").set_name("bbb")
pp.autoname_elements()

`a` will get named "a", while `b` will keep its name "bbb".

Expand Down
170 changes: 85 additions & 85 deletions docs/whats_new_in_3_0_0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -608,91 +608,91 @@ API Changes
without change. The synonyms will be removed in a future release.
New parser code should be written using the new PEP-8 snake case names.

============================== ================================
Name Previous name
------------------------------ --------------------------------
ParserElement
- parse_string parseString
- scan_string scanString
- search_string searchString
- transform_string transformString
- add_condition addCondition
- add_parse_action addParseAction
- can_parse_next canParseNext
- default_name defaultName
- enable_left_recursion enableLeftRecursion
- enable_packrat enablePackrat
- ignore_whitespace ignoreWhitespace
- inline_literals_using inlineLiteralsUsing
- parse_file parseFile
- leave_whitespace leaveWhitespace
- parse_string parseString
- parse_with_tabs parseWithTabs
- reset_cache resetCache
- run_tests runTests
- scan_string scanString
- search_string searchString
- set_break setBreak
- set_debug setDebug
- set_debug_actions setDebugActions
- set_default_whitespace_chars setDefaultWhitespaceChars
- set_fail_action setFailAction
- set_name setName
- set_parse_action setParseAction
- set_results_name setResultsName
- set_whitespace_chars setWhitespaceChars
- transform_string transformString
- try_parse tryParse

ParseResults
- as_list asList
- as_dict asDict
- get_name getName

ParseBaseException
- parser_element parserElement

any_open_tag anyOpenTag
any_close_tag anyCloseTag
c_style_comment cStyleComment
common_html_entity commonHTMLEntity
condition_as_parse_action conditionAsParseAction
counted_array countedArray
cpp_style_comment cppStyleComment
dbl_quoted_string dblQuotedString
dbl_slash_comment dblSlashComment
delimited_list delimitedList
dict_of dictOf
html_comment htmlComment
infix_notation infixNotation
java_style_comment javaStyleComment
line_end lineEnd
line_start lineStart
make_html_tags makeHTMLTags
make_xml_tags makeXMLTags
match_only_at_col matchOnlyAtCol
match_previous_expr matchPreviousExpr
match_previous_literal matchPreviousLiteral
nested_expr nestedExpr
null_debug_action nullDebugAction
one_of oneOf
OpAssoc opAssoc
original_text_for originalTextFor
python_style_comment pythonStyleComment
quoted_string quotedString
remove_quotes removeQuotes
replace_html_entity replaceHTMLEntity
replace_with replaceWith
rest_of_line restOfLine
sgl_quoted_string sglQuotedString
string_end stringEnd
string_start stringStart
token_map tokenMap
trace_parse_action traceParseAction
unicode_string unicodeString
with_attribute withAttribute
with_class withClass
============================== ================================
============================== ================================
Name Previous name
------------------------------ --------------------------------
ParserElement
- parse_string parseString
- scan_string scanString
- search_string searchString
- transform_string transformString
- add_condition addCondition
- add_parse_action addParseAction
- can_parse_next canParseNext
- default_name defaultName
- enable_left_recursion enableLeftRecursion
- enable_packrat enablePackrat
- ignore_whitespace ignoreWhitespace
- inline_literals_using inlineLiteralsUsing
- parse_file parseFile
- leave_whitespace leaveWhitespace
- parse_string parseString
- parse_with_tabs parseWithTabs
- reset_cache resetCache
- run_tests runTests
- scan_string scanString
- search_string searchString
- set_break setBreak
- set_debug setDebug
- set_debug_actions setDebugActions
- set_default_whitespace_chars setDefaultWhitespaceChars
- set_fail_action setFailAction
- set_name setName
- set_parse_action setParseAction
- set_results_name setResultsName
- set_whitespace_chars setWhitespaceChars
- transform_string transformString
- try_parse tryParse

ParseResults
- as_list asList
- as_dict asDict
- get_name getName

ParseBaseException
- parser_element parserElement

any_open_tag anyOpenTag
any_close_tag anyCloseTag
c_style_comment cStyleComment
common_html_entity commonHTMLEntity
condition_as_parse_action conditionAsParseAction
counted_array countedArray
cpp_style_comment cppStyleComment
dbl_quoted_string dblQuotedString
dbl_slash_comment dblSlashComment
delimited_list delimitedList
dict_of dictOf
html_comment htmlComment
infix_notation infixNotation
java_style_comment javaStyleComment
line_end lineEnd
line_start lineStart
make_html_tags makeHTMLTags
make_xml_tags makeXMLTags
match_only_at_col matchOnlyAtCol
match_previous_expr matchPreviousExpr
match_previous_literal matchPreviousLiteral
nested_expr nestedExpr
null_debug_action nullDebugAction
one_of oneOf
OpAssoc opAssoc
original_text_for originalTextFor
python_style_comment pythonStyleComment
quoted_string quotedString
remove_quotes removeQuotes
replace_html_entity replaceHTMLEntity
replace_with replaceWith
rest_of_line restOfLine
sgl_quoted_string sglQuotedString
string_end stringEnd
string_start stringStart
token_map tokenMap
trace_parse_action traceParseAction
unicode_string unicodeString
with_attribute withAttribute
with_class withClass
============================== ================================

Discontinued Features
=====================
Expand Down

0 comments on commit 77206de

Please sign in to comment.