[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/13] java: style: prefer putting the square brackets on the typ
From: |
Akim Demaille |
Subject: |
[PATCH 07/13] java: style: prefer putting the square brackets on the type |
Date: |
Wed, 5 Feb 2020 18:04:59 +0100 |
* examples/java/calc/Calc.y, examples/java/simple/Calc.y,
* tests/calc.at, tests/local.at: here.
---
data/skeletons/java.m4 | 2 +-
examples/java/calc/Calc.y | 2 +-
examples/java/simple/Calc.y | 2 +-
tests/calc.at | 2 +-
tests/local.at | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/data/skeletons/java.m4 b/data/skeletons/java.m4
index c9d249f5..bcf9a993 100644
--- a/data/skeletons/java.m4
+++ b/data/skeletons/java.m4
@@ -109,7 +109,7 @@ m4_define([b4_null], [null])
m4_define([b4_typed_parser_table_define],
[m4_ifval([$4], [b4_comment([$4])
])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 ()
{
return new ]$1[[]
diff --git a/examples/java/calc/Calc.y b/examples/java/calc/Calc.y
index a8d09244..9e8270c9 100644
--- a/examples/java/calc/Calc.y
+++ b/examples/java/calc/Calc.y
@@ -19,7 +19,7 @@
}
%code {
- public static void main (String args[]) throws IOException
+ public static void main (String[] args) throws IOException
{
CalcLexer l = new CalcLexer (System.in);
Calc p = new Calc (l);
diff --git a/examples/java/simple/Calc.y b/examples/java/simple/Calc.y
index e6c39df9..7ed7024c 100644
--- a/examples/java/simple/Calc.y
+++ b/examples/java/simple/Calc.y
@@ -14,7 +14,7 @@
}
%code {
- public static void main (String args[]) throws IOException
+ public static void main (String[] args) throws IOException
{
CalcLexer l = new CalcLexer (System.in);
Calc p = new Calc (l);
diff --git a/tests/calc.at b/tests/calc.at
index 78a701e2..3f800430 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -113,7 +113,7 @@ m4_define([AT_CALC_MAIN(d)],
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([[
Calc p = new Calc (System.in);]], [[
CalcLexer l = new CalcLexer (System.in);
diff --git a/tests/local.at b/tests/local.at
index 307e341f..ee499a08 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -913,7 +913,7 @@ m4_define([AT_YYLEX_DEFINE(java)],
m4_define([AT_MAIN_DEFINE(java)],
[[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 ();
System.exit (p.parse () ? 0 : 1);
--
2.25.0
- [PATCH 00/13] Clean up the Java skeleton and tests, Akim Demaille, 2020/02/05
- [PATCH 03/13] traces: don't print the stack before the gotos, Akim Demaille, 2020/02/05
- [PATCH 01/13] traces: write the "Reading a token" alone on its line, Akim Demaille, 2020/02/05
- [PATCH 02/13] traces: show the stack after reading a token, Akim Demaille, 2020/02/05
- [PATCH 05/13] java: examples: prefer switch to chains of else-if, Akim Demaille, 2020/02/05
- [PATCH 04/13] java: examples: split in two, Akim Demaille, 2020/02/05
- [PATCH 06/13] java: examples: fix the tracking of locations, Akim Demaille, 2020/02/05
- [PATCH 07/13] java: style: prefer putting the square brackets on the type,
Akim Demaille <=
- [PATCH 08/13] java: style: avoid useless initializers, Akim Demaille, 2020/02/05
- [PATCH 09/13] java: tests: prepare the replacement of calculator tests, Akim Demaille, 2020/02/05
- [PATCH 10/13] java: tests: check location tracking in the calculator, Akim Demaille, 2020/02/05
- [PATCH 12/13] java: tests: check push parsers, Akim Demaille, 2020/02/05
- [PATCH 11/13] java: tests: remove now redundant tests, Akim Demaille, 2020/02/05
- [PATCH 13/13] java: tests: remove now redundant tests, Akim Demaille, 2020/02/05