ImageVerifierCode 换一换
格式:DOC , 页数:10 ,大小:245.50KB ,
资源ID:7691449      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/7691449.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(SyntaxofTheCProgrammingLanguage.doc)为本站上传会员【xrp****65】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

SyntaxofTheCProgrammingLanguage.doc

1、Syntax of The C Programming Language Cross-Refferences 1. ASCII::= See http://www.csci.csusb.edu/dick/samples/comp.text.ASCII.html Used_in The definition of C++ [ c++.syntax.html ] Used_in The definition of Java [ java.syntax.html ] Notation This uses my XBNF Extended BNF Notation where "|"

2、 indicates "or", "(...)" indicates priority. For more information see [ intro_ebnf.html ] The following abbreviations are also used: 1. O(_)::= 0 or 1 occurrences, 2. N(_)::= 1 or more occurrence 3. L(_)::= a comma separated list 4. #(_)::= 0 or more occurrences. 5. S(E,Op)::=serial_op

3、erator_expression(E, Op) 6. serial_operator_expression(E,Op)::= E #(Op E). S(E,Op) = E Op E Op E Op ... E It also uses the following shorthand Lexemes 7. identifier::=nondigit #(nondigit | digit), 8. nondigit::="_" | "a" | "A" | "b" | "B" | "c" | "C" | "d" | "D" | "e" | "E" | "f" | "F

4、" | "g" | "G" | "h" | "H" | "i" | "I" | "j" | "J" | "k" | "K" | "l" | "L" | "m" | "M" | "n" | "N" | "o" | "O" | "p" | "P" | "q" | "Q" | "r" | "R" | "s" | "S" | "t" | "T" | "u" | "U" | "v" | "V" | "w" | "W" | "x" | "X" | "y" | "Y" | "z" | "Z", 9. digit::="0" | "1" | "2" | "3" | "4" | "5" | "6" | "7

5、" | "8" | "9", 10. punctuator::="[" | "]" | "(" | ")" | "{" | "}" | "*" | "," | ":" | "=" | ";" | "..." | "#", 11. operator::="[" | "]" | "(" | ")" | "." | "->" | "++" | "--" | "&" | "*" | "+" | "-" | "~" | "!" | "sizeof" | "/" | "%" | "<<" | ">>" | "<" | ">" | "<=" | ">=" | "==" | "!=" | "^" |

6、"|" | "&&" | "||" | "?" | ":" | "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "||=" | "," | "#" | "##", 12. infix::= "->" | "&" | "*" | "+" | "-" | "/" | "%" | "<<" | ">>" | "<" | ">" | "<=" | ">=" | "==" | "!=" | "^" | "|" | "&&" | "||" | "=" | "*=" | "/=" | "%=" | "+=" |

7、 "-=" | "<<=" | ">>=" | "&=" | "^=" | "||=" | "," , 13. prefix::= "++" | "--" | "&" | "*" | "+" | "-" | "~" | "!" | "sizeof" , 14. postfix::= "++" | "--", 15. integer_suffix::=#(unsigned_suffix) | #(long_suffix), 16. unsigned_suffix::="u" | "U", 17. long_suffix::="l" | "L", 18. sign::="+

8、" | "-", 19. octal_constant::="0" #(octal_digit), 20. octal_digit::="0" | "1" | "2" | "3" | "4" | "5" | "6" | "7", 21. hex_constant::=("0x" | "0X") (hex_digit), 22. hex_digit::="0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "A" | "B" | "C" | "

9、D" | "E" | "F", 23. decimal_constant::=non_zero_digit #(digit), 24. non_zero_digit::="1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9", 25. integer_constant::=(decimal_constant | octal_constant | hex_constant) | integer_suffix, 26. float_suffix::="f" | "l" | "F" | "L", 27. fraction::=#di

10、git "." digit #digit, 28. exponent_part::=("e" | "E") sign #(digit), 29. float_constant::=fraction (exponent_part|) (float_suffix|)|(decimal_constant (exponent_part|) float_suffix, 30. enumeration_constant::=identifier, 31. char_constant::=char~(double_quote|eoln|backslash)| escape_sequence,

11、 32. escape_sequence::=backslash (char | "0" #octal_digit |"0x"#hexadecimal_digit), 33. character_constant::="'" char_constant"'" , constant :=::=float_constant | integer_constant | enumeration_constant | character_constant, 34. string__char::=char~(double_quote|eoln|backslash)| escape_seque

12、nce, 35. string_literal::=double_quote #(string_char) double_quote, . . . . . . . . . ( end of section Lexemes) <> Expressions Expressions are made up by applying operators to primary_expressions. 36. primary_expression::= variable | constant | string_literal | "(" expressio

13、n ")", 37. variable::= identifier & declared and in scope of declaration. 38. argument_list::=List(assignment_expression), Operators Symbol See "("... ")" primary_expression cast_expression function_call "." part of a structure "-" additive_expression unary_expression "->" p

14、art of a pointed at structure "--" unary_expression postfix_expression "-=" assignment_expression "&" AND_expression bitwise Boolean "&=" assignment_expression "&" address_of unary_expression "&&" logical_AND_expression "*" multiplicative_expression contents of pointer un

15、ary_expression "*=" assignment_expression "+" additive_expression unary_expression "++" unary_expression postfix_expression "+=" assignment_expression "~" bitwise negation prefix "!" logical negation prefix "!=" equality_expression "sizeof" unary_expression "/" mu

16、ltiplicative_expression divide "/=" assignment_expression "%" multiplicative_expression mod "%=" assignment_expression "<" relational_expression "<<" shift_expression left "<<=" assignment_expression "<=" relational_expression ">" relational_expression ">>" shift_

17、expression right ">=" relational_expression ">>=" assignment_expression "==" equality_expression "=" assignment_expression "^" XOR_expression exclusive-or bitwise "^=" assignment_expression "|" OR_expression bitwise or "||" logical_OR_expression "||=" assignment_e

18、xpression ..."?"... ":"... conditional_expression "," expression (discard previous value) Arithmetic 39. post_fix::="++" | "--", 40. post_fix_expression::=(primary_expression) #(post_fix), 41. unary_operator::="&" | "*" | "+" | "-" | "!" | "-", 42. pre_fix::="++" | "--" | "sizeof",

19、 43. unary_expression::=#(pre-fix) post_fix_expression | unary_operator cast_expression | "sizeof" "(" type_name")", 44. cast_expression::=#(type_name) unary_expression. This implies that casts are done after doing post-fix operations.. 45. multiplicative_expression::=S(cast_expression, multipl

20、icative_operator). [ serial_operator_expression ] The rule above means that 'casts' are done before multiplication and division, and that multiplication and division are done from left to right. 46. multiplicative_operator::="*" | "%" | "/", 47. additive_expression::=S(multiplicative_expressio

21、n, additive_operator). This means that addition and subtraction occurs after multiplication and from left to right. 48. additive_operator::="+" | "-", Shifts 49. shift_expression::=S(additive_expression, shift_operator), 50. shift_operator::=">>" | "<<", "<<" is left shift of bits (multiply b

22、y 2), and ">>" is the reverse and divides by 2. Relations 51. relational_expression::= S(shift_expression, relational_operator), 52. relational_operator::="<" | ">" | "<=" | ">=", 53. equality_expression::=S(relational_expression, equality_operator), 54. equality_operator::="==" | "!=", B

23、itwise Expressions These use the lowest level machine code operations that manipulate the bits in words. They are very fast and powerful. They are mostly used in system programming: drivers, operating systems, compilers, interpreters, shells, ... . They are also a very fast and tight coding for sub

24、sets of small sets: one bit per element has 1 for membership and 0 for nonmembership. For example if a class can meet on any collection of the 5 working days in a week (Monday=1, ..., Friday=5) then FRWTM 10101 = MWF Decimal Binary (last 4 bits/ 1 byte) 0 0000 1 0001 2 0010

25、 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 55. AND_expression::=S(equality_expression, and_operator), 56. and_operator::="&", This operator takes each bit in the value of its arguments in turn to calculate the bit in the answer. A bit is 1 if and only if both arguments have

26、 bits in that place that are 1. Decimal Binary 3 0011 5 0101 3&5 0001 57. XOR_expression::=S(AND_expression, XOR_operator), 58. XOR_operator::="^", XOR is short for eXclusive-OR. The n'th bit in the value is 1 precisly when the n'th bits in the two arguments are different. Deci

27、mal Binary 3 0011 5 0101 3^5 0110 59. OR_expression::=S(XOR_expression, OR_operator), 60. OR_operator::="|", This operator takes each bit in the value of its arguments in turn to calculate the bit in the answer. The n'th bit is 1 if either n'th bits is 1. Decimal Binary 3 0

28、011 5 0101 3|5 0111 61. Logical Expressions 62. In C, logical false is reresented by any zero value and true by any nonzero value. Here is a list of operators 1. and::="&&". 2. or::="||", 3. not::="!", 63. logical_AND_expression::=S(OR_expression, logical_AND_operator), 64. lo

29、gical_AND_operator::=and, A&&B is true precisely when both A and B evaluate to be true. If A evaluates to false, B is not evaluated. 65. logical_OR_expression::=S(logical_AND_expression, logical_OR_operator), 66. logical_OR_operator::=or, A||B is true if A evaluates to be true, or when A is fals

30、e and B evaluates to be true. If both evaluate to false (zero) then A||B is false. Conditional Expressions 67. conditional_expression::=logical_OR_expression | logical_OR_expression "?" expression ":" conditional_expression, Assignment Statements 68. assignment_expression::=S(unary_expression,

31、 assignment_operator), 69. assignment_operator::="=" | "*=" | "/=" | "%=" | "+=" | "<<=" | ">>=" | "&=" | "^=" | "|=", 70. expression::=List(assignment_expression ), 71. constant_expression::=conditional_expression, . . . . . . . . . ( end of section Expressions) <> Declara

32、tions 72. declaration::=declaration_specifier | declarator_list, 73. declarator_list::=List(declarator_initialized), 74. declaration_specifier::=(storage_class | type_specifier | type_qualifier), 75. storage_class::="typedef" | "extern" | "static" | "auto" | "register", Types 76. type_spec

33、ifier::="void" | "char" | "short" | "int" | "long" | "float" | "double" | "signed" | "unsigned" | struct_union_specifier | enumeration_specifier | typedef_name, 77. type-qualifier::="const" | "volatile", 78. typedef_name::=identifier, Initialization 79. initializer::=assignment_expression | i

34、nitializer_list, 80. initializer_list::=List(initializer), 81. declarator_initialized::=declarator ("=" initializer), Structs and Unions 82. structure_declarator::=declarator | declarator ":" constant_expression, 83. structure_declarator_list::=List(structure_declarator), 84. structure_de

35、claration::=(type_specifier | type_qualifier) structure_declarator_list ";" , 85. struct_union_specifier::=struct_union identifier | struct_union identifier "{"structure_declarator_list "}", 86. struct_union::=( "struct" | "union" ), Enums 87. enumeration_value::=enumeration_constant ("=" con

36、stant_expression|) 88. enumeration_list::=List(enumeration_value ), 89. enumeration_specifier::=enumeration_identifier | "enum" identifier "{"enumeration_list"}", Functions 90. function_definition::=declaration_specifier declarator | declaration_list | compound_statement, 91. parameter_decl

37、aration::=#declaration_specifier declarator | abstract_declarator, 92. parameter_list::=List(parameter_declaration) (",..."|), Pointers 93. pointer::=#( "*" | #type_qualifier), 94. declarator::=pointer | direct_declarator, Functions and Arrays 95. post_declarator::="["constant_expression"]

38、" | "("parameter_list")" | "("identifier_list")" 96. direct_declarator::=identifier | "("declarator")" | direct_declarator post_declarator, 97. abstract_declarator::=pointer | pointer direct_abstract_declarator, 98. direct_abstract_declarator::= "(" abstract_declarator ")" | O( direct_abstract

39、declarator) O("[" O(constant_expression) "]" | "(" O(parameter_list) ")" ), . . . . . . . . . ( end of section Declarations) <> Statements 99. statement::=labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement

40、 Branch 100. jump_statement::="goto" identifier";" | "continue" ";" | "break;" | "return" expression ";", Structured 101. loop::=iteration_statement. 102. iteration_statement::="while" "("expression")" statement | "do" statement "while" "("expression")" ";" | for_statement. 103. for_stateme

41、nt::="for" "("expression ";" expression ";" expression")" statement, 104. selection_statement::=if_statement | "switch" "("expression")" statement, 105. if_statement::="if ("expression")" statement | "if" "("expression")" statement "else" statement. 106. expression_statement::= expression ";",

42、 107. labeled_statement::=identifier ":" statement | "case" constant_expression ":" statement | "default" ":" statement, Compound 108. compound_statement::=block | "{" #statement "}", 109. block::="{" declaration #declaration #statement "}", . . . . . . . . . ( end of section Statements) <<

43、Contents | End>> Pre-Processor Commands 110. preprocess_token::=identifier | constant | string_literal | operator | punctuator | each Non-white space not one of the previous, 111. header_char::=any character except new_line | and | >, 112. header_name::=#(header_char), 113. new_line::=new_l

44、ine character, 114. Left_paren::=left parenthesis with no white space before it, 115. control_line::="#include" (#(preprocess_token | header_name) new_line | "#define" identifier #(preprocess_token) new_line | "#define" identifier left_paren identifier_list #(preprocess_token) new_line, | "#unde

45、f" identifier new_line | "#line" preprocess_token new_line | "#error" preprocess_token new_line | "#pragma" preprocess_token new_line | "#"new_line, 116. endif_line::="#endif" new_line, 117. elif_group::="#elif" constant_expression new_line pp_group, 118. else_group::="#else" new_line pp_group

46、 119. if_group::=("#if" constant_expression | "#ifdef" identifier | "#ifndef" identifier) new_line pp_group, 120. if_part::=if_group #(elif_group) else_group endif_line, 121. pp_part::=#preprocess_token new_line | if_part | control_line, 122. pp_group::=#(pp_part), . . . . . . . . . ( end of section Pre-Processor Commands) <> . . . . . . . . . ( end of section Syntax of The C Programming Language) <> End

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服