Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

96
LINES

< > BotCompany Repo | #1002324 // Java Parsing Rules (without empty classes, outdated)

Document

1  
case-sensitive // that's what Java is
2  
3  
<source> <source> = source
4  
5  
! <int> = translatorcall
6  
7  
<translatorcall> = source
8  
9  
<classdecl> = source
10  
11  
class <identifier> = classhead
12  
class <identifier> <typeparams> = classhead
13  
14  
static = modifier
15  
public = modifier
16  
abstract = modifier
17  
protected = modifier
18  
final = modifier
19  
transient = modifier
20  
volatile = modifier
21  
synchronized = modifier
22  
23  
<modifier> = modifiers
24  
<modifiers> <modifier> = modifiers
25  
26  
<modifiers> <classhead> = classhead
27  
28  
<classhead> { } = emptyclass
29  
30  
<emptyclass> = classdecl
31  
32  
<classhead> { <classbody> } = classdecl
33  
34  
<classbody> <classbody> = classbody
35  
36  
; = classbody
37  
38  
<vardecl> = classbody
39  
40  
<type> <identifier> ; = vardecl
41  
<modifiers> <type> <identifier> ; = vardecl
42  
43  
<identifier> = type
44  
<identifier> <typeparams> = type
45  
<type> [] = type
46  
47  
<> = typeargs
48  
< <typelist> > = typeargs
49  
50  
<> = typeparams
51  
< <typeparam> > = typeparams
52  
53  
<typeparam>, <typeparam> = typeparam
54  
55  
<type> = typeparam
56  
<type> extends <type> = typeparam
57  
<type> implements <type> = typeparam
58  
59  
<type> = typelist
60  
<typelist> , <type> = typelist
61  
62  
<block> = blockorsemicolon
63  
; = blockorsemicolon
64  
65  
() = argsdecl2
66  
(<argsdecl>) = argsdecl2
67  
68  
<type> <identifier> <argsdecl2> <blockorsemicolon> = method
69  
<modifiers> <type> <identifier> <argsdecl2> <blockorsemicolon> = method
70  
71  
<identifier> <argsdecl2> <blockorsemicolon> = constructordecl
72  
<modifiers> <identifier> <argsdecl2> <blockorsemicolon> = constructordecl
73  
74  
<constructordecl> = classbody
75  
<method> = classbody
76  
77  
{ } = block
78  
{ <code> } = block
79  
80  
; = code
81  
return <exp> ; = code
82  
83  
<identifier> = exp
84  
<quoted> = exp
85  
<int> = exp
86  
-<int> = exp
87  
88  
<identifier> ( <explist> ) = exp
89  
90  
new <identifier> = exp // JavaX!
91  
new <identifier> ( <explist> ) = exp
92  
93  
<exp> + <exp> = exp // TODO: operator precedence
94  
95  
<type> <identifier> = argsdecl
96  
<argsdecl>, <argsdecl> = argsdecl

download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002324
Snippet name: Java Parsing Rules (without empty classes, outdated)
Eternal ID of this version: #1002324/1
Text MD5: cdc0ff8ca99e40d62ce61bf166433103
Author: stefan
Category: javax
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-15 21:01:16
Source code size: 1910 bytes / 96 lines
Pitched / IR pitched: No / No
Views / Downloads: 597 / 122
Referenced in: [show references]