aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/include/yeccpre.hrl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-02 11:35:46 +0100
committerBjörn Gustavsson <[email protected]>2011-11-29 16:36:19 +0100
commit53c22ad121c7cf900b9fcd859d95fa54686de047 (patch)
treec693cbaf4cb07a31f6038f1651126e6a24e9f01b /lib/parsetools/include/yeccpre.hrl
parente1f68b26c432a6ad873da8c1460d423861eaedc7 (diff)
downloadotp-53c22ad121c7cf900b9fcd859d95fa54686de047.tar.gz
otp-53c22ad121c7cf900b9fcd859d95fa54686de047.tar.bz2
otp-53c22ad121c7cf900b9fcd859d95fa54686de047.zip
parsetools: Eliminate use of tuple fun
Diffstat (limited to 'lib/parsetools/include/yeccpre.hrl')
-rw-r--r--lib/parsetools/include/yeccpre.hrl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/parsetools/include/yeccpre.hrl b/lib/parsetools/include/yeccpre.hrl
index f638529aa4..3672394fc5 100644
--- a/lib/parsetools/include/yeccpre.hrl
+++ b/lib/parsetools/include/yeccpre.hrl
@@ -28,10 +28,11 @@ parse(Tokens) ->
-spec parse_and_scan({function() | {atom(), atom()}, [_]}
| {atom(), atom(), [_]}) -> yecc_ret().
-parse_and_scan({F, A}) -> % Fun or {M, F}
+parse_and_scan({F, A}) ->
yeccpars0([], {{F, A}, no_line}, 0, [], []);
parse_and_scan({M, F, A}) ->
- yeccpars0([], {{{M, F}, A}, no_line}, 0, [], []).
+ Arity = length(A),
+ yeccpars0([], {{fun M:F/Arity, A}, no_line}, 0, [], []).
-spec format_error(any()) -> [char() | list()].
format_error(Message) ->