home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
programming
/
h2i
/
syntax
< prev
next >
Wrap
Text File
|
1990-10-22
|
10KB
|
420 lines
file
+---------------+
| |
V |
-->+-> statement --+--->
statement
---+-> include_statement ->+--->
| A
| |
+-> define_statement -->+
| A
| |
+-> struct_statement ---+
include_statement
-----> "#include" --+-> '"' --> file_name --> '"' ->+--->
| A
| |
+-> '<' --> file_name --> '>' --+
file_name
+------------------+
| |
V |
-->+--+-> letter ->+--+----->
| A
| |
+-> digit -->+
| A
| |
+-> ':' ---->+
| A
| |
+-> '/' ---->+
| A
| |
+-> '.' -----+
define_statement
-----> "#define" --> identifier --> constant_expr_1---->
identifier
+------------------+
| |
V |
-->+--+-> letter ->+--+--->
| A
| |
+-> digit ---+
letter
---+-> 'A' ->+--->
| A
: : :
| |
+-> 'Z' ->+
| A
| |
+-> 'a' ->+
| A
: : :
| |
+-> 'z' ->+
| A
| |
+-> '_' --+
digit
---+-> '0' ->+--->
| A
: : :
| |
+-> '9' --+
constant_expr_1
---+-> constant ------------------------>+--->
| |
| |
+-> identifier ---------------------->+
| |
| |
+-> unary_op constant --------------->+
| |
| |
+-> unary_op identifier ------------->+
| |
| |
+-> '(' --> constant_expr_2 --> ')' --+
constant_expr_2
---+-> constant ----------------------------------------->+--->
| A
| |
+-> identifier --------------------------------------->+
| A
| |
+-> unary_op --> constant_expr_2 --------------------->+
| A
| |
+-> constant_expr_2 --> operator --> constant_expr_2 ->+
| A
| |
+-> '(' --> constant_expr_2 --> ')' -------------------+
constant
---+-> hexadecimal_constant ->+--->
| A
| |
+-> decimal_constant ----->+
| A
| |
+-> octal_constant --------+
hexadecimal_constant
-----> '0' --+-> 'x' ->+-->+-> hexadecimal_digit -+--->
| A A |
| | | |
+-> 'X' --+ +----------------------+
hexadecimal_digit
---+-> '0' ->+--->
| A
: : :
| |
+-> '9' ->+
| A
| |
+-> 'a' ->+
| A
: : :
| |
+-> 'f' ->+
| A
| |
+-> 'A' ->+
| A
: : :
| |
+-> 'F' --+
decimal_constant
-----> pos_digit ->+-> digit -+--->
A |
| |
+----------+
pos_digit
---+-> '1' ->+--->
| A
: : :
| |
+-> '9' --+
octal_constant
-----> '0' ->+-> octal_digit -+--->
A |
| |
+----------------+
octal_digit
---+-> '0' ->+--->
| A
: : :
| |
+-> '7' --+
unary_op
---+-> '-' ->+--->
| A
| |
+-> '~' --+
operator
---+-> '*' -->+--->
| A
| |
+-> '+' -->+
| A
| |
+-> '-' -->+
| A
| |
+-> '/' -->+
| A
| |
+-> '&' -->+
| A
| |
+-> '|' -->+
| A
| |
+-> '%' -->+
| A
| |
+-> '^' -->+
| A
| |
+-> "<<" ->+
| A
| |
+-> ">>" --+
struct_statement
-----> "struct" --> identifier --> prefix --+
|
|
+-------------------------+
|
|
+--> '{' -->+-> komponent --+--> '}' --> ';' ----->
A |
| |
+---------------+
prefix
-----> "/*/" --> identifier --> "*/" ----->
komponent
---+-> type ----------------------------->+--> declarator ----->
| A
| |
+-> struct --> identifier --> prefix --+
type
---+-> c_type ----->+--->
| A
| |
+-> amiga_type --+
c_type
---+-> "unsigned" --+--+-> "char" --->+---------->+--->
| A | A A
| | | | |
+----------------+ +-> "short" -->+-> "int" ->+
| | A A
| | | |
| +-> "long" ----+ |
| |
| |
+---------------------> "void" --------------->+
| A
| |
+---------------------> "float" -------------->+
| A
| |
+-> "long" --+--------> "double" --------------+
| A
| |
+------------+
amiga_type
---+-> "VOID" ----->+
| A
| |
+-> "BYTE" ----->+
| A
| |
+-> "UBYTE" ---->+
| A
| |
+-> "BYTEBITS" ->+
| A
| |
+-> "TEXT" ----->+
| A
| |
+-> "SHORT" ---->+
| A
| |
+-> "USHORT" --->+
| A
| |
+-> "WORD" ----->+
| A
| |
+-> "UWORD" ---->+
| A
| |
+-> "COUNT" ---->+
| A
| |
+-> "UCOUNT" --->+
| A
| |
+-> "BOOL" ----->+
| A
| |
+-> "WORDBITS" ->+
| A
| |
+-> "LONG" ----->+
| A
| |
+-> "ULONG" ---->+
| A
| |
+-> "LONGBITS" ->+
| A
| |
+-> "APTR" ----->+
| A
| |
+-> "BPTR" ----->+
| A
| |
+-> "CPTR" ----->+
| A
| |
+-> "BSTR" ----->+
| A
| |
+-> "STRPTR" --->+
| A
| |
+-> "FLOAT" ---->+
| A
| |
+-> "DOUBLE" ----+
declarator
---+------------>+-> idenifier -----------------+---------------->+--->
| A | A
| | V |
+-> pointer --+ +-> array ------->+
| A A
| | |
+-> '(' --> pointer --> identifier --> ')' --+-> '(' --> ')' --+
pointer
--->+-> '*' --+--->
A |
| |
+---------+
array
--->+-> '[' --> constant --> ']' --+--->
A |
| |
+------------------------------+