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

case-sensitive // that's what Java is

<source> <source> = source

! <int> = translatorcall

<translatorcall> = source

<classdecl> = source

class <identifier> = classhead
class <identifier> <typeparams> = classhead

static = modifier
public = modifier
abstract = modifier
protected = modifier
final = modifier
transient = modifier
volatile = modifier
synchronized = modifier

<modifier> = modifiers
<modifiers> <modifier> = modifiers

<modifiers> <classhead> = classhead

<classhead> { } = emptyclass

<emptyclass> = classdecl

<classhead> { <classbody> } = classdecl

<classbody> <classbody> = classbody

; = classbody

<vardecl> = classbody

<type> <identifier> ; = vardecl
<modifiers> <type> <identifier> ; = vardecl

<identifier> = type
<identifier> <typeparams> = type
<type> [] = type

<> = typeargs
< <typelist> > = typeargs

<> = typeparams
< <typeparam> > = typeparams

<typeparam>, <typeparam> = typeparam

<type> = typeparam
<type> extends <type> = typeparam
<type> implements <type> = typeparam

<type> = typelist
<typelist> , <type> = typelist

<block> = blockorsemicolon
; = blockorsemicolon

() = argsdecl2
(<argsdecl>) = argsdecl2

<type> <identifier> <argsdecl2> <blockorsemicolon> = method
<modifiers> <type> <identifier> <argsdecl2> <blockorsemicolon> = method

<identifier> <argsdecl2> <blockorsemicolon> = constructordecl
<modifiers> <identifier> <argsdecl2> <blockorsemicolon> = constructordecl

<constructordecl> = classbody
<method> = classbody

{ } = block
{ <code> } = block

; = code
return <exp> ; = code

<identifier> = exp
<quoted> = exp
<int> = exp
-<int> = exp

<identifier> ( <explist> ) = exp

new <identifier> = exp // JavaX!
new <identifier> ( <explist> ) = exp

<exp> + <exp> = exp // TODO: operator precedence

<type> <identifier> = argsdecl
<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: 693 / 162
Referenced in: [show references]