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

📄 041-045.html

📁 dshfghfhhgsfgfghfhfghgfhfghfgh fg hfg hh ghghf hgf hghg gh fg hg hfg hfh f hg hgfh gkjh kjkh g yj f
💻 HTML
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1558515682"><META name=vstitle content="Java Digital Signal Processing"><META name=vsauthor content="Douglas A. Lyon"><META name=vsimprint content="M&T Books"><META name=vspublisher content="IDG Books Worldwide, Inc."><META name=vspubdate content="11/01/97"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Java Digital Signal Processing:Java Programming: The Basics</TITLE>
<!-- HEADER --><STYLE type="text/css">  <!-- A:hover  { 	color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=1558515682//-->
<!--TITLE=Java Digital Signal Processing//-->
<!--AUTHOR=Douglas A. Lyon//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=2//-->
<!--PAGES=041-045//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="039-041.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="045-047.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>Following are the MBNF rules of Java which we will use in the remaining sections and chapters. These rules will, when used, always refer to their numbers. Sometimes the MBNF will be refined beyond the basic MBNF given here. When this occurs, it will not be preceded by the numeration.
</P>
<!-- CODE //-->
<PRE>
compilationUnit -&gt;
           [packageStatement] &lt; importStatement &gt; &lt; typeDeclaration &gt; .
 packageStatement -&gt;
           &#147;package&#148; packageName &#147;;&#148; .
 importStatement -&gt;
           &#147;import&#148; ( ( packageName  &#147;.&#148; &#147;*&#148;  &#147;;&#148; ) |
           ( className | interfaceName ) ) &#147;;&#148;  .
 typeDeclaration -&gt;
           [docComment] ( classDeclaration  | interfaceDeclaration )  &#147;;&#148; .
 docComment -&gt;
           &#147;/**&#148; &#147;... text ...&#148; &#147;*/&#148;.
 classDeclaration -&gt;
           &lt; modifier &gt;  &#147;class&#148; identifier [&#147;extends&#148; className]
           [ &#147;implements&#148; interfaceName &lt; &#147;,&#148; interfaceName &gt; ] &#147;&#123;&#147;
            &lt; fieldDeclaration &gt; &#147;&#125;&#148;  .
 interfaceDeclaration -&gt;
           &lt; modifier &gt; &#147;interface&#148; identifier [ &#147;extends&#148;
           interfaceName &lt; &#147;,&#148; interfaceName &gt; ] &#147;&#123;&#147;
            &lt; fieldDeclaration &gt; &#147;&#125;&#148; .
 fieldDeclaration -&gt;
           ( [docComment] ( methodDeclaration  |
            constructorDeclaration  | variableDeclaration ) ) |
            staticInitializer | &#147;;&#148;  .
 method_declaration -&gt;
           &lt; modifier &gt; type identifier &#147;(&#147; [parameterList] &#147;)&#148; &lt;
           &#147;[&#147; &#147;]&#148; &gt; ( statementBlock  | &#147;;&#148; ) .
 constructorDeclaration -&gt;
           &lt; modifier &gt; identifier  &#147;(&#147; [parameterList]  &#147;)&#148;
           statementBlock  .
 statementBlock -&gt;
           &#147;&#123;&#147;  &lt; statement &gt; &#147;&#125;&#148;  .
 variableDeclaration -&gt;
           &lt; modifier &gt; type variableDeclarator
            &lt;  &#147;,&#148; variableDeclarator  &gt;
            &#147;;&#148; .
 variableDeclarator -&gt;
           identifier  &lt; &#147;[&#147; &#147;]&#148; &gt; [ &#147;=&#148; variableInitializer] .
 variableInitializer -&gt;
           expression  | ( &#147;&#123;&#147; [variableInitializer
           &lt;  &#147;,&#148; variableInitializer  &gt; [ &#147;,&#148; ] ]   &#147;&#125;&#148; ) .
 staticInitializer -&gt;
           &#147;static&#148; statementBlock  .
 parameterList -&gt;
           parameter  &lt;  &#147;,&#148; parameter &gt;  .
 parameter -&gt;
           type identifier &lt; &#147;[&#147; &#147;]&#148;
            &gt;  .
 statement -&gt;
           variableDeclaration  | ( expression  &#147;;&#148;)| (
           statementBlock ) | ( ifStatement ) | ( doStatement ) |
           ( whileStatement ) | ( for_statement ) | ( tryStatement )
           | ( switchStatement ) | ( &#147;synchronized&#148;  &#147;(&#147; expression
            &#147;)&#148; statement ) | ( &#147;return&#148;
            [expression]  &#147;;&#148;  ) | ( &#147;throw&#148; expression &#147;;&#148;  ) | (
            identifier  &#147;:&#148; statement )
            | ( &#147;break&#148; [identifier]  &#147;;&#148; )
            | ( &#147;continue&#148; [identifier] &#147;;&#148;
            ) | ( &#147;;&#148; )  .
 ifStatement -&gt;
           &#147;if&#148;  &#147;(&#147; expression &#147;)&#148; statement   [ &#147;else&#148;   statement]  .
 doStatement -&gt;
           &#147;do&#148; statement &#147;while&#148; #147;(&#147; expression &#147;)&#148; &#147;;&#148;  .
 whileStatement -&gt;
           &#147;while&#148; &#147;(&#147; expression &#147;)&#148; statement  .
 forStatement -&gt;
           &#147;for&#148; &#147;(&#147; ( variableDeclaration | ( expression  &#147;;&#148; )
           | &#147;;&#148; ) [expression]  &#147;;&#148;  [expression] &#147;;&#148;  &#147;)&#148;
             statement  .
 tryStatement -&gt;
           &#147;try&#148; statement  &lt;  &#147;catch&#148; #147;(&#147; parameter &#147;)&#148; statement &gt;
            [ &#147;finally&#148; statement] .
 switchStatement -&gt;
           &#147;switch&#148;  &#147;(&#147; expression &#147;)&#148;  &#147;&#123;&#147; &lt; ( &#147;case&#148; expression
            &#147;:&#148; ) | ( &#147;default&#148;  &#147;:&#148;  ) | statement &gt;
            &#147;&#125;&#148;  .
 expression  -&gt;
           numericExpression  | testingExpression  |
            logicalExpression | stringExpression  |
            bitExpression  | castingExpression  | creatingExpression  |
           literalExpression  | &#147;null&#148;  | &#147;super&#148; | &#147;this&#148;  |
            identifier  | ( &#147;(&#147; expression &#147;)&#148;  ) | ( expression (
            ( &#147;(&#147; [arglist] &#147;)&#148; ) | (
            &#147;[&#147; expression  &#147;]&#148; ) | (
            &#147;.&#148; expression  ) | ( &#147;,&#148;
            expression ) | ( &#147;instanceof&#148;
            ( className | interfaceName ) ) ) ) .
 numericExpression -&gt;
           ( ( &#147;-&#148; | &#147;&#43;&#43;&#148; | &#147;&#151;&#148; ) expression ) |
            ( expression ( &#147;&#43;&#43;&#148; |&#147;&#151;&#148; ) ) |
            ( expression ( &#147;&#43;&#148; | &#147;&#43;=&#148;  | &#147;-&#148; | &#147;-=&#148;
            | &#147;*&#148; | &#147;*=&#148; | &#147;/&#148; | &#147;/=&#148;
            | &#147;%&#148; | &#147;%=&#148; ) expression ) .
 testingExpression -&gt;
           ( expression ( &#147;&gt;&#148; | &#147;&lt;&#148;  | &#147;&gt;=&#148; | &#147;&lt;=&#148; |
            &#147;==&#148; | &#147;!=&#148; ) expression  ) .
 logicalExpression -&gt;
           ( &#147;!&#148; expression ) | ( expression ( &#147;&#38;&#148; | &#147;&#38;=&#148;
             | &#147;|&#148; | &#147;|=&#148; | &#147;^&#148; | &#147;^=&#148; | ( &#147;&#38;&#38;&#148; ) |
            &#147;||=&#148; | &#147;%&#148; | &#147;%=&#148; )
            expression ) | ( expression  &#147;?&#148;
            expression &#147;:&#148; expression ) | &#147;true&#148; |
           &#147;false&#148;  .
 stringExpression  = ( expression ( &#147;&#43;&#148; | &#147;&#43;=&#148; ) expression
           ) .
 bitExpression -&gt;
           ( &#147;~&#148; expression ) | ( expression  ( &#147;&gt;&gt;=&#148; | &#147;&lt;&lt;&#148; 
            | &#147;&gt;&gt;&#148;  | &#147;&gt;&gt;&gt;&#148; ) expression  ) .
 castingExpression -&gt;
           &#147;(&#147; type  &#147;)&#148; expression  .
 creatingExpression -&gt;
           &#147;new&#148; ( ( className  &#147;(&#147; [arglist] &#147;)&#148;  ) | (
            type_specifier [ &#147;[&#147; expression &#147;]&#148; ] &lt;  &#147;[&#147;  &#147;]&#148; &gt; )
            | ( &#147;(&#147; expression  &#147;)&#148; ) ) .
 literalExpression -&gt;
           integerLiteral | floatLiteral | string | character .
 arglist -&gt;
           expression &lt; &#147;,&#148; expression &gt; .
 type -&gt;
           typeSpecifier &lt; &#147;[&#147; &#147;]&#148; &gt; .
 typeSpecifier -&gt;
           &#147;boolean&#148; | &#147;byte&#148; | &#147;char&#148; | &#147;short&#148; | &#147;int&#148;
           | &#147;float&#148; | &#147;long&#148; | &#147;double&#148; | className |
            interfaceName  .
 modifier -&gt;
           &#147;public&#148; | &#147;private&#148; | &#147;protected&#148; | &#147;static&#148;  |
            &#147;final&#148; | &#147;native&#148;  | &#147;synchronized&#148;  | &#147;abstract&#148;
            | &#147;threadsafe&#148;  | &#147;transient&#148;.
 packageName -&gt;
           identifier | ( packageName &#147;.&#148; identifier  ).
 className -&gt;
           identifier  | ( packageName  &#147;.&#148; identifier ).
 interfaceName -&gt;
           identifier  | ( packageName  &#147;.&#148; identifier )  .
 integerLiteral -&gt;
           ( ( &#147;1..9&#148;  &lt;  &#147;0..9&#148; &gt; ) |
            &lt;  &#147;0..7&#148;  &gt; | ( &#147;0&#148; &#147;x&#148;  &#147;0..9a..f&#148;  &lt;
            &#147;0..9a..f&#148;  &gt;  ) ) [ &#147;l&#148; ] .
 floatLiteral -&gt;
           ( decimalDigits  &#147;.&#148;  [decimalDigits]
            [exponentPart]
            [floatTypeSuffix] ) | ( &#147;.&#148; decimalDigits
            [exponentPart] [floatTypeSuffix] ) | ( decimalDigits
            [exponentPart] [floatTypeSuffix] ) .
 decimalDigits -&gt;
           &#147;0..9&#148; &lt; &#147;0..9&#148; &gt; .
 exponentPart -&gt;
           &#147;e&#148; [ &#147;&#43;&#148; | &#147;-&#148;] decimalDigits  .
 floatTypeSuffix -&gt;
           &#147;f&#148; | &#147;d&#148;  . character -&gt;
           &#147;based on the unicode character set&#148;  .
 string -&gt;
           &#147;&#145;&#146;&#148; &lt; character &gt; &#147;&#145;&#146;&#148;  .
 identifier -&gt;
&#147;a..z,$,_&#148; &lt; &#147;a..z,$,_,0..9,unicode character over 00C0&#148; &gt; .
</PRE>
<!-- END CODE //-->
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="039-041.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="045-047.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>

<hr width="90%" size="1" noshade><div align="center"><font face="Verdana,sans-serif" size="1">Copyright &copy; <a href="/reference/idgbooks00001.html">IDG Books Worldwide, Inc.</a></font></div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed --><!-- reference_subfoot = footer --><!-- reference_footer = subfoot --></BODY></HTML><!-- END FOOTER -->

⌨️ 快捷键说明

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