Initial import
This commit is contained in:
parent
573f416c47
commit
98a0b29062
5
config.sh
Normal file
5
config.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
PACKAGE="c99"
|
||||
VERSION="0.0.0"
|
||||
|
||||
PREFIX="/usr/local"
|
||||
LIBDIR="${PREFIX}/lib"
|
58
doc/GRAMMAR
Normal file
58
doc/GRAMMAR
Normal file
|
@ -0,0 +1,58 @@
|
|||
token: keyword | identifier | constant | string-litteral | punctuator
|
||||
|
||||
keyword: "auto" | "break" | "case" | "char" | "const" | "continue"
|
||||
| "default" | "do" | "double" | "else" | "enum" | "extern"
|
||||
| "float" | "for" | "goto" | "if" | "inline" | "int" | "long"
|
||||
| "register" | "restrict" | "return" | "short" | "signed"
|
||||
| "sizeof" | "static" | "struct" | "switch" | "typedef"
|
||||
| "union" | "unsigned" | "void" | "volatile" | "while"
|
||||
| "_Bool" | "_Complex" | "_Imaginary"
|
||||
|
||||
punctuator: "[" | "]" | "(" | ")" | "{" | "}" | "." | "->" | "++" | "--"
|
||||
| "&" | "*" | "+" | "-" | "~" | "!" | "/" | "%" | "<<" | ">>"
|
||||
| "<" | ">" | "<=" | ">=" | "==" | "!=" | "^" | "|" | "&&"
|
||||
| "||" | "?" | ":" | ";" | "..." | "=" | "*=" | "/=" | "%="
|
||||
| "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" | "," | "#"
|
||||
| "##" | "<:" | ":>" | "<%" | "%>" | "%:" | "%:%:"
|
||||
|
||||
type-specifier: "void" | "char" | "short" | "int" | "long" | "float"
|
||||
| "double" | "signed" | "unsigned" | "_Bool"
|
||||
| "_Complex" | "_Imaginary" | struct-or-union-specifier
|
||||
| enum-specifier | typedef-name
|
||||
|
||||
function-specifier: "inline"
|
||||
|
||||
function-specifier: "inline"
|
||||
|
||||
type-qualifier: "const" | "restrict" | "volatile"
|
||||
|
||||
pointer: "*" type-qualifier-list-opt { "*" type-qualifier-list-opt }
|
||||
|
||||
parameter-list: parameter-declaration { "," parameter-declaration }
|
||||
|
||||
parameter-declaration: declaration-specifiers ( declarator
|
||||
| abstract-declarator-opt )
|
||||
|
||||
identifier-list: identifier { "," identifier }
|
||||
|
||||
compound-statement: { block-item-list-opt }
|
||||
|
||||
block-item-list: block-item { block-item }
|
||||
|
||||
block-item: declaration | statement
|
||||
|
||||
function-definition: declaration-specifiers declarator declaration-list-opt
|
||||
compound-statement
|
||||
|
||||
declaration-list: declaration { declaration }
|
||||
|
||||
digit: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
|
||||
|
||||
lparen: "("
|
||||
(rule 1)
|
||||
|
||||
new-line: "\n"
|
||||
|
||||
==
|
||||
|
||||
rule 1: - there must not be preceding white spaces
|
Loading…
Reference in New Issue
Block a user