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

Info iconThis preview shows pages 1–8. 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 DocumentRight 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 DocumentRight 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>::=
Background image of page 5

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

View Full DocumentRight 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 DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/08/2011 for the course CGS 3460 taught by Professor Staff during the Summer '08 term at University of Florida.

Page1 / 21

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

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online