aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/test
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-08-28 08:07:51 +0200
committerHans Bolinder <[email protected]>2013-08-28 08:07:51 +0200
commitf597badb1e2336f921e8f1b1b8842f847f64fa94 (patch)
tree732135267384d4c9a5cf2b9f0abf68835d778f5a /lib/parsetools/test
parent91a4675a234ecc6c675e4670a35863882a2d50c8 (diff)
parent682e562a20c2ab650a3a5e0f885af19bce0d5a14 (diff)
downloadotp-f597badb1e2336f921e8f1b1b8842f847f64fa94.tar.gz
otp-f597badb1e2336f921e8f1b1b8842f847f64fa94.tar.bz2
otp-f597badb1e2336f921e8f1b1b8842f847f64fa94.zip
Merge branch 'maint'
* maint: Fix a Yecc bug
Diffstat (limited to 'lib/parsetools/test')
-rw-r--r--lib/parsetools/test/yecc_SUITE.erl37
1 files changed, 35 insertions, 2 deletions
diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl
index 6389d81739..38bcd52ffc 100644
--- a/lib/parsetools/test/yecc_SUITE.erl
+++ b/lib/parsetools/test/yecc_SUITE.erl
@@ -48,7 +48,7 @@
otp_5369/1, otp_6362/1, otp_7945/1, otp_8483/1, otp_8486/1,
- otp_7292/1, otp_7969/1, otp_8919/1, otp_10302/1]).
+ otp_7292/1, otp_7969/1, otp_8919/1, otp_10302/1, otp_11269/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
@@ -75,7 +75,8 @@ groups() ->
[empty, prec, yeccpre, lalr, old_yecc, other_examples]},
{bugs, [],
[otp_5369, otp_6362, otp_7945, otp_8483, otp_8486]},
- {improvements, [], [otp_7292, otp_7969, otp_8919, otp_10302]}].
+ {improvements, [], [otp_7292, otp_7969, otp_8919, otp_10302,
+ otp_11269]}].
init_per_suite(Config) ->
Config.
@@ -1962,6 +1963,38 @@ otp_10302(Config) when is_list(Config) ->
run(Config, Ts),
ok.
+otp_11269(doc) ->
+ "OTP-11269. A bug.";
+otp_11269(suite) -> [];
+otp_11269(Config) when is_list(Config) ->
+ Dir = ?privdir,
+ Filename = filename:join(Dir, "OTP-11269.yrl"),
+ Ret = [return, {report, false}],
+ Pai = <<"Nonterminals
+ list list0 list1 newline_list.
+
+ Terminals
+ '\n' semi.
+
+ Rootsymbol list.
+
+ Endsymbol '$end'.
+
+ list -> newline_list list0 : '$2'.
+
+ list0 -> list1 '\n' newline_list : '$1'.
+
+ list1 -> list1 semi newline_list list1 :
+ {command_connect, '$1', '$4', semi}.
+
+ newline_list -> newline_list '\n' : nil.">>,
+ ok = file:write_file(Filename, Pai),
+ {ok,ErlFile,[{_YrlFile,[{none,yecc,{conflicts,1,0}}]}]} =
+ yecc:file(Filename, Ret),
+ Opts = [return, warn_unused_vars,{outdir,Dir}],
+ {ok,'OTP-11269',_Warnings} = compile:file(ErlFile, Opts),
+ ok.
+
yeccpre_size() ->
yeccpre_size(default_yeccpre()).