-
Notifications
You must be signed in to change notification settings - Fork 3
/
grammar.txt
83 lines (63 loc) · 1.12 KB
/
grammar.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Function
-> Specifiers FunctionDeclaration ';'
FunctionArg
-> FunctionDeclaration
-> FunctionType '(' '*' Name ')' ArgsList
FunctionDeclaration
-> FunctionType Name ArgsList
Specifiers
-> e
-> Specifier Specifiers
Specifier
-> 'static'
-> 'inline'
ArgsList
-> '(' Args ')'
Args
-> e
-> 'void'
-> NotEmptyArgs
FunctionType
-> 'void'
-> Type
NotEmptyArgs
-> Arg RestArgs
RestArgs
-> e
-> , NotEmptyArgs
Arg
-> Type Name
-> FunctionArg
Name
-> FirstSymbol OtherSymbols
FirstSymbol
-> a-z A-Z _
OtherSymbols
-> e
-> a-z A-Z _ 0-9
Type
-> TypeNameModifiers
-> 'const' TypeNameModifiers
TypeNameModifiers
-> TypeName Modifiers
Modifiers
-> e
-> '*' Modifiers
-> 'const' Modifiers
TypeName
-> SystemTypes
-> 'struct' Name
SystemTypes
-> 'void'
-> NumericSpecifiers 'char'
-> NumericSpecifiers 'int'
-> NumericSpecifiers 'short' Int
-> NumericSpecifiers 'long' Int
-> NumericSpecifiers 'long' 'long' Int
Int
-> e
-> 'int'
NumericSpecifiers
-> e
-> 'unsigned'
-> 'signed'