java: style: prefer putting the square brackets on the type

* examples/java/calc/Calc.y, examples/java/simple/Calc.y,
* tests/calc.at, tests/local.at: here.
This commit is contained in:
Akim Demaille
2020-02-05 06:56:47 +01:00
parent d6f576102e
commit f705e9abdb
5 changed files with 5 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ m4_define([b4_null], [null])
m4_define([b4_typed_parser_table_define], m4_define([b4_typed_parser_table_define],
[m4_ifval([$4], [b4_comment([$4]) [m4_ifval([$4], [b4_comment([$4])
])dnl ])dnl
[private static final ]$1[ yy$2_[] = yy$2_init (); [private static final ]$1[[] yy$2_ = yy$2_init ();
private static final ]$1[[] yy$2_init () private static final ]$1[[] yy$2_init ()
{ {
return new ]$1[[] return new ]$1[[]

View File

@@ -19,7 +19,7 @@
} }
%code { %code {
public static void main (String args[]) throws IOException public static void main (String[] args) throws IOException
{ {
CalcLexer l = new CalcLexer (System.in); CalcLexer l = new CalcLexer (System.in);
Calc p = new Calc (l); Calc p = new Calc (l);

View File

@@ -14,7 +14,7 @@
} }
%code { %code {
public static void main (String args[]) throws IOException public static void main (String[] args) throws IOException
{ {
CalcLexer l = new CalcLexer (System.in); CalcLexer l = new CalcLexer (System.in);
Calc p = new Calc (l); Calc p = new Calc (l);

View File

@@ -113,7 +113,7 @@ m4_define([AT_CALC_MAIN(d)],
m4_define([AT_CALC_MAIN(java)], m4_define([AT_CALC_MAIN(java)],
[[public static void main (String args[]) throws IOException [[public static void main (String[] args) throws IOException
{]AT_LEXPARAM_IF([[ {]AT_LEXPARAM_IF([[
Calc p = new Calc (System.in);]], [[ Calc p = new Calc (System.in);]], [[
CalcLexer l = new CalcLexer (System.in); CalcLexer l = new CalcLexer (System.in);

View File

@@ -913,7 +913,7 @@ m4_define([AT_YYLEX_DEFINE(java)],
m4_define([AT_MAIN_DEFINE(java)], m4_define([AT_MAIN_DEFINE(java)],
[[class input [[class input
{ {
public static void main (String args[]) throws IOException public static void main (String[] args) throws IOException
{ {
]AT_API_prefix[Parser p = new ]AT_API_prefix[Parser (); ]AT_API_prefix[Parser p = new ]AT_API_prefix[Parser ();
System.exit (p.parse () ? 0 : 1); System.exit (p.parse () ? 0 : 1);