-
Notifications
You must be signed in to change notification settings - Fork 6
/
Buck.bnf
42 lines (33 loc) · 1.07 KB
/
Buck.bnf
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
{
parserClass="com.intellij.plugin.buck.lang.BuckParser"
extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
psiClassPrefix="Buck"
psiImplClassSuffix="Impl"
psiPackage="com.intellij.plugin.buck.lang.psi"
psiImplPackage="com.intellij.plugin.buck.lang.psi.impl"
elementTypeHolderClass="com.intellij.plugin.buck.lang.psi.BuckTypes"
elementTypeClass="com.intellij.plugin.buck.lang.psi.BuckElementType"
tokenTypeClass="com.intellij.plugin.buck.lang.psi.BuckTokenType"
}
buckFile ::= item_*
private item_ ::= (rule_block | property | COMMENT | CRLF)
property ::= ((IDENTIFIER | KEYWORDS) '=' value) | value
value ::= VALUE_STRING | VALUE_BOOLEAN | IDENTIFIER | value_array | rule_block
value_array ::= '[' (CRLF | WHITE_SPACE)* array_elements ']'
array_elements ::= (
value |
"," |
CRLF |
WHITE_SPACE
)*
rule_block ::= (RULE_NAMES | GENERIC_RULE_NAMES | IDENTIFIER) '(' (CRLF | WHITE_SPACE)* rule_body ')'
rule_body ::= (
property |
"," |
CRLF |
WHITE_SPACE
)*
braces ::= '(' | ')' | '{' | '}' | '[' | ']'
comma ::= ','
semicolon ::= ';'
equal ::= '='