Docsity

Schema EBNF + Uso comandi Assembly R4000, Schemi e mappe concettuali di Fondamenti di informatica

Toggle sidebar
bg1
<type> ::= void | char | [unsigned][short][long]int | float | double |
struct <identifier>
<decl> ::= <identifier> | *<decl> | <decl>[<const>]
<declaration> ::= <type> <decl>; | <type><decl>(<formal_parameter_list>);
<formal_parameter_list> ::= void | <type><decl>{,<type><decl>}0N
<var> ::= <identifier> | (<var>) | *<expr> | <expr>[<expr>] |
<expr> -> <identifier> | <var>.<identifier>
<const> ::= esempio un numero (13) o un carattere (‘a’)
<expr> ::= <const> | <var> | <var>++ | <var>-- | ++<var> | --<var> |
<var>=<expr> | <var><op2>=<expr> | <expr><op2><expr> | <op1><expr> |
<expr>,<expr> | <expr>?<expr>:<expr> | (<cast_type>)<expr> | &<var> |
<expr>(<actual_parameter_list>);
<actual_parameter_list> ::= [<expr>{,<expr>}0N]
<op2> ::= + | - | * | / | %
> | >= | == | != | < | <=
&& | ||
& | | | ^ | >> | <<
<op1> ::= ! | ~
<cast_type> ::= <type> | <cast_type>*
<statement> ::= <expr>; | <statement><statement> | {<statement>} |
if (<expr>) <statement> | if (<expr>) <statement> else <statement> |
for(<expr>;<expr>;<expr>) <statement> | while(<expr>) <statement> |
do <statement> while (<expr>); | goto <label>; | break; | continue; |
return [<expr>]; | switch(<expr>) {{case <const>: <statement>}1N
[default: <statement>]}
pf3

Anteprima parziale del testo

Scarica Schema EBNF + Uso comandi Assembly R4000 e più Schemi e mappe concettuali in PDF di Fondamenti di informatica solo su Docsity!

::= void | char | [unsigned][short][long]int | float | double | struct ::= | * | [] ::= ; | (<formal_parameter_list>); <formal_parameter_list> ::= void | {,} 0 N ::= | () | * | [] | - > | . ::= esempio un numero (13) o un carattere (‘a’) ::= | | ++ | -- | ++ | -- | = | = | | | , | ?: | (<cast_type>) | & | (<actual_parameter_list>); <actual_parameter_list> ::= [{,} 0 N] ::= + | - | * | / | %

| >= | == | != | < | <= && | || & | | | ^ | >> | << ::=! | ~ <cast_type> ::= | <cast_type>* ::= ; | | {} | if () | if () else | for(;;) | while() | do while (); | goto

< function_definition > ::= (<formal_parameter_list>) {{} 0 N^ []} < struct_definition > ::= struct {{} 1 N}; ::= [] [typedef ;] [<struct_definition>] [] [<function_definition>] < directive > ::= #include <filename.h> | #define <text_string>