{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C syntax - C syntax(simplified BNF Program...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
C syntax (simplified) BNF
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Program <C_program>::= [<preprocessor_directives>] <function_definitions>
Background image of page 2
Directives <preprocessor_directives>::= <preprocessor_directive>[<preprocessor_directives>] <preprocessor_directive>::= <include_directive> |<macro_definition> |… <include_directive>::= #include < <header_file> > <macro_definition>::= #define <identifier> <expression>
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Functions <function_definitions>::= <function_definition>[<function_definitions>] <function_definition>::= <function_header><function_body> <function_header>::= <return_type> <function_name> <formal_parameter_list> <function_body>::=<compound_statement>
Background image of page 4
Functions <return_type>::=<data_type> <function_name>::=<identifier> <formal_parameter_list>::= ( [<formal_parameters>] ) <formal_parameters>::= <formal_parameter>[ , <formal_parameters >] <formal_parameter>::= <data_type><variable>
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Statements <statements>::=<statement>[<statements>] <statement>::= <simple_statement> ; |<compound_statement> |<decision_statement> |<loop_statement> <simple_statement>::= <expression> | return <expression> | break | continue | goto <identifier>
Background image of page 6
Statements <compound_statement>::= { [declarations][<statements>] }
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Declarations
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}