Documentation
¶
Index ¶
- Constants
- Variables
- func JulyParse(Julylex JulyLexer) int
- func JulyStatname(s int) string
- func JulyTokname(c int) string
- func Julylex1(lex JulyLexer, lval *JulySymType) int
- func NewFileLexer(path string, debugLex bool) (y *myLexer)
- func NewLexer(src ByteReader, debugLex bool) (y *myLexer)
- func ReportCastError(expName string, obj interface{})
- func ReportError(msg string)
- type ByteReader
- type JAnnotation
- type JArrayAlloc
- type JArrayReference
- type JAssignmentExpr
- type JBinaryExpr
- type JBlock
- type JCastExpr
- type JCatch
- type JClassAllocationExpr
- type JClassBody
- type JClassDecl
- type JConditionalExpr
- type JConstantDecl
- type JElementValuePair
- type JEmpty
- type JEnumBody
- type JEnumConstant
- type JEnumDecl
- type JForColon
- type JForExpr
- type JForVar
- type JFormalParameter
- type JIfElseStmt
- type JImportStmt
- type JInstanceOf
- type JInterfaceDecl
- type JInterfaceMethodDecl
- type JJumpToLabel
- type JKeyword
- type JLabeledStatement
- type JLiteral
- type JLocalVariableDecl
- type JMethodAccess
- type JMethodDecl
- type JModifiers
- type JNameDotObject
- type JObject
- type JObjectDotName
- type JPackageStmt
- type JParens
- type JProgramFile
- type JReferenceType
- type JSimpleStatement
- type JSwitch
- type JSwitchGroup
- type JSwitchLabel
- type JSynchronized
- type JTry
- type JTypeArgument
- type JTypeName
- func (qn *JTypeName) Add(name string)
- func (qn *JTypeName) FirstType() string
- func (qn *JTypeName) IsDotted() bool
- func (qn *JTypeName) IsPrimitive() bool
- func (qn *JTypeName) LastType() string
- func (qn *JTypeName) NotFirst() *JTypeName
- func (qn *JTypeName) NotLast() *JTypeName
- func (qn *JTypeName) PackageString() string
- func (qn *JTypeName) String() string
- type JTypeParameter
- type JUnaryExpr
- type JUnimplemented
- type JVariableDecl
- type JVariableInit
- type JWhile
- type JulyLexer
- type JulySymType
- type StringReader
Constants ¶
View Source
const ( ModPublic = 0x1 ModPrivate = 0x4 ModFinal = 0x10 ModStatic = 0x20 )
View Source
const ( TS_NONE = iota TS_EXTENDS TS_SUPER TS_PLAIN )
View Source
const ABSTRACT = 57366
View Source
const ASSERT = 57367
View Source
const ASS_ADD = 57357
View Source
const ASS_AND = 57361
View Source
const ASS_DIV = 57360
View Source
const ASS_MOD = 57364
View Source
const ASS_MUL = 57359
View Source
const ASS_OR = 57362
View Source
const ASS_SUB = 57358
View Source
const ASS_XOR = 57363
View Source
const BOOLEAN = 57368
View Source
const BOOLLIT = 57348
View Source
const BREAK = 57369
View Source
const BYTE = 57370
View Source
const CASE = 57371
View Source
const CATCH = 57372
View Source
const CHAR = 57373
View Source
const CLASS = 57374
View Source
const CONTINUE = 57375
View Source
const DEFAULT = 57376
View Source
const DO = 57377
View Source
const DOUBLE = 57378
View Source
const ELSE = 57379
View Source
const ENUM = 57380
View Source
const EXTENDS = 57381
View Source
const FINAL = 57382
View Source
const FINALLY = 57383
View Source
const FLOAT = 57384
View Source
const FOR = 57385
View Source
const IDENTIFIER = 57346
View Source
const IF = 57386
View Source
const IMPLEMENTS = 57387
View Source
const IMPORT = 57388
View Source
const INSTANCEOF = 57389
View Source
const INT = 57390
View Source
const INTERFACE = 57391
View Source
const JNULL = 57395
View Source
const JulyEofCode = 1
View Source
const JulyErrCode = 2
View Source
const JulyFlag = -1000
View Source
const JulyLast = 2631
View Source
const JulyMaxDepth = 200
View Source
const JulyNprod = 444
View Source
const JulyPrivate = 57344
View Source
const LITERAL = 57347
View Source
const LONG = 57392
View Source
const NATIVE = 57393
View Source
const NEW = 57394
View Source
const OP_DEC = 57354
View Source
const OP_DIM = 57365
View Source
const OP_EQ = 57349
View Source
const OP_INC = 57353
View Source
const OP_LAND = 57352
View Source
const OP_LOR = 57351
View Source
const OP_NE = 57350
View Source
const OP_SHL = 57355
View Source
const OP_SHRR = 57356
View Source
const PACKAGE = 57396
View Source
const PRIVATE = 57397
View Source
const PROTECTED = 57398
View Source
const PUBLIC = 57399
View Source
const RETURN = 57400
View Source
const SHORT = 57401
View Source
const STATIC = 57402
View Source
const SUPER = 57403
View Source
const SWITCH = 57404
View Source
const SYNCHRONIZED = 57405
View Source
const THIS = 57406
View Source
const THROW = 57407
View Source
const THROWS = 57408
View Source
const TRANSIENT = 57409
View Source
const TRY = 57410
View Source
const VOID = 57411
View Source
const VOLATILE = 57412
View Source
const WHILE = 57413
Variables ¶
View Source
var JulyAct = []int{}/* 2631 elements not displayed */
View Source
var JulyChk = []int{}/* 748 elements not displayed */
View Source
var JulyDebug = 0
View Source
var JulyDef = []int{}/* 748 elements not displayed */
View Source
var JulyExca = []int{}/* 132 elements not displayed */
View Source
var JulyPact = []int{}/* 748 elements not displayed */
View Source
var JulyPgo = []int{}/* 149 elements not displayed */
View Source
var JulyR1 = []int{}/* 444 elements not displayed */
View Source
var JulyR2 = []int{}/* 444 elements not displayed */
View Source
var JulyStatenames = []string{}
View Source
var JulyStates []string
View Source
var JulyTok1 = []int{}/* 127 elements not displayed */
View Source
var JulyTok2 = []int{
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,
}
View Source
var JulyTok3 = []int{
0,
}
View Source
var JulyTokenNames []string
View Source
var JulyToknames = []string{
"IDENTIFIER",
"LITERAL",
"BOOLLIT",
"OP_EQ",
"OP_NE",
"OP_LOR",
"OP_LAND",
"OP_INC",
"OP_DEC",
"OP_SHL",
"OP_SHRR",
"ASS_ADD",
"ASS_SUB",
"ASS_MUL",
"ASS_DIV",
"ASS_AND",
"ASS_OR",
"ASS_XOR",
"ASS_MOD",
"OP_DIM",
"ABSTRACT",
"ASSERT",
"BOOLEAN",
"BREAK",
"BYTE",
"CASE",
"CATCH",
"CHAR",
"CLASS",
"CONTINUE",
"DEFAULT",
"DO",
"DOUBLE",
"ELSE",
"ENUM",
"EXTENDS",
"FINAL",
"FINALLY",
"FLOAT",
"FOR",
"IF",
"IMPLEMENTS",
"IMPORT",
"INSTANCEOF",
"INT",
"INTERFACE",
"LONG",
"NATIVE",
"NEW",
"JNULL",
"PACKAGE",
"PRIVATE",
"PROTECTED",
"PUBLIC",
"RETURN",
"SHORT",
"STATIC",
"SUPER",
"SWITCH",
"SYNCHRONIZED",
"THIS",
"THROW",
"THROWS",
"TRANSIENT",
"TRY",
"VOID",
"VOLATILE",
"WHILE",
}
Functions ¶
func JulyStatname ¶
func JulyTokname ¶
func Julylex1 ¶
func Julylex1(lex JulyLexer, lval *JulySymType) int
func NewFileLexer ¶
func NewLexer ¶
func NewLexer(src ByteReader, debugLex bool) (y *myLexer)
func ReportCastError ¶
func ReportCastError(expName string, obj interface{})
func ReportError ¶
func ReportError(msg string)
Types ¶
type ByteReader ¶
type JAnnotation ¶
type JAnnotation struct {
// contains filtered or unexported fields
}
func NewJAnnotation ¶
func NewJAnnotation(name *JTypeName, elem []JObject, has_parens bool) *JAnnotation
type JArrayAlloc ¶
type JArrayAlloc struct { Typename *JTypeName Dimexprs []JObject Dims int Init []*JVariableInit }
func NewJArrayAlloc ¶
func NewJArrayAlloc(typename *JTypeName, dimexprs []JObject, dims int) *JArrayAlloc
func (*JArrayAlloc) SetInitializers ¶
func (j *JArrayAlloc) SetInitializers(init []*JVariableInit)
type JArrayReference ¶
func NewJArrayReference ¶
func NewJArrayReference(name *JTypeName, obj JObject, expr JObject) *JArrayReference
type JAssignmentExpr ¶
func NewJAssignmentExpr ¶
func NewJAssignmentExpr(left JObject, op string, right JObject) *JAssignmentExpr
type JBinaryExpr ¶
func NewJBinaryExpr ¶
func NewJBinaryExpr(obj1 JObject, op string, obj2 JObject) *JBinaryExpr
type JCastExpr ¶
type JCastExpr struct { Reftype *JReferenceType Target JObject }
func NewJCastExpr ¶
func NewJCastExpr(reftype *JReferenceType, target JObject) *JCastExpr
type JCatch ¶
type JCatch struct { Modifiers *JModifiers TypeList []*JTypeName Name string Block *JBlock }
type JClassAllocationExpr ¶
type JClassAllocationExpr struct { Name *JTypeName TypeArgs []*JTypeArgument Arglist []JObject Body []JObject }
func NewJClassAllocationExpr ¶
func NewJClassAllocationExpr(name *JTypeName, obj_args []JObject, arglist []JObject) *JClassAllocationExpr
func (*JClassAllocationExpr) SetBody ¶
func (j *JClassAllocationExpr) SetBody(body []JObject)
type JClassBody ¶
type JClassBody struct {
List []JObject
}
func NewJClassBody ¶
func NewJClassBody(list []JObject) *JClassBody
type JClassDecl ¶
type JClassDecl struct { Name string Extends *JReferenceType Interfaces []*JTypeName Body []JObject // contains filtered or unexported fields }
func NewJClassDecl ¶
func NewJClassDecl(modifiers *JModifiers, name string, type_params []JObject, extends *JReferenceType, interfaces []*JTypeName, body []JObject) *JClassDecl
type JConditionalExpr ¶
func NewJConditionalExpr ¶
func NewJConditionalExpr(condexpr JObject, ifexpr JObject, elseexpr JObject) *JConditionalExpr
type JConstantDecl ¶
type JConstantDecl struct { TypeSpec *JReferenceType Name string Dims int Init *JVariableInit // contains filtered or unexported fields }
func NewJConstantDecl ¶
func NewJConstantDecl(name string, dims int, init *JVariableInit) *JConstantDecl
func (*JConstantDecl) HasName ¶
func (j *JConstantDecl) HasName() bool
func (*JConstantDecl) SetModifiers ¶
func (j *JConstantDecl) SetModifiers(modifiers *JModifiers)
func (*JConstantDecl) SetName ¶
func (j *JConstantDecl) SetName(name string)
func (*JConstantDecl) SetType ¶
func (j *JConstantDecl) SetType(typespec *JReferenceType)
type JElementValuePair ¶
type JElementValuePair struct {
// contains filtered or unexported fields
}
func NewJElementValuePair ¶
func NewJElementValuePair(name string, value JObject) *JElementValuePair
type JEnumBody ¶
type JEnumBody struct {
// contains filtered or unexported fields
}
func NewJEnumBody ¶
type JEnumConstant ¶
type JEnumConstant struct { Annotations []*JAnnotation Name string ArgList []JObject Body []JObject }
func NewJEnumConstant ¶
func NewJEnumConstant(alist []JObject, name string, arglist []JObject, body []JObject) *JEnumConstant
type JEnumDecl ¶
type JEnumDecl struct { Name string Interfaces []*JTypeName Constants []*JEnumConstant BodyDecl []JObject // contains filtered or unexported fields }
func NewJEnumDecl ¶
func NewJEnumDecl(modifiers *JModifiers, name string, interfaces []*JTypeName, body *JEnumBody) *JEnumDecl
type JForColon ¶
type JForColon struct { VarDecl *JVariableDecl Expr JObject Body JObject }
func NewJForColon ¶
func NewJForColon(modifiers *JModifiers, typespec *JReferenceType, name string, dims int, expr JObject) *JForColon
type JForVar ¶
type JForVar struct { VarDecl *JVariableDecl Decl JObject Expr JObject Incr []JObject Body JObject }
func NewJForVar ¶
func NewJForVar(modifiers *JModifiers, typespec *JReferenceType, name string, dims int) *JForVar
func (*JForVar) SetInit ¶
func (j *JForVar) SetInit(init *JVariableInit)
type JFormalParameter ¶
type JFormalParameter struct { Modifiers *JModifiers TypeSpec *JReferenceType DotDotDot bool Name string Dims int }
func NewJFormalParameter ¶
func NewJFormalParameter(typespec *JReferenceType, dotdotdot bool, name string, dims int) *JFormalParameter
func (*JFormalParameter) SetModifiers ¶
func (j *JFormalParameter) SetModifiers(modifiers *JModifiers)
type JIfElseStmt ¶
func NewJIfElseStmt ¶
func NewJIfElseStmt(cond JObject, ifblock JObject, elseblock JObject) *JIfElseStmt
type JImportStmt ¶
type JImportStmt struct { Name *JTypeName // contains filtered or unexported fields }
func NewJImportStmt ¶
func NewJImportStmt(name *JTypeName, is_wild bool, is_static bool) *JImportStmt
type JInstanceOf ¶
type JInstanceOf struct { Obj JObject TypeSpec *JReferenceType }
func NewJInstanceOf ¶
func NewJInstanceOf(obj JObject, typespec *JReferenceType) *JInstanceOf
type JInterfaceDecl ¶
type JInterfaceDecl struct { Name *JTypeName Body []JObject // contains filtered or unexported fields }
func NewJInterfaceDecl ¶
func NewJInterfaceDecl(modifiers *JModifiers, name *JTypeName, type_params []JObject, extends []*JTypeName, body []JObject) *JInterfaceDecl
type JInterfaceMethodDecl ¶
type JInterfaceMethodDecl struct { TypeSpec *JReferenceType Name string FormalParams []*JFormalParameter // contains filtered or unexported fields }
func NewJInterfaceMethodDecl ¶
func NewJInterfaceMethodDecl(formal_params []*JFormalParameter, dims int, throws []*JTypeName) *JInterfaceMethodDecl
func (*JInterfaceMethodDecl) SetModifiers ¶
func (j *JInterfaceMethodDecl) SetModifiers(modifiers *JModifiers)
func (*JInterfaceMethodDecl) SetName ¶
func (j *JInterfaceMethodDecl) SetName(name string)
func (*JInterfaceMethodDecl) SetType ¶
func (j *JInterfaceMethodDecl) SetType(typespec *JReferenceType)
func (*JInterfaceMethodDecl) SetTypeParameters ¶
func (j *JInterfaceMethodDecl) SetTypeParameters(type_params []JObject)
type JJumpToLabel ¶
func NewJJumpToLabel ¶
func NewJJumpToLabel(token int, label string) *JJumpToLabel
type JKeyword ¶
func NewJKeyword ¶
type JLabeledStatement ¶
func NewJLabeledStatement ¶
func NewJLabeledStatement(label string, stmt JObject) *JLabeledStatement
type JLocalVariableDecl ¶
type JLocalVariableDecl struct { Modifiers *JModifiers TypeSpec *JReferenceType Vars []*JVariableDecl }
func NewJLocalVariableDecl ¶
func NewJLocalVariableDecl(modifiers *JModifiers, typespec *JReferenceType, vars []*JVariableDecl) *JLocalVariableDecl
type JMethodAccess ¶
type JMethodAccess struct { NameObj JObject NameKey *JKeyword NameType *JTypeName Method string ArgList []JObject }
func NewJMethodAccessComplex ¶
func NewJMethodAccessComplex(obj JObject, name string, arglist []JObject) *JMethodAccess
func NewJMethodAccessKeyword ¶
func NewJMethodAccessKeyword(token int, name string, arglist []JObject) *JMethodAccess
func NewJMethodAccessName ¶
func NewJMethodAccessName(nametyp *JTypeName, arglist []JObject) *JMethodAccess
type JMethodDecl ¶
type JMethodDecl struct { Modifiers *JModifiers TypeSpec *JReferenceType Name string FormalParams []*JFormalParameter Block *JBlock // contains filtered or unexported fields }
func NewJMethodDecl ¶
func NewJMethodDecl(formal_params []*JFormalParameter, dims int, throws []*JTypeName, block *JBlock) *JMethodDecl
func (*JMethodDecl) SetModifiers ¶
func (j *JMethodDecl) SetModifiers(modifiers *JModifiers)
func (*JMethodDecl) SetName ¶
func (j *JMethodDecl) SetName(name string)
func (*JMethodDecl) SetType ¶
func (j *JMethodDecl) SetType(typespec *JReferenceType)
func (*JMethodDecl) SetTypeParameters ¶
func (j *JMethodDecl) SetTypeParameters(type_params []JObject)
type JModifiers ¶
type JModifiers struct {
// contains filtered or unexported fields
}
func NewJModifiers ¶
func NewJModifiers(name string, annotation *JAnnotation) *JModifiers
func (*JModifiers) AddAnnotation ¶
func (j *JModifiers) AddAnnotation(annotation *JAnnotation) *JModifiers
func (*JModifiers) AddModifier ¶
func (j *JModifiers) AddModifier(name string) *JModifiers
func (*JModifiers) HasAnnotation ¶
func (j *JModifiers) HasAnnotation(name string) bool
func (*JModifiers) IsSet ¶
func (j *JModifiers) IsSet(modbit int) bool
func (*JModifiers) String ¶
func (j *JModifiers) String() string
type JNameDotObject ¶
func NewJNameDotObject ¶
func NewJNameDotObject(name *JTypeName, obj JObject) *JNameDotObject
type JObjectDotName ¶
func NewJObjectDotName ¶
func NewJObjectDotName(obj JObject, name *JTypeName) *JObjectDotName
type JPackageStmt ¶
type JPackageStmt struct {
Name *JTypeName
}
func NewJPackageStmt ¶
func NewJPackageStmt(name *JTypeName) *JPackageStmt
type JProgramFile ¶
type JProgramFile struct { Pkg *JPackageStmt Imports []JObject TypeDecls []JObject }
func NewJProgramFile ¶
func NewJProgramFile(pobj JObject, imports []JObject, type_decls []JObject) *JProgramFile
type JReferenceType ¶
type JReferenceType struct { Name *JTypeName TypeArgs []*JTypeArgument Dims int }
func NewJReferenceType ¶
func NewJReferenceType(name *JTypeName, obj_args []JObject, dims int) *JReferenceType
type JSimpleStatement ¶
func NewJSimpleStatement ¶
func NewJSimpleStatement(keyword *JKeyword, object JObject) *JSimpleStatement
type JSwitchGroup ¶
type JSwitchGroup struct { Labels []*JSwitchLabel Stmts []JObject }
func NewJSwitchGroup ¶
func NewJSwitchGroup(labellist []JObject, stmtlist []JObject) *JSwitchGroup
type JSwitchLabel ¶
func NewJSwitchLabel ¶
func NewJSwitchLabel(name string, expr JObject, is_default bool) *JSwitchLabel
type JSynchronized ¶
func NewJSynchronized ¶
func NewJSynchronized(expr JObject, block *JBlock) *JSynchronized
type JTypeArgument ¶
type JTypeArgument struct { TypeSpec *JReferenceType Ts_type int }
func NewJTypeArgument ¶
func NewJTypeArgument(typespec *JReferenceType, ts_type int) *JTypeArgument
type JTypeName ¶
type JTypeName struct {
// contains filtered or unexported fields
}
func NewJTypeName ¶
func (*JTypeName) IsPrimitive ¶
func (*JTypeName) PackageString ¶
type JTypeParameter ¶
type JTypeParameter struct {
// contains filtered or unexported fields
}
func NewJTypeParameter ¶
func NewJTypeParameter(name string, bounds []JObject) *JTypeParameter
type JUnaryExpr ¶
func NewJUnaryExpr ¶
func NewJUnaryExpr(op string, obj JObject, is_prefix bool) *JUnaryExpr
type JUnimplemented ¶
type JUnimplemented struct {
TypeStr string
}
func NewJUnimplemented ¶
func NewJUnimplemented(typestr string) *JUnimplemented
type JVariableDecl ¶
type JVariableDecl struct { Modifiers *JModifiers TypeSpec *JReferenceType Name string Dims int Init *JVariableInit }
func NewJVariableDecl ¶
func NewJVariableDecl(name string, dims int, init *JVariableInit) *JVariableDecl
func (*JVariableDecl) SetInit ¶
func (j *JVariableDecl) SetInit(init *JVariableInit)
func (*JVariableDecl) SetModifiers ¶
func (j *JVariableDecl) SetModifiers(modifiers *JModifiers)
func (*JVariableDecl) SetType ¶
func (j *JVariableDecl) SetType(typespec *JReferenceType)
type JVariableInit ¶
type JVariableInit struct { Expr JObject ArrayList []*JVariableInit }
func NewJVariableInit ¶
func NewJVariableInit(expr JObject, arraylist []*JVariableInit) *JVariableInit
type JulyLexer ¶
type JulyLexer interface { Lex(lval *JulySymType) int Error(s string) }
type JulySymType ¶
type JulySymType struct {
// contains filtered or unexported fields
}
type StringReader ¶
type StringReader struct {
// contains filtered or unexported fields
}
func NewStringReader ¶
func NewStringReader(str string) *StringReader
func (*StringReader) ReadByte ¶
func (rdr *StringReader) ReadByte() (byte, error)
Click to show internal directories.
Click to hide internal directories.