⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scanner.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 4 页
字号:
Frees all memory used by the <link linkend="GScanner">GScanner</link>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>scanner</parameter>&nbsp;:</entry><entry>a <link linkend="GScanner">GScanner</link>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GTokenType">enum GTokenType</title><programlisting>typedef enum{  G_TOKEN_EOF			=   0,    G_TOKEN_LEFT_PAREN		= '(',  G_TOKEN_RIGHT_PAREN		= ')',  G_TOKEN_LEFT_CURLY		= '{',  G_TOKEN_RIGHT_CURLY		= '}',  G_TOKEN_LEFT_BRACE		= '[',  G_TOKEN_RIGHT_BRACE		= ']',  G_TOKEN_EQUAL_SIGN		= '=',  G_TOKEN_COMMA			= ',',    G_TOKEN_NONE			= 256,    G_TOKEN_ERROR,    G_TOKEN_CHAR,  G_TOKEN_BINARY,  G_TOKEN_OCTAL,  G_TOKEN_INT,  G_TOKEN_HEX,  G_TOKEN_FLOAT,  G_TOKEN_STRING,    G_TOKEN_SYMBOL,  G_TOKEN_IDENTIFIER,  G_TOKEN_IDENTIFIER_NULL,    G_TOKEN_COMMENT_SINGLE,  G_TOKEN_COMMENT_MULTI,  G_TOKEN_LAST} GTokenType;</programlisting><para>The possible types of token returned from each <link linkend="g-scanner-get-next-token">g_scanner_get_next_token</link>() call.</para><informaltable pgwide="1" frame="none" role="enum"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry><literal>G_TOKEN_EOF</literal></entry><entry>the end of the file.</entry></row><row><entry><literal>G_TOKEN_LEFT_PAREN</literal></entry><entry>a '(' character.</entry></row><row><entry><literal>G_TOKEN_LEFT_CURLY</literal></entry><entry>a '{' character.</entry></row><row><entry><literal>G_TOKEN_RIGHT_CURLY</literal></entry><entry>a '}' character.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GTokenValue">union GTokenValue</title><programlisting>union GTokenValue{  gpointer	v_symbol;  gchar		*v_identifier;  gulong	v_binary;  gulong	v_octal;  gulong	v_int;  gdouble	v_float;  gulong	v_hex;  gchar		*v_string;  gchar		*v_comment;  guchar	v_char;  guint		v_error;};</programlisting><para>A union holding the value of the token.</para></refsect2><refsect2><title><anchor id="GErrorType">enum GErrorType</title><programlisting>typedef enum{  G_ERR_UNKNOWN,  G_ERR_UNEXP_EOF,  G_ERR_UNEXP_EOF_IN_STRING,  G_ERR_UNEXP_EOF_IN_COMMENT,  G_ERR_NON_DIGIT_IN_CONST,  G_ERR_DIGIT_RADIX,  G_ERR_FLOAT_RADIX,  G_ERR_FLOAT_MALFORMED} GErrorType;</programlisting><para>The possible errors, used in the <structfield>v_error</structfield> fieldof <link linkend="GTokenValue">GTokenValue</link>, when the token is a <link linkend="G-TOKEN-ERROR-CAPS">G_TOKEN_ERROR</link>.</para><informaltable pgwide="1" frame="none" role="enum"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry><literal>G_ERR_UNKNOWN</literal></entry><entry>unknown error.</entry></row><row><entry><literal>G_ERR_UNEXP_EOF</literal></entry><entry>unexpected end of file.</entry></row><row><entry><literal>G_ERR_UNEXP_EOF_IN_STRING</literal></entry><entry>unterminated string constant.</entry></row><row><entry><literal>G_ERR_UNEXP_EOF_IN_COMMENT</literal></entry><entry>unterminated comment.</entry></row><row><entry><literal>G_ERR_NON_DIGIT_IN_CONST</literal></entry><entry>non-digit character in a number.</entry></row><row><entry><literal>G_ERR_DIGIT_RADIX</literal></entry><entry>digit beyond radix in a number.</entry></row><row><entry><literal>G_ERR_FLOAT_RADIX</literal></entry><entry>non-decimal floating point number.</entry></row><row><entry><literal>G_ERR_FLOAT_MALFORMED</literal></entry><entry>malformed floating point number.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-CSET-a-2-z">G_CSET_a_2_z</title><programlisting>#define G_CSET_a_2_z	"abcdefghijklmnopqrstuvwxyz"</programlisting><para>The set of lowercase ASCII alphabet characters.Used for specifying valid identifier characters in <link linkend="GScannerConfig">GScannerConfig</link>.</para></refsect2><refsect2><title><anchor id="G-CSET-A-2-Z-CAPS">G_CSET_A_2_Z</title><programlisting>#define G_CSET_A_2_Z	"ABCDEFGHIJKLMNOPQRSTUVWXYZ"</programlisting><para>The set of uppercase ASCII alphabet characters.Used for specifying valid identifier characters in <link linkend="GScannerConfig">GScannerConfig</link>.</para></refsect2><refsect2><title><anchor id="G-CSET-DIGITS-CAPS">G_CSET_DIGITS</title><programlisting>#define G_CSET_DIGITS	"0123456789"</programlisting><para>The set of digits.Used for specifying valid identifier characters in <link linkend="GScannerConfig">GScannerConfig</link>.</para></refsect2><refsect2><title><anchor id="G-CSET-LATINC-CAPS">G_CSET_LATINC</title><programlisting>#define     G_CSET_LATINC</programlisting><para>The set of uppercase ISO 8859-1 alphabet characters which are not ASCII characters. Used for specifying valid identifier characters in <link linkend="GScannerConfig">GScannerConfig</link>.</para></refsect2><refsect2><title><anchor id="G-CSET-LATINS-CAPS">G_CSET_LATINS</title><programlisting>#define     G_CSET_LATINS</programlisting><para>The set of lowercase ISO 8859-1 alphabet characters which are not ASCII characters. Used for specifying valid identifier characters in <link linkend="GScannerConfig">GScannerConfig</link>.</para></refsect2><refsect2><title><anchor id="g-scanner-add-symbol">g_scanner_add_symbol()</title><programlisting>#define     g_scanner_add_symbol( scanner, symbol, value )</programlisting><warning><para><literal>g_scanner_add_symbol</literal> is deprecated and should not be used in newly-written code.</para></warning><para>Adds a symbol to the default scope.Deprecated in favour of <link linkend="g-scanner-scope-add-symbol">g_scanner_scope_add_symbol</link>().</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>scanner</parameter>&nbsp;:</entry><entry>a <link linkend="GScanner">GScanner</link>.</entry></row><row><entry align="right"><parameter>symbol</parameter>&nbsp;:</entry><entry>the symbol to add.</entry></row><row><entry align="right"><parameter>value</parameter>&nbsp;:</entry><entry>the value of the symbol.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-scanner-remove-symbol">g_scanner_remove_symbol()</title><programlisting>#define     g_scanner_remove_symbol( scanner, symbol )</programlisting><warning><para><literal>g_scanner_remove_symbol</literal> is deprecated and should not be used in newly-written code.</para></warning><para>Removes a symbol from the default scope.Deprecated in favour of <link linkend="g-scanner-scope-remove-symbol">g_scanner_scope_remove_symbol</link>().</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>scanner</parameter>&nbsp;:</entry><entry>a <link linkend="GScanner">GScanner</link>.</entry></row><row><entry align="right"><parameter>symbol</parameter>&nbsp;:</entry><entry>the symbol to remove.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-scanner-foreach-symbol">g_scanner_foreach_symbol()</title><programlisting>#define     g_scanner_foreach_symbol( scanner, func, data )</programlisting><warning><para><literal>g_scanner_foreach_symbol</literal> is deprecated and should not be used in newly-written code.</para></warning><para>Calls a function for each symbol in the default scope.Deprecated in favour of <link linkend="g-scanner-scope-foreach-symbol">g_scanner_scope_foreach_symbol</link>().</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>scanner</parameter>&nbsp;:</entry><entry>a <link linkend="GScanner">GScanner</link>.</entry></row><row><entry align="right"><parameter>func</parameter>&nbsp;:</entry><entry>the function to call with each symbol.</entry></row><row><entry align="right"><parameter>data</parameter>&nbsp;:</entry><entry>data to pass to the function.</entry></row></tbody></tgroup></informaltable></refsect2></refsect1></refentry>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -