Compilation principle Experiment 2----simplified version of C language grammar

Source: Internet
Author: User

< source programs >->< external declarations > |< Program external declarations >

< external declarations >-> < function definitions >|< definitions >

< external declarations >->< header files >|< macro definitions >

< header file >-> < #include stdio.h>|< #include stdilb.h>|< #include <string>>|< #include Manth.h>

< macro definition >-> < data type >< variables >

< variables >-> < letters >|< Arrays >|< fixed Values >

< function definition >-> < function type >< functions name >< Declaration part (argument) >

< function type >-> < no type (void) >|< int (int) >|< character (char) >|< float (float) >

< function declaration section >-> < Direct declaration >|< Pointer Direct declaration >

< function pointer Direct declaration >-> <*>|< data type * pointer >

< function Direct declaration >-> < data type parameter name (row parameter) >|< no parameter >

< function content >->< Variable description >|< assignment statement >|< operations >|< Statement processing >

< variable description >-> < data type >< variable name >

< Assignment statements >->< variable names >=< letters >|< variable names >=< numbers >|< variable names >=< op-Expressions >

< operations >-> < arithmetic expressions >

< OP expression >-> < variable name >< operator >< variable name >|< number >< operator >< number >|< variable name >< operator >< Digital >

< operators >-><+>|<->|<*>|<\>|<%>

< statement processing >-> < judgment statement >|< Loop statement >|< conditional statement >|< sort expression >

Compilation principle Experiment 2----simplified version of C language grammar

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.