Language grammar (go on)

Source: Internet
Author: User

<translation-unit>:: = {<external-declaration>}*

< programs >→< external declarations >|< program external declarations >

< external declarations >→< function definitions >|< definitions >

< function definition >→< type compound statement >

< type >→< No character >|< character >|< shaping >|< floating-point >

< declarator >→< Pointer direct declarator >|< Direct declaration >

< pointer >→< ' * ' >|< ' * ' pointer >

< direct declarator >→< identifier >|< direct declarator ' [' '] ' >|< direct declarator ' [' ordinary expression '] ' >|< identifier ' (' parameter table ') ' >|< identifier ' (') ' >| < direct declarator ', ' identifier >

< identifier list >:< identifier >|< identifier list ', ' identifier >

< general expressions >→< conditional Expressions >

< parameter table >→< parameter declaration >|< parameter table ', ' parameter declaration >

< parameter declarations >→< declaration descriptor Identifiers >

< compound statement >→< ' {'} ' >|< ' {' statement list '} ' >|< ' {' Declaration list statement list '} ' >

< declaration list >→< declaration >|< ' {' Declaration list declaration '} ' >

< declaration >→< initialization declarator >|< initialize declarator list ', ' Initialize declarator ' >

< initialization declarator >→< declarator >|< declarator ' = ' Initialize ' >

< initialize >→< Assign expression >|< ' {' Initialize list '} ' >|< ' {' Initialization list ', '} ' >

< Initialize list >→< initialize >|< initialize list ', ' Initialize >

< declaration list >→< declaration >|< claim List declaration >

< declarations >→< Composite declarations >|< Statement of Declarations >|< selection statements >|< Circular declarations >|< Jump declarations >

< Statement of expression >→< '; ' >|< expression '; ' >

< select declaration >→<:if ' (' expression ') ' Declaration >|<:if ' (' expression ') ' declaration of Else declaration >

< circular declaration >→<while ' (' expression ') ' Declaration >|<for ' (' expression declaration statement ') ' Declaration of >|<for ' (' Expression Declaration expression declaration ') ' declaration >

< jump declaration >→<continue ', ' >|<break ', ' >|<return ', ' >|<return expression ', ' >

< expression >→<: Distribution expression >|< expression ', ' distribution of expression >

< Assignment expression >→< conditional expression >|< unary expression assignment operator assignment expression >

< conditional expression >→< logical OR expression >|< logical or expression '? ' >

Language grammar (go on)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.