-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathRoxygen.bnf
74 lines (56 loc) · 2 KB
/
Roxygen.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
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
/*
* Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
{
parserClass="org.jetbrains.r.roxygen.parsing.RoxygenParser"
implements="org.jetbrains.r.roxygen.psi.api.RoxygenPsiElement"
extends="org.jetbrains.r.roxygen.psi.RoxygenElementImpl"
elementTypeHolderClass="org.jetbrains.r.roxygen.parsing.RoxygenElementTypes"
elementTypePrefix="ROXYGEN_"
elementTypeClass="org.jetbrains.r.roxygen.psi.RoxygenElementType"
tokenTypeClass="org.jetbrains.r.roxygen.psi.RoxygenElementType"
psiImplUtilClass="org.jetbrains.r.roxygen.psi.impl.RoxygenPsiImplUtil"
psiClassPrefix="Roxygen"
psiImplClassSuffix="Impl"
psiPackage="org.jetbrains.r.roxygen.psi.api"
psiImplPackage="org.jetbrains.r.roxygen.psi.impl"
tokens=[
COMMA=","
DOUBLECOLON="::"
LPAR="("
RPAR=")"
RBRACKET="]"
LBRACKET="["
DOC_PREFIX="#'"
LANGLE="<"
RANGLE=">"
]
extends(".*expression|parameter")=expression
}
root ::= comment_line (nl comment_line)*
private comment_line ::= ws* "#'" (content)*
private content ::= param_tag | tag | help_page_link | link_destination | autolink | text
tag ::= TAG_NAME { methods = [ getName ] }
param_tag ::= TAG_NAME (ws+ parameter ("," parameter)*)?
{
methods = [ Parameters="parameter" ]
extends=tag
}
parameter ::= IDENTIFIER
{
implements="com.intellij.psi.PsiNamedElement"
methods=[ getName setName getReference ]
}
help_page_link ::="[" expression ("(" ")")? "]"
link_destination ::= "(" text* ")"
autolink ::= "<" AUTOLINK_URI ">"
expression ::= namespace_access_expression | identifier_expression { methods=[ getReference ] }
namespace_access_expression ::= IDENTIFIER "::" identifier_expression {
methods = [ Namespace="IDENTIFIER" Identifier="identifier_expression" getNamespaceName ]
}
identifier_expression ::= IDENTIFIER
{
implements="com.intellij.psi.PsiNamedElement"
methods = [ getName setName getReference ]
}
private text ::= TEXT | ws