|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavafe.parser.ParseUtil
javafe.parser.ParseType
javafe.parser.ParseExpr
javafe.parser.ParseStmt
javafe.parser.Parse
escjava.parser.EscPragmaParser
Grammar:
Pragma ::= LexicalPragma | ModifierPragma | TypeDeclElemPragma | StmtPragma
LexicalPragma ::= "nowarn" [ Idn [',' Idn]* ] [';']
StmtPragma ::= SimpleStmtPragma [';']
| ExprStmtPragma SpecExpr [';']
| 'set' PrimaryExpr '=' SpecExpr [';']
SimpleStmtPragma ::= 'unreachable'
ExprStmtPragma ::= 'assume' | 'assume_redundantly'
| 'assert' | 'assert_redundantly'
| 'loop_inv' | 'loop_invariant' | 'loop_invariant_redundantly'
| 'decreases' | 'decreases_redundantly'
| 'loop_predicate'
| 'maintaining' | 'maintaining_redundantly'
| 'decreasing' | 'decreasing_redundantly'
TypeDeclElemPragma ::=
ExprDeclPragma SpecExpr [';']
| 'ghost' Modifiers Type VariableDeclarator [';']
| 'still_deferred' Idn [',' Idn]* [';']
ExprDeclPragma ::= 'axiom' | 'invariant' | 'invariant_redundantly'
ModifierPragma ::=
[PrivacyPragma] [BehaviorPragma] SimpleModifierPragma
[PrivacyPragma] [BehaviorPragma] NonSimpleModifierPragma
NonSimpleModifierPragma ::=
| ['also'] ExprModifierPragma SpecExpr [';']
| ['also'] VarExprModifierPragma '(' Type Idn ')' SpecExpr [';']
| ['also'] 'monitored_by' SpecExpr [',' SpecExpr]* [';']
| ['also'] ModifierPragma SpecDesignator [',' SpecDesignator]* [';']
PrivacyPragma ::= 'public' | 'private' | 'protected'
BehaviorPragma ::= 'behavior' | 'normal_behavior' | 'exceptional_behavior'
SimpleModifierPragma ::= 'uninitialized' | 'monitored'
| 'non_null_by_default' | 'nullable_by_default'
| 'non_null' | 'nullable'
| 'instance'
| 'pure' | 'obs_pure'
| 'spec_public' | 'writable_deferred' | 'helper'
| 'public' | 'private' | 'protected'
| 'spec_protected' | 'model' | 'transient' | '\peer' | '\readonly' | '\rep'
| 'code_java_math' | 'code_safe_math' | 'code_bigint_math'
| 'spec_java_math' | 'spec_safe_math' | 'spec_bigint_math'
ExprModifierPragma ::= 'readable_if' | 'writable_if'
| 'requires' | 'requires_redundantly' | 'also_requires' (if Main.allowAlsoRequires)
| 'ensures' | 'ensures_redundantly' | 'also_ensures'
| 'pre' | 'pre_redundantly' | 'post' | 'post_redundantly'
VarExprModifierPragma ::= 'exsures' | 'exsures_redundantly' | 'also_exsures"
| 'signals' | 'signals_redundantly'
ModifierPragma ::= 'modifies' | 'modifies_redundantly' | 'also_modifies'
| 'modifiable' | 'modifiable_redundantly'
| 'assignable' | 'assignable_redundantly'
DurationClause ::= DurationKeyword '\not_specified' ';'
| DurationKeyword DurSpecExpr [ 'if' predicate ] ';'
DurSpecExpr ::= SpecExpr (of type long) OpWithLongResult DurSpecExpr
| '\duration' '(' MethodInvOrConstructor ')' LongOp DurSpecExpr;
MethodInvOrConstructorOrNotSpecified ::= MethodInvOrConstructor | '\not_specified';
InvariantForExpr ::= '\invariant_for' '(' SpecExpr ')' ';'
SpaceExpr ::= '\space' '(' SpecExpr ')'
IsInitializedExpr ::= '\is_initialized' '(' Idn ')' ';'
InvariantFor ::= '\invariant_for' '(' SpecExpr ')' ';'
WorkingSpaceClause ::= WorkingSpaceKeyword '\not_specified' ';'
| WorkingSpaceKeyword WorkingSpaceSpecExpr [ 'if' predicate ] ';'
WorkingSpaceSpecExpr ::= SpecExpr (of type int) OpWithIntResult WorkingSpaceSpecExpr
| '\working_space' '(' MethodInvOrConstructor ')' IntOp WorkingSpaceSpecExpr
MethodInvOrConstructor ::= MethodInvocation | ConstructorInvocation
OpWithIntResult ::= STAR | '/' | '%' | PLUS | '-' | '&' | BITOR | '^'
WorkingSpaceKeyword ::= 'working_space' | 'working_space_redundantly'
DurationKeyword ::= 'duration' | 'duration_redundantly'
PrivateDataKeyword ::= '\private_data'
NotModifiedExpr ::= '\not_modified' '(' SpecDesignator [',' SpecDesignator]* ')' ';'
ReachExpr ::= '\reach' '(' SpecExpr [ ',' Idn [ ',' StoreRefExpr ] ] ')' ';'
FieldsOfExpr ::= '\fields_of' '(' SpecExpr [ ',' Idn [ ',' StoreRefExpr ] ] ')' ';'
OtherExpr ::= '\other' [ StoreRefNameSuffix ] ';'
ReachExpr ::= '\reach' '(' SpecExpr [ ',' Idn [ ',' StoreRefExpr ] ] ')' ';'
StoreRefList ::= StoreRef [ ',' StoreRef ] ...
StoreRef ::= StoreRefExpr
| FieldsOfExpr
| InformalDescription
| StoreRefKeyword
StoreRefExpr ::= StoreRefName [ StoreRefNameSuffix ] ...
StoreRefName ::= Idn | 'super' | 'this'
StoreRefNameSuffix ::= '.' Idn | '.' 'this' | '[' SpecArrayRefExpr ']'
SpecArrayRefExpr ::= SpecExpr | SpecExpr '..' SpecExpr | '*'
StoreRefKeyword ::= '\nothing' | '\everything' | '\not_specified' | '\private_data'
ConditionalStoreRefList ::= ConditionalStoreRef [ ',' ConditionalStoreRef ] ...
ConditionalStoreRef ::= StoreRef [ 'if' Predicate ]
InformalDescription ::= '(*' NonStarClose [ NonStarClose ] ... '*)'
NonStarClose ::= NonStar | StarsNonClose
StarsNonClose ::= '*' [ '*' ] ... NonClose
NonClose ::= any character except ')'
The grammar of SpecExpr is:
SpecExpr:
Name
| \result
| \lockset
| this
| Literal
| SpecExpr '.' Idn
| SpecExpr '[' SpecExpr ']'
| UnOp SpecExpr
| '(' Type ')' SpecExpr
| SpecExpr BinOp SpecExpr
| SpecExpr 'instanceof' Type
| Function '(' [ SpecExpr [ ',' SpecExpr ]* ] ')'
| '\type' '(' Type ')'
| SpecExpr '?' SpecExpr ':' SpecExpr
| '(' {'\forall'|'\exists'} Type Idn [',' Idn]* ';' [[SpecExpr] ';'] SpecExpr ')'
| '(' {'\lblpos'|'\lblneg'} Idn SpecExpr ')'
| '(' SpecExpr ')'
| Name '.' this [1.1]
| Name ([])* '.' class [1.1]
| JmlSpecExpr
JmlSpecExpr ::= '\nothing' | '\everything' | '\not_specified'
Function ::= '\fresh' | '\nonnullelements' | '\elemtype' | '\max' | '\old'
| '\typeof' | '\not_modified' | '\nowarn' | '\nowarn_op' | '\warn' | '\warn_op'
| '\java_math' | '\safe_math' | \bigint_math
UnOp ::= '+' | '-' | '!' | '~'
BinOp ::= '+' | '-' | '*' | '/' | '%' | '<<' | '>>' | '>>>'
| '<' | '<=' | '==' | '!=' | '>=' | '>'
| '&' | '|' | '^' | '&&' | '||'
Also, the grammar for Type is extended (recursively) with the new base type 'TYPE'.
Expressions in redundant specifications (e.g.,
requires_redundantly ...) are only parsed if
Main.checkRedundantSpecs is true.
Options.checkRedundantSpecs| Nested Class Summary | |
protected class |
EscPragmaParser.SavedPragma
|
| Field Summary | |
private boolean |
argListInAnnotation
|
private static boolean |
DEBUG
|
private java.lang.String |
endTag
|
static ASTDecoration |
informalPredicateDecoration
The informal-predicate decoration is associated with a true-valued boolean literal expression, if the concrete syntax of this expression was an informal comment. |
(package private) boolean |
inModelRoutine
|
(package private) boolean |
inModelType
|
private int |
inProcessLoc
|
private int |
inProcessTag
The value NOTHING_ELSE_TO_PROCESS means there is nothing else to process. |
(package private) static int |
maxAnnotationNestingLevel
Maximum # of levels of nesting of annotation comments allowed. 0 == no nesting of annotation comments allowed. |
protected int |
modifiers
|
int |
NEXT_TOKEN_STARTS_NEW_PRAGMA
|
int |
NOTHING_ELSE_TO_PROCESS
|
private CorrelatedReader |
pendingJavadocComment
|
private java.util.LinkedList |
pragmaQueue
|
(package private) ModifierPragma |
savedGhostModelPragma
|
private EscPragmaLex |
scanner
The lexer associated with this pragma parser from which we will read tokens. |
| Fields inherited from class javafe.parser.Parse |
seqFormalParaDecl, seqImportDecl, seqTypeDecl, seqTypeName |
| Fields inherited from class javafe.parser.ParseStmt |
seqCatchClause, seqStmt |
| Fields inherited from class javafe.parser.ParseExpr |
seqExpr, seqTypeDeclElem, seqVarInit |
| Fields inherited from class javafe.parser.ParseType |
seqIdentifier |
| Fields inherited from class javafe.parser.ParseUtil |
modifierKeywords, modifierPragmas, seqModifierPragma, universeArray, universeLevel, useUniverses |
| Constructor Summary | |
EscPragmaParser()
Constructs a new pragma parser with zero nesting level. |
|
EscPragmaParser(int level)
Constructs a new prama parser at the indicated nesting level. |
|
| Method Summary | |
protected void |
addStmt(Lex l)
Internal method for parsing a Stmt.
|
private void |
checkNoModifiers(int tag,
int loc)
Issues an error if any Java modifiers have accumulated, and resets the accumulated modifiers to NONE. |
boolean |
checkTag(int tag)
Decide whether a comment contains pragmas. |
void |
close()
Closes this pragma parser including its scanner and pending Javadoc comment. |
private void |
continuePragma(Token dst)
|
private void |
eatAts(CorrelatedReader in)
Eats any extra @ symbols. |
private void |
eatSemiColon(Identifier kw)
Eat the next token if it is a semi-colon and, if the next token is a pragma (not EOF, thus not the end of the pragma) then issue an error message indicating that the specified identifier must be semi-colon terminated if it is followed by more pragmas. |
private void |
eatThroughSemiColon()
Eat tokens up through and including terminating semi-colon. |
private void |
eatUpToCommaOrSemiColon()
|
private void |
eatWizardComment(CorrelatedReader in)
Eat any wizard inserted comment at the start of an escjava annotation. |
boolean |
getNextPragma(Token dst)
Parse the next pragma, putting information about it in the provided token dst, and return a flag indicating if there are further pragmas to
be parsed.
|
boolean |
getNextPragmaHelper(Token dst)
|
boolean |
getPragma(Token dst)
|
FieldDecl |
isPragmaDecl(Token l)
|
boolean |
isPrimitiveKeywordTag(int tag)
Is a tag a PrimitiveType keyword? |
boolean |
isStartOfUnaryExpressionNotPlusMinus(int tag)
Determines whether the tag is the first token of a UnaryExpressionNotPlusMinus. |
private void |
noteUnsupportedCheckableJmlPragma(int loc,
int tag)
Emit a caution to the user if verbosity is enabled that the supplied tag at the specified location is unsupported by the current version of ESC/Java but is statically checkable. |
boolean |
parseConstructorDeclTail(Token dst,
int loc,
Type type,
int locType,
ModifierPragmaVec modifierPragmas)
|
boolean |
parseDeclaration(Token dst,
int loc,
int kwtag)
Parses a declaration that appears in a ghost or model annotation - can be a ghost or model field or a model method or constructor. |
FormalParaDecl |
parseExsuresFormalParaDecl(EscPragmaLex l)
Parse the formal parameter declaration (the type and name of the associated exception) of an exsures or
signals pragma. |
PrimitiveType |
parseExsuresPrimitiveType(EscPragmaLex l)
Parse the primitive type used in an exsures or
signals pragma. |
Type |
parseExsuresPrimitiveTypeOrTypeName(EscPragmaLex l)
Parse the type associated with an exsures or
signals pragma parameter. |
Type |
parseExsuresType(EscPragmaLex l)
Parse the type of the of an exsures or
signals pragma parameter. |
TypeName |
parseExsuresTypeName(EscPragmaLex l)
Parse the type name used in an exsures or
signals pragma. |
boolean |
parseFieldDeclTail(Token dst,
int loc,
int locId,
Type type,
Identifier id,
ModifierPragmaVec modifierPragmas)
|
FormalParaDeclVec |
parseFormalParameterList(Lex l)
Parse a FormalParameterList, which includes enclosing parens. |
java.util.LinkedList |
parseGroupList()
|
private boolean |
parseInPragmas(int tag,
int loc,
Token dst,
boolean first)
|
void |
parseJavaModifiers()
|
Expr |
parseMapsMemberFieldRef(Lex scanner)
|
boolean |
parseMethodDeclTail(Token dst,
int loc,
Type type,
int locType,
Identifier id,
int locId,
ModifierPragmaVec modifierPragmas)
|
protected Expr |
parsePrimaryExpression(Lex l)
Parse a "primary expression" from l. |
protected Expr |
parsePrimarySuffix(Lex l,
Expr primary)
Parse the suffix of a "primary expression" from l,
given the prefix primary expression primary. |
PrimitiveType |
parsePrimitiveType(Lex l)
Parses a PrimitiveType. |
private GCExpr |
parseQuantifierRemainder(Lex l,
int tag,
Type type,
int loc)
Parse the balance (everything after the quantifier to the end of the current quantified scope) of a quantifier expression from l. |
Expr |
parseStoreRef(EscPragmaLex l)
Parse a StoreRef |
Expr |
parseStoreRefExpr(EscPragmaLex l)
Parse a StoreRefExpr |
protected TypeDeclElem |
parseTypeDeclElemIntoSeqTDE(Lex l,
int keyword,
Identifier containerId,
boolean specOnly)
Parse a TypeDeclElem, which is either a field, method, or constructor declaration, a static block, or a TypeDecl [1.1]. |
protected TypeDecl |
parseTypeDeclTail(Lex l,
boolean specOnly,
int loc,
int modifiers,
ModifierPragmaVec modifierPragmas)
Parse a TypeDeclTail (ie a class or interface declaration starting at the keyword 'class' or 'interface'). |
boolean |
parseTypeDeclTail(Token dst,
int loc)
|
private boolean |
processJavadocComment()
Parse embedded <esc&gr; ... |
void |
restart(CorrelatedReader in,
boolean eolComment)
Restart a pragma parser on a new input stream. |
void |
savePragma(int l,
int t,
java.lang.Object o)
|
void |
savePragma(Token d)
|
private int |
scanFor(CorrelatedReader in,
java.lang.String match)
Scans input stream for a string matching the parameter match. |
private int |
scanForOpeningTag(CorrelatedReader in)
Scans for one of <esc> <jml> <ESC> <JML>. |
| Methods inherited from class javafe.parser.Parse |
parseCompilationUnit, parseImportDeclaration, parseStream, parseTypeDeclaration, parseTypeDeclaration, parseTypeNames |
| Methods inherited from class javafe.parser.ParseStmt |
isStatementExpression, parseBlock, parseConstructorBody, parseFormalParaDecl, parseStatement |
| Methods inherited from class javafe.parser.ParseExpr |
addOperator, parseArgumentList, parseArrayInitializer, parseCastExpression, parseClassLiteralSuffix, parseExpression, parseExpressionList, parseNewExpression, parseNewExpressionTail, parseSuper, parseUnaryExpression, parseVariableInitializer |
| Methods inherited from class javafe.parser.ParseType |
parseBracketPairs, parseIdentifier, parseName, parsePrimitiveTypeOrTypeName, parseType, parseTypeModifierPragmas, parseTypeName |
| Methods inherited from class javafe.parser.ParseUtil |
arrayToString, error, expect, fail, getElementUniverse, getJavaModifier, getUniverse, isJavaModifier, parseModifierPragmas, parseModifiers, parseMoreModifierPragmas, parseUniverses, setElementUniverse, setUniverse, setUniverse, setUniverse |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final boolean DEBUG
public static final ASTDecoration informalPredicateDecoration
private EscPragmaLex scanner
public int NOTHING_ELSE_TO_PROCESS
public int NEXT_TOKEN_STARTS_NEW_PRAGMA
private int inProcessTag
private int inProcessLoc
private CorrelatedReader pendingJavadocComment
static final int maxAnnotationNestingLevel
If you change this, change the error message in EscPragmaParser(int) below as well.
private java.lang.String endTag
private java.util.LinkedList pragmaQueue
ModifierPragma savedGhostModelPragma
protected int modifiers
private boolean argListInAnnotation
boolean inModelType
boolean inModelRoutine
| Constructor Detail |
public EscPragmaParser()
EscPragmaParser(int)public EscPragmaParser(int level)
level - the nesting level of this instance.| Method Detail |
public boolean checkTag(int tag)
PragmaParserLex object passes the first character of
the comment to the checkTag method of its
PragmaParser. If this call returns false, the
comment is assumed to contain no pragmas and thus is discarded.
If this call returns true, the comment may contain pragmas, so it
is converted into a CorrelatedReader and passed to
restart. (The tag argument is either a
char or -1; -1 indicates
the empty comment.)
checkTag in interface PragmaParsertag - the comment tag character to check.
public void restart(CorrelatedReader in,
boolean eolComment)
this is
already opened on another CorrelatedReader, close the old reader.
restart in interface PragmaParserin - the reader from which to read.eolComment - a flag that indicates we are parsing an EOL
comment (a comment that starts with "//").
private boolean processJavadocComment()
throws java.io.IOException
java.io.IOException - if something goes wrong during reading.
private void eatAts(CorrelatedReader in)
throws java.io.IOException
java.io.IOException
private void eatWizardComment(CorrelatedReader in)
throws java.io.IOException
May side-effect the mark of in.
Eats "([^)]*)", if present, from in.
in - the stream from which to read.
java.io.IOException
private int scanFor(CorrelatedReader in,
java.lang.String match)
throws java.io.IOException
match. Only works if the first character is not repeated in the
string.
If present, the location of the match is returned. If not present,
Location.NULL is returned.
Requires that in is not closed.
in - the stream from which to read.match - the string to match against the input stream.
Location.NULL if there is no match.
java.io.IOException
private int scanForOpeningTag(CorrelatedReader in)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface PragmaParser
public void savePragma(int l,
int t,
java.lang.Object o)
public void savePragma(Token d)
public boolean getPragma(Token dst)
public boolean getNextPragma(Token dst)
dst, and return a flag indicating if there are further pragmas to
be parsed.
Note: All worrying about 'also' is now done during the desugaring of specs.
JML style of using also is preferred.
getNextPragma in interface PragmaParserdst - the token in which to store information about the current pragma.
Lexpublic boolean getNextPragmaHelper(Token dst)
private void checkNoModifiers(int tag,
int loc)
private void noteUnsupportedCheckableJmlPragma(int loc,
int tag)
private void eatThroughSemiColon()
private void eatUpToCommaOrSemiColon()
private void eatSemiColon(Identifier kw)
private void continuePragma(Token dst)
throws java.io.IOException
java.io.IOExceptionprotected Expr parsePrimaryExpression(Lex l)
l. A primary
expression is an expression of the form:
\result
\lockset
(*...*)
Function '('
'\type' '('
'(' {'\forall'|'\exists'} Type
'(' {'\lblpos'|'\lblneg'} Idn
or is a "normal" primary expression parsed with
ParseExpr.parsePrimaryExpression().
parsePrimaryExpression in class ParseExprl - the lexer from which to read and parse.
ParseExpr.parsePrimaryExpression(javafe.parser.Lex)
protected Expr parsePrimarySuffix(Lex l,
Expr primary)
l,
given the prefix primary expression primary.
parsePrimarySuffix in class ParseExprl - the lexer from which to read and parse.primary - the primary expression previously parsed.
private GCExpr parseQuantifierRemainder(Lex l,
int tag,
Type type,
int loc)
l.
l - the lexer from which to read and parse.tag - identifies which kind of quantifier we are parsing.type - the type of the quantified variable.loc - the starting location of the quantified expression.
public boolean isPrimitiveKeywordTag(int tag)
tag a PrimitiveType keyword? Overriden to
add type TYPE.
isPrimitiveKeywordTag in class ParseTypetag - the tag to check.
public PrimitiveType parsePrimitiveType(Lex l)
null on failure.
PrimitiveType is one of: boolean byte short int long char float double void TYPE.
parsePrimitiveType in class ParseTypel - the lexer from which to read and parse.
public boolean isStartOfUnaryExpressionNotPlusMinus(int tag)
ParseExpr
isStartOfUnaryExpressionNotPlusMinus in class ParseExprtag - the tag to check.
tag is the start of
an unary expression other than unary '+' or '-'. Overridded
to handle new identifier-like keywords "\result" and "\lockset".public FormalParaDecl parseExsuresFormalParaDecl(EscPragmaLex l)
exsures or
signals pragma. This is a bit complicated because
these expressions have an optional identifier name associated
with the specified Throwable type.
l - the lexer from which to read and parse.
public Type parseExsuresType(EscPragmaLex l)
exsures or
signals pragma parameter.
l - the lexer from which to read and parse.
public Type parseExsuresPrimitiveTypeOrTypeName(EscPragmaLex l)
exsures or
signals pragma parameter.
l - the lexer from which to read and parse.
public PrimitiveType parseExsuresPrimitiveType(EscPragmaLex l)
exsures or
signals pragma.
l - the lexer from which to read and parse.
public TypeName parseExsuresTypeName(EscPragmaLex l)
exsures or
signals pragma.
l - the lexer from which to read and parse.
public Expr parseStoreRef(EscPragmaLex l)
public Expr parseStoreRefExpr(EscPragmaLex l)
public void parseJavaModifiers()
public FormalParaDeclVec parseFormalParameterList(Lex l)
Parse
FormalParameterList:
LPAREN FormalParameter (, FormalParameter)* RPAREN
FormalParameter:
[Modifiers] Type Identifier BracketPair* ModifierPragma* [1.1]
parseFormalParameterList in class Parse
public boolean parseDeclaration(Token dst,
int loc,
int kwtag)
public boolean parseTypeDeclTail(Token dst,
int loc)
protected void addStmt(Lex l)
ParseStmtStmt.
Effects: Parses a single Stmt according to the
grammar at the top of this file. If no syntax errors are
encountered, it adds one or more Stmt to
seqStmt, leaving l at the token just
after the trailing } of the statement. More than
one statement is added only in the case of variable
declarations that declare more than one variable.
addStmt in class ParseStmt
protected TypeDeclElem parseTypeDeclElemIntoSeqTDE(Lex l,
int keyword,
Identifier containerId,
boolean specOnly)
ParseA field declaration may define many fields. Since returning multiple declared entities is cumbersome, this method simply adds all the declared entities onto the StackVector seqTypeDeclElem. The keyword argument is either CLASS or INTERFACE. The argument containerId is the name of the enclosing class, which is necessary for checking constructor declarations.
TypeDeclElem:
FieldDeclaration
MethodDeclaration
ConstructorDeclaration
InitBlock
TypeDeclElemPragma
TypeDeclaration [1.1]
;
FieldDeclaration:
Modifiers Type VariableDeclarator (, VariableDeclarator)* ;
MethodDeclaration:
Modifiers Type Identifier FormalParameterList BracketPair*
[throws TypeNameList]
( ; | Block )
ConstructorDeclaration:
Modifiers Identifier FormalParameterList Block
InitBlock:
Modifiers Block
VariableDeclarator:
Identifier BRACKET_PAIR* [ = VariableInitializer ]
parseTypeDeclElemIntoSeqTDE in class ParseTagConstants
protected TypeDecl parseTypeDeclTail(Lex l,
boolean specOnly,
int loc,
int modifiers,
ModifierPragmaVec modifierPragmas)
Parse
TypeDeclTail:
class Identifier [TypeModifierPragma]* [extends TypeName] [implements TypeNameList]
{ TypeDeclElem* }
interface Identifier [TypeModifierPragma]* [extends TypeNameList] { TypeDeclElem* }
parseTypeDeclTail in class Parse
public boolean parseFieldDeclTail(Token dst,
int loc,
int locId,
Type type,
Identifier id,
ModifierPragmaVec modifierPragmas)
public boolean parseConstructorDeclTail(Token dst,
int loc,
Type type,
int locType,
ModifierPragmaVec modifierPragmas)
public boolean parseMethodDeclTail(Token dst,
int loc,
Type type,
int locType,
Identifier id,
int locId,
ModifierPragmaVec modifierPragmas)
public FieldDecl isPragmaDecl(Token l)
isPragmaDecl in interface PragmaParserpublic Expr parseMapsMemberFieldRef(Lex scanner)
private boolean parseInPragmas(int tag,
int loc,
Token dst,
boolean first)
public java.util.LinkedList parseGroupList()
|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||