From 9ba1bb3d2007b37e3392208ef027f88d78e51c3e Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 13 Aug 2021 11:36:31 +0200 Subject: cc: some work on the scanner, expression parser --- old/c.ebnf | 229 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 old/c.ebnf (limited to 'old/c.ebnf') diff --git a/old/c.ebnf b/old/c.ebnf new file mode 100644 index 0000000..9a3c0ae --- /dev/null +++ b/old/c.ebnf @@ -0,0 +1,229 @@ + ::= {}* + + ::= + | + + ::= {}* {}* + + ::= + | + | + + ::= auto + | register + | static + | extern + | typedef + + ::= void + | char + | short + | int + | long + | float + | double + | signed + | unsigned + | + | + | + + ::= { {}+ } + | { {}+ } + | + + ::= struct + | union + + ::= {}* + + ::= + | + + ::= + | , + + ::= + | : + | : + + ::= {}? + + ::= * {}* {}? + + ::= const + | volatile + + ::= + | ( ) + | [ {}? ] + | ( ) + | ( {}* ) + + ::= + + ::= + | ? : + + ::= + | || + + ::= + | && + + ::= + | | + + ::= + | ^ + + ::= + | & + + ::= + | == + | != + + ::= + | < + | > + | <= + | >= + + ::= + | << + | >> + + ::= + | + + | - + + ::= + | * + | / + | % + + ::= + | ( ) + + ::= + | ++ + | -- + | + | sizeof + | sizeof + + ::= + | [ ] + | ( {}* ) + | . + | -> + | ++ + | -- + + ::= + | + | + | ( ) + + ::= + | + | + | + + ::= + | , + + ::= + | + + ::= = + | *= + | /= + | %= + | += + | -= + | <<= + | >>= + | &= + | ^= + | |= + + ::= & + | * + | + + | - + | ~ + | ! + + ::= {}+ {}? + + ::= + | , ... + + ::= + | , + + ::= {}+ + | {}+ + | {}+ + + ::= + | + | + + ::= ( ) + | {}? [ {}? ] + | {}? ( {}? ) + + ::= enum { } + | enum { } + | enum + + ::= + | , + + ::= + | = + + ::= + + ::= {}+ {}* ; + + ::= + | = + + ::= + | { } + | { , } + + ::= + | , + + ::= { {}* {}* } + + ::= + | + | + | + | + | + + ::= : + | case : + | default : + + ::= {}? ; + + ::= if ( ) + | if ( ) else + | switch ( ) + + ::= while ( ) + | do while ( ) ; + | for ( {}? ; {}? ; {}? ) + + ::= goto ; + | continue ; + | break ; + | return {}? ; -- cgit v1.2.3-54-g00ecf