#8 Field suffix

open
None
5
2005-06-15
2005-06-15
No

According to Daniel Schreiber,
he found a bug in the grammar file for
the parser. Although the documentation says so, and
the classes provide methods, the grammar does not
allow custom keywords after a field declaration.

He changed src\openjava\tools\parser\Parser.jj at line
1279 from

p8=VariableDeclarator( base_env )
{
FieldDeclaration fld1 = new FieldDeclaration( p1, p2,
p8 );

to

p8=VariableDeclarator( base_env )
sf=OpenJavaDeclSuffixListOpt( env )
{
FieldDeclaration fld1 = new FieldDeclaration( p1, p2,
p8 );
fld1.setSuffixes( sf );

Thanks, Daniel!

Discussion


Log in to post a comment.