zoukankan      html  css  js  c++  java
  • C语言简易文法

    <program> :

    external_declaration

    | program external_declaration

     

    <external_declaration> :      //外部声明

    function_definition

    | declaration

    <type_specifier> :    //类型

    Void

    |char

    |int

    |float

    |double

    <iteration_statement>:  //循环

    |while '(' expression ')' statement

    | for '(' expression_statement expression_statement ')' statement

    <identifier>  :    //标识符 头文件

    Include

    | define

    |stdio.h

    |math.h

    |stdlib.h

    |time.h

    |string.h

    |main ‘(‘ ‘)

    <statement>  :     //声明

    udge_statement

    |jump_statement

    |iteration_statement

    |selection_statement

    <Judge_statement>  :   //判断

    selection_statement

    : if '(' expression ')' statement

    |if'(' expression ')' statement ELSE statement

    | logical_or_expression '?' expression ':' conditional_expression

    constant_expression : //条件

     conditional_expression

  • 相关阅读:
    输出流对象
    1.2最简单的c++程序
    c++的初步认识
    理想程序员
    从字符数组中删除字符
    打印杨辉三角
    旋转数组
    找出1000以内的所有完数
    计算兔子的总数
    101-200有多少个素数?
  • 原文地址:https://www.cnblogs.com/q1736699804/p/6005784.html
Copyright © 2011-2022 走看看