diff --git a/.gitignore b/.gitignore index c607090..493f8d7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ src/luerl_scan.erl src/luerl_parse.erl comp_opts.mk doc/epub/* +doc ebin/*.beam log logs diff --git a/doc/luerl.txt b/doc_legacy/luerl.txt similarity index 100% rename from doc/luerl.txt rename to doc_legacy/luerl.txt diff --git a/doc/luerl_new.txt b/doc_legacy/luerl_new.txt similarity index 100% rename from doc/luerl_new.txt rename to doc_legacy/luerl_new.txt diff --git a/doc/luerl_sandbox.txt b/doc_legacy/luerl_sandbox.txt similarity index 100% rename from doc/luerl_sandbox.txt rename to doc_legacy/luerl_sandbox.txt diff --git a/doc/man/luerl.3 b/doc_legacy/man/luerl.3 similarity index 100% rename from doc/man/luerl.3 rename to doc_legacy/man/luerl.3 diff --git a/doc/man/luerl_new.3 b/doc_legacy/man/luerl_new.3 similarity index 100% rename from doc/man/luerl_new.3 rename to doc_legacy/man/luerl_new.3 diff --git a/doc/man/luerl_sandbox.3 b/doc_legacy/man/luerl_sandbox.3 similarity index 100% rename from doc/man/luerl_sandbox.3 rename to doc_legacy/man/luerl_sandbox.3 diff --git a/doc/pdf/luerl.pdf b/doc_legacy/pdf/luerl.pdf similarity index 100% rename from doc/pdf/luerl.pdf rename to doc_legacy/pdf/luerl.pdf diff --git a/doc/pdf/luerl_new.pdf b/doc_legacy/pdf/luerl_new.pdf similarity index 100% rename from doc/pdf/luerl_new.pdf rename to doc_legacy/pdf/luerl_new.pdf diff --git a/doc/pdf/luerl_sandbox.pdf b/doc_legacy/pdf/luerl_sandbox.pdf similarity index 100% rename from doc/pdf/luerl_sandbox.pdf rename to doc_legacy/pdf/luerl_sandbox.pdf diff --git a/doc/src/luerl.3.md b/doc_legacy/src/luerl.3.md similarity index 100% rename from doc/src/luerl.3.md rename to doc_legacy/src/luerl.3.md diff --git a/doc/src/luerl_new.3.md b/doc_legacy/src/luerl_new.3.md similarity index 100% rename from doc/src/luerl_new.3.md rename to doc_legacy/src/luerl_new.3.md diff --git a/doc/src/luerl_sandbox.3.md b/doc_legacy/src/luerl_sandbox.3.md similarity index 100% rename from doc/src/luerl_sandbox.3.md rename to doc_legacy/src/luerl_sandbox.3.md diff --git a/rebar.config b/rebar.config index 857a9a9..f0dba00 100644 --- a/rebar.config +++ b/rebar.config @@ -8,18 +8,6 @@ {apps, [luerl]} ]}. -{relx, [{release, {luerl, "1.2.2"}, - [kernel, - stdlib, - sasl, - inets, - luerl]}, - - {dev_mode, false}, - {include_erts, true}, - - {extended_start_script, true}]}. - {profiles, [ {test, [ {dist_node, [ @@ -29,3 +17,15 @@ {ct_opts, [{logdir, "logs"}]} ]} ]}. + +{project_plugins, [rebar3_hex, rebar3_ex_doc]}. + +{hex, [ + {doc, #{provider => ex_doc}} +]}. + +{ex_doc, [ + {source_url, <<"https://github.com/rvirding/luerl">>}, + {extras, [<<"README.md">>, <<"LICENSE">>]}, + {main, <<"readme">>} +]}. diff --git a/src/luerl.app.src b/src/luerl.app.src index 6f11090..e5996ad 100644 --- a/src/luerl.app.src +++ b/src/luerl.app.src @@ -25,9 +25,5 @@ %% Project metadata {licenses, ["Apache-2.0"]}, {links, [{"Github", "https://github.com/rvirding/luerl"}]}, - %% This is used for hex packages. - {files, ["README.md", "LICENSE", "VERSION", "src", "doc", "ebin/luerl.app", - "include", "rebar.*", "*akefile", - "*.escript"]}, - {exclude_files, ["priv/images/*"]} + {doc, "doc"} ]}. diff --git a/src/luerl_anno.erl b/src/luerl_anno.erl index f7ca50b..e9f9a37 100644 --- a/src/luerl_anno.erl +++ b/src/luerl_anno.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2019 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_app.erl b/src/luerl_app.erl index b45364f..eafa90e 100644 --- a/src/luerl_app.erl +++ b/src/luerl_app.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2021 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp.erl b/src/luerl_comp.erl index 887ee09..7927d6c 100644 --- a/src/luerl_comp.erl +++ b/src/luerl_comp.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2019 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_cg.erl b/src/luerl_comp_cg.erl index 89ed138..e35af12 100644 --- a/src/luerl_comp_cg.erl +++ b/src/luerl_comp_cg.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_env.erl b/src/luerl_comp_env.erl index c1aaa86..97c16df 100644 --- a/src/luerl_comp_env.erl +++ b/src/luerl_comp_env.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_lint.erl b/src/luerl_comp_lint.erl index e86a59c..6f9a5f8 100644 --- a/src/luerl_comp_lint.erl +++ b/src/luerl_comp_lint.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2019 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_locf.erl b/src/luerl_comp_locf.erl index c8a8a0a..2aa8833 100644 --- a/src/luerl_comp_locf.erl +++ b/src/luerl_comp_locf.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_normalise.erl b/src/luerl_comp_normalise.erl index 24d86c7..44dd792 100644 --- a/src/luerl_comp_normalise.erl +++ b/src/luerl_comp_normalise.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2019 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_peep.erl b/src/luerl_comp_peep.erl index a9288fb..b0c09d8 100644 --- a/src/luerl_comp_peep.erl +++ b/src/luerl_comp_peep.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2019 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_comp_vars.erl b/src/luerl_comp_vars.erl index 2ee4865..1034b4f 100644 --- a/src/luerl_comp_vars.erl +++ b/src/luerl_comp_vars.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_emul.erl b/src/luerl_emul.erl index d7e6cd3..f7a8586 100644 --- a/src/luerl_emul.erl +++ b/src/luerl_emul.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2023 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_heap.erl b/src/luerl_heap.erl index 93449c5..40660a1 100644 --- a/src/luerl_heap.erl +++ b/src/luerl_heap.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2020-2024 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib.erl b/src/luerl_lib.erl index bff4384..93a85cb 100644 --- a/src/luerl_lib.erl +++ b/src/luerl_lib.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2024 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_basic.erl b/src/luerl_lib_basic.erl index 6b52b62..e5b7282 100644 --- a/src/luerl_lib_basic.erl +++ b/src/luerl_lib_basic.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2024 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_bit32.erl b/src/luerl_lib_bit32.erl index 0673ef2..b677c23 100644 --- a/src/luerl_lib_bit32.erl +++ b/src/luerl_lib_bit32.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2014-2018 Ɓukasz Biedrycki %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_debug.erl b/src/luerl_lib_debug.erl index 685535c..bed939e 100644 --- a/src/luerl_lib_debug.erl +++ b/src/luerl_lib_debug.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2015-2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_io.erl b/src/luerl_lib_io.erl index 67377b4..4a37871 100644 --- a/src/luerl_lib_io.erl +++ b/src/luerl_lib_io.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_math.erl b/src/luerl_lib_math.erl index f44ac0e..40cc103 100644 --- a/src/luerl_lib_math.erl +++ b/src/luerl_lib_math.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_os.erl b/src/luerl_lib_os.erl index dc85d65..14dbbf3 100644 --- a/src/luerl_lib_os.erl +++ b/src/luerl_lib_os.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2024 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_os_date.erl b/src/luerl_lib_os_date.erl index 40eb9d3..2080a16 100644 --- a/src/luerl_lib_os_date.erl +++ b/src/luerl_lib_os_date.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2023-2024 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_package.erl b/src/luerl_lib_package.erl index cd12849..e649afe 100644 --- a/src/luerl_lib_package.erl +++ b/src/luerl_lib_package.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_string.erl b/src/luerl_lib_string.erl index d423f80..286babc 100644 --- a/src/luerl_lib_string.erl +++ b/src/luerl_lib_string.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2021 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_string_format.erl b/src/luerl_lib_string_format.erl index 5cf3e1e..7351ea9 100644 --- a/src/luerl_lib_string_format.erl +++ b/src/luerl_lib_string_format.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_table.erl b/src/luerl_lib_table.erl index f1040d2..9feabcd 100644 --- a/src/luerl_lib_table.erl +++ b/src/luerl_lib_table.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_lib_utf8.erl b/src/luerl_lib_utf8.erl index bb4f3c3..99ef928 100644 --- a/src/luerl_lib_utf8.erl +++ b/src/luerl_lib_utf8.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2020 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_parse.yrl b/src/luerl_parse.yrl index 4734c3e..fe30fe6 100644 --- a/src/luerl_parse.yrl +++ b/src/luerl_parse.yrl @@ -1,28 +1,3 @@ -%% Copyright (c) 2013-2019 Robert Virding -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. - -%% File : luerl_parse.yrl -%% Author : Robert Virding -%% Purpose : Parser for LUA 5.2. - -%% The Grammar rules here are taken directly from the LUA 5.2 -%% manual. Unfortunately it is not an LALR(1) grammar but I have -%% included a fix by Florian Weimer which makes it -%% so, but it needs some after processing. Actually his fix was -%% unnecessarily complex and all that was needed was to change one -%% rule for statements. - Expect 2. %Suppress shift/reduce warning Nonterminals @@ -234,6 +209,36 @@ uminus -> '-' exp : {op,line('$1'),'-','$2'} . Erlang code. +-moduledoc(false). + +%% Copyright (c) 2013-2019 Robert Virding +%% +%% @private +%% +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. + +%% File : luerl_parse.yrl +%% Author : Robert Virding +%% Purpose : Parser for LUA 5.2. + +%% The Grammar rules here are taken directly from the LUA 5.2 +%% manual. Unfortunately it is not an LALR(1) grammar but I have +%% included a fix by Florian Weimer which makes it +%% so, but it needs some after processing. Actually his fix was +%% unnecessarily complex and all that was needed was to change one +%% rule for statements. + + -export([chunk/1]). %% chunk(Tokens) -> FunctionDef | Error. diff --git a/src/luerl_scan.xrl b/src/luerl_scan.xrl index da0d918..66b9337 100644 --- a/src/luerl_scan.xrl +++ b/src/luerl_scan.xrl @@ -1,21 +1,3 @@ -%% Copyright (c) 2013-2023 Robert Virding -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. - -%% File : luerl_scan.xrl -%% Author : Robert Virding -%% Purpose : Token definitions for LUA. - Definitions. D = [0-9] @@ -138,6 +120,29 @@ Rules. Erlang code. +-moduledoc(false). + +%% Copyright (c) 2013-2023 Robert Virding +%% +%% @private +%% +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. + +%% File : luerl_scan.xrl +%% Author : Robert Virding +%% Purpose : Token definitions for LUA. + + -export([is_keyword/1]). -export([string_chars/1,chars/1]). diff --git a/src/luerl_sup.erl b/src/luerl_sup.erl index a9f3c3b..69afa5f 100644 --- a/src/luerl_sup.erl +++ b/src/luerl_sup.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013-2021 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/luerl_util.erl b/src/luerl_util.erl index 40a5bbf..acb06c9 100644 --- a/src/luerl_util.erl +++ b/src/luerl_util.erl @@ -13,7 +13,7 @@ %% limitations under the License. %% File : luerl_util.erl -%% Purpose : Utility functions for Luer. +%% Purpose : Utility functions for Luerl. -module(luerl_util). diff --git a/src/ttdict.erl b/src/ttdict.erl index 84cb33d..08b875a 100644 --- a/src/ttdict.erl +++ b/src/ttdict.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at diff --git a/src/ttsets.erl b/src/ttsets.erl index f9c365b..88c09a1 100644 --- a/src/ttsets.erl +++ b/src/ttsets.erl @@ -1,5 +1,7 @@ %% Copyright (c) 2013 Robert Virding %% +%% @private +%% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at