Expressive Compile-time Parsers
Compile-Time Parsers Libraries Use Cases Implementation Techniques Reflection Language Evolution API Design Metaprogramming TricksAbout the talk • Expressiveness in C++ • Parsers • Operator overloading Open source compile-time libraries • API • Design • Implementation details • Using compile-time parsers • Reflection • Examples: functions, types, treesParser In a compiler: tokens -> parser -> syntax parse(text or tokens) -> value or errorParser Combinators Create a parser by combining existing parsers. parse_string_or_int(text, pos) -> parse_string(text, pos) || parse_int(text, pos) parse_string_or_int0 码力 | 134 页 | 1.73 MB | 5 月前3Google XML Document Format Style Guide Version 1.0
Document formats MUST NOT depend on the order of attributes in a start-tag. [Rationale: Few XML parsers report the order, and it is not part of the XML Infoset.] 2. Elements SHOULD NOT be overloaded with converted to spaces by conformant XML parsers.] 4. Document formats MUST allow either single or double quotation marks around attribute values. [Rationale: XML parsers don’t report the difference.] 5 7 XML parser without requiring additional special-purpose parsers, which are easy to get wrong.] 5. Be careful with whitespace in values. XML parsers don’t strip whitespace in elements, but do convert newlines0 码力 | 13 页 | 51.99 KB | 1 年前3Python 标准库参考指南 2.7.18
building partial DOM trees . . . . . . . . . . . . . . . . . . . . 861 19.11 xml.sax —Support for SAX2 parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862 19.12 xml.sax.handler —Base . . . . . . 869 19.14 xml.sax.xmlreader —Interface for XML parsers . . . . . . . . . . . . . . . . . . . . . . . . . 870 19.15 xml.parsers.expat —Fast XML parsing using Expat . . . . . . . . . . . . object (which usually is a dictionary). The XML data is parsed using the Expat parser from xml.parsers.expat –see its documentation for possible exceptions on ill-formed XML. Unknown elements will simply0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
building partial DOM trees . . . . . . . . . . . . . . . . . . . . 861 19.11 xml.sax —Support for SAX2 parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862 19.12 xml.sax.handler —Base . . . . . . 869 19.14 xml.sax.xmlreader —Interface for XML parsers . . . . . . . . . . . . . . . . . . . . . . . . . 870 19.15 xml.parsers.expat —Fast XML parsing using Expat . . . . . . . . . . . . object (which usually is a dictionary). The XML data is parsed using the Expat parser from xml.parsers.expat –see its documentation for possible exceptions on ill-formed XML. Unknown elements will simply0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
building partial DOM trees . . . . . . . . . . . . . . . . . . . . 861 19.11 xml.sax —Support for SAX2 parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862 19.12 xml.sax.handler —Base . . . . . . 869 19.14 xml.sax.xmlreader —Interface for XML parsers . . . . . . . . . . . . . . . . . . . . . . . . . 870 19.15 xml.parsers.expat —Fast XML parsing using Expat . . . . . . . . . . . . object (which usually is a dictionary). The XML data is parsed using the Expat parser from xml.parsers.expat –see its documentation for possible exceptions on ill-formed XML. Unknown elements will simply0 码力 | 1552 页 | 7.42 MB | 9 月前3Conda 23.10.x Documentation
happens when you run conda install numpy? Roughly, these steps: 1. Command line interface • argparse parsers • Environment variables • Configuration files • Context initialization • Delegation of the task environment. Returns Valid prefix. Return type str conda_argparse Conda command line interface parsers. Classes ArgumentParser Object for parsing command line strings into Python ob- jects. _GreedySubParsersAction ub_parsers) configure_parser_info(sub_parsers) configure_parser_config(sub_parsers) configure_parser_create(sub_parsers) configure_parser_init(sub_parsers) configure_parser_install(sub_parsers)0 码力 | 773 页 | 5.05 MB | 7 月前3Conda 23.9.x Documentation
happens when you run conda install numpy? Roughly, these steps: 1. Command line interface • argparse parsers • Environment variables • Configuration files • Context initialization • Delegation of the task environment. Returns Valid prefix. Return type str conda_argparse Conda command line interface parsers. 318 Chapter 5. Developer guide conda, Release 23.9.1.dev1 Classes ArgumentParser Object for ub_parsers) configure_parser_info(sub_parsers) configure_parser_config(sub_parsers) configure_parser_create(sub_parsers) configure_parser_init(sub_parsers) configure_parser_install(sub_parsers)0 码力 | 753 页 | 4.86 MB | 7 月前3Conda 23.7.x Documentation
happens when you run conda install numpy? Roughly, these steps: 1. Command line interface • argparse parsers • Environment variables • Configuration files • Context initialization • Delegation of the task environment. Returns Valid prefix. Return type str conda_argparse Conda command line interface parsers. Classes ArgumentParser Object for parsing command line strings into Python ob- jects. _GreedySubParsersAction ub_parsers) configure_parser_info(sub_parsers) configure_parser_config(sub_parsers) configure_parser_create(sub_parsers) configure_parser_init(sub_parsers) configure_parser_install(sub_parsers)0 码力 | 795 页 | 4.91 MB | 7 月前3pandas: powerful Python data analysis toolkit - 0.12
following, The original API is deprecated and will be removed in a future version from pandas.io.parsers import ExcelFile xls = ExcelFile(’path_to_file.xls’) xls.parse(’Sheet1’, index_col=None, na_values=[’NA’]) defaults to None when reading, and falls back on bs4 + html5lib when lxml fails to parse. a list of parsers to try until success is also valid • The internal pandas class hierarchy has changed (slightly) space limiting in selection. • Greatly improved ISO8601 (e.g., yyyy-mm-dd) date parsing for file parsers (GH2698) • Allow DataFrame.merge to handle combinatorial sizes too large for 64-bit integer (GH2690)0 码力 | 657 页 | 3.58 MB | 1 年前3Python 标准库参考指南 3.6.15
xml.sax.xmlreader —用于 XML 解析器的接口 . . . . . . . . . . . . . . . . . . . . . . . . 1048 20.13 xml.parsers.expat —使用 Expat 的快速 XML 解析 . . . . . . . . . . . . . . . . . . . . . . 1052 21 互联网协议和支持 1061 21 (although the order of keys shouldn’t be important in plist files). FMT_XML 格式的 XML 数据会使用来自xml.parsers.expat 的 Expat 解析器–请参阅其文档了解错 误格式 XML 可能引发的异常。未知元素将被 plist 解析器直接略过。 当文件无法被解析时二进制格式的解析器将引发 InvalidFileException。 和 defusedexpat 软件包 部分。 值得注意的是xml 包中的模块要求至少有一个 SAX 兼容的 XML 解析器可用。在 Pythonm 中包含 Expat 解析 器,因此xml.parsers.expat 模块将始终可用。 xml.dom 和xml.sax 包的文档是 DOM 和 SAX 接口的 Python 绑定的定义。 XML 处理子模块包括: • xml.etree.El0 码力 | 1886 页 | 8.95 MB | 9 月前3
共 604 条
- 1
- 2
- 3
- 4
- 5
- 6
- 61