Skip to content

Commit

Permalink
Merge branch 'develop' into fix/autotools
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosai authored Feb 14, 2024
2 parents 12667ee + efda4f5 commit aef586b
Show file tree
Hide file tree
Showing 19 changed files with 322 additions and 437 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: sudo apt -qq update
- run: sudo apt install -y ant re2c
- run: sudo apt install -y ant re2c autoconf2.69
- run: git clone https://github.com/lmntal/lmntal-compiler.git
- run: cd lmntal-compiler && ant && cd ..
- run: ./autogen.sh
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
SLIM (2.6.0) -- 2023/04/03
* new feature
+ compatible to CSLMNtal

SLIM (2.5.0) -- 2021/04/19
* new feature
+ add --history-management
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.6.0
15 changes: 13 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ run ()
fi
}

# makeshift
autoheader=autoheader
autoreconf=autoreconf
autoconf --version | grep 2.69 >/dev/null
if test $? != 0 ; then
echo "autoconf 2.69 is not installed."
echo "Trying to use autoconf2.69 instead."
autoheader=autoheader2.69
autoreconf=autoreconf2.69
fi

run aclocal
run autoheader
run $autoheader
run automake --add-missing
run autoreconf
run $autoreconf
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# $Id: configure.ac,v 1.13 2008/10/05 11:22:41 riki Exp $

AC_PREREQ([2.71])
AC_INIT([SLIM],[2.5.0],[lmntal@ueda.info.waseda.ac.jp],[slim])
AC_INIT([SLIM], [2.6.0], [lmntal@ueda.info.waseda.ac.jp], [slim])
# AC_REVISION($Revision: 1.13 $)
# AC_COPYRIGHT (copyright-notice)
AC_CANONICAL_TARGET
Expand Down
1 change: 1 addition & 0 deletions src/element/alloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ LmnSymbolAtomRef lmn_new_atom(LmnFunctor f) {
ap->set_functor(f);
ap->set_id(0);

ap->record_flag = false;
return ap;
}

Expand Down
3 changes: 3 additions & 0 deletions src/element/instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,14 @@ const std::map<LmnInstruction, InstrSpec> instr_spec = {
{INSTR_IDIV, {"idiv", {InstrVar, InstrVar, InstrVar}}},
{INSTR_INEG, {"ineg", {InstrVar, InstrVar}}},
{INSTR_IMOD, {"imod", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IABS, {"iabs", {InstrVar, InstrVar, InstrVar}}},
{INSTR_ILT, {"ilt", {InstrVar, InstrVar}}},
{INSTR_ILE, {"ile", {InstrVar, InstrVar}}},
{INSTR_IGT, {"igt", {InstrVar, InstrVar}}},
{INSTR_IGE, {"ige", {InstrVar, InstrVar}}},
{INSTR_IEQ, {"ieq", {InstrVar, InstrVar}}},
{INSTR_INE, {"ine", {InstrVar, InstrVar}}},
{INSTR_INOT, {"inot", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IAND, {"iand", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IOR, {"ior", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IXOR, {"ixor", {InstrVar, InstrVar, InstrVar}}},
Expand All @@ -268,6 +270,7 @@ const std::map<LmnInstruction, InstrSpec> instr_spec = {
{INSTR_IMULFUNC, {"imulfunc", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IDIVFUNC, {"idivfunc", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IMODFUNC, {"imodfunc", {InstrVar, InstrVar, InstrVar}}},
{INSTR_IABSFUNC, {"iabsfunc", {InstrVar, InstrVar, InstrVar}}},

{INSTR_GETCLASS, {"getclass", {InstrVar, InstrVar}}},
{INSTR_SUBCLASS, {"subclass", {InstrVar, InstrVar}}},
Expand Down
2 changes: 2 additions & 0 deletions src/element/instruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ enum LmnInstruction {
INSTR_IDIV,
INSTR_INEG,
INSTR_IMOD,
INSTR_IABS,
INSTR_INOT,
INSTR_IAND,
INSTR_IOR,
Expand All @@ -203,6 +204,7 @@ enum LmnInstruction {
INSTR_IDIVFUNC,
INSTR_INEGFUNC,
INSTR_IMODFUNC,
INSTR_IABSFUNC,
INSTR_INOTFUNC,
INSTR_IANDFUNC,
INSTR_IORFUNC,
Expand Down
4 changes: 2 additions & 2 deletions src/loader/il_lexer.cpp.re
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ start:
exponent = [eE][-+]?integer;
blank = [ \t\n\r];
sstr = "'" [^']* "'";
sstr = "'" ([^']|"\\'")* "'";
dstr = "\"" ([^"]|"\\\"")* "\"";
linecomment = ("//"|"%"|"#") .* [\n];
Expand All @@ -127,7 +127,7 @@ start:
'-'?digit+ {
string s = get_token();
yylval->as<int>() = s.empty() ? 0 : stol(s);
yylval->as<long>() = s.empty() ? 0 : stol(s);
return parser::token::INT;
}
'-'?integer("."integer)?exponent? {
Expand Down
2 changes: 1 addition & 1 deletion src/loader/il_parser.ypp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace c17 = slim::element;
%lex-param {il::lexer* scanner}

%define api.value.type variant
%token <int> INT
%token <long> INT
%token <double> FLOAT
%token <lmn_interned_str> ID SUBRULE_ID
%token <LmnInstruction> INST_NAME
Expand Down
Loading

0 comments on commit aef586b

Please sign in to comment.