test updates woooo
This commit is contained in:
67
check.sh
67
check.sh
@ -1,67 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Diff-Check Tool #
|
|
||||||
# Checks if outputed TOK = exp #
|
|
||||||
# The Translators - Spring 2025 #
|
|
||||||
|
|
||||||
TOK_DIR="out"
|
|
||||||
NOCOLOR='\033[0m'
|
|
||||||
RED='\033[0;31m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
ORANGE='\033[0;33m'
|
|
||||||
BLUE='\033[0;34m'
|
|
||||||
PURPLE='\033[0;35m'
|
|
||||||
CYAN='\033[0;36m'
|
|
||||||
LIGHTGRAY='\033[0;37m'
|
|
||||||
DARKGRAY='\033[1;30m'
|
|
||||||
LIGHTRED='\033[1;31m'
|
|
||||||
LIGHTGREEN='\033[1;32m'
|
|
||||||
YELLOW='\033[1;33m'
|
|
||||||
LIGHTBLUE='\033[1;34m'
|
|
||||||
LIGHTPURPLE='\033[1;35m'
|
|
||||||
LIGHTCYAN='\033[1;36m'
|
|
||||||
WHITE='\033[1;37m'
|
|
||||||
|
|
||||||
compare_files() {
|
|
||||||
local file="$1"
|
|
||||||
local filename=$(basename -- "$file")
|
|
||||||
filename="${filename%.*}"
|
|
||||||
local num=${filename:2:1}
|
|
||||||
local exp="./tests/sprint$num/expected/$filename.expected"
|
|
||||||
|
|
||||||
if [[ -f "$exp" ]]; then
|
|
||||||
diff -q "$file" "$exp" > /dev/null
|
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo -e "${GREEN}[✔] ${PURPLE}$filename ${WHITE}passed.${NOCOLOR}"
|
|
||||||
elif [[ ! -s "$file" ]]; then
|
|
||||||
echo -e "${RED}[✘] ${PURPLE}$filename ${WHITE}failed with an empty file. (did it segfault?)${NOCOLOR}"
|
|
||||||
else
|
|
||||||
echo -e "\n${RED}[✘] ${PURPLE}$file ${WHITE}failed with an unexpected value...${NOCOLOR}"
|
|
||||||
diff --color=always "$file" "$exp"
|
|
||||||
echo -e ""
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "${ORANGE}[-] ${PURPLE}$filename ${WHITE}does not have an expected value.${NOCOLOR}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ! -d "$TOK_DIR" ]]; then
|
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}Directory $TOK_DIR does not exist.${NOCOLOR}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
for file in "$TOK_DIR"/*; do
|
|
||||||
compare_files "$file"
|
|
||||||
done
|
|
||||||
elif [[ $# -eq 1 ]]; then
|
|
||||||
prefix="$1"
|
|
||||||
for file in "$TOK_DIR"/"$prefix"*; do
|
|
||||||
if [[ -f "$file" ]]; then
|
|
||||||
compare_files "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo -e "${LIGHTBLUE}Usage: $0 [sp#]${NOCOLOR}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
@ -1200,6 +1200,14 @@ TableNode *table_lookup(SymbolTable *table, char *x) {
|
|||||||
}
|
}
|
||||||
TableNode *entrie = table->entries;
|
TableNode *entrie = table->entries;
|
||||||
for (; entrie != NULL; entrie = entrie->next) {
|
for (; entrie != NULL; entrie = entrie->next) {
|
||||||
|
if (entrie->theName == NULL) {
|
||||||
|
printdebug("name of entry is currently NULL, undefined");
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
if (entrie->theName == undefined->theName) {
|
||||||
|
printdebug("name of entry is currently undefined");
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
if (!strcmp(entrie->theName, x)) {
|
if (!strcmp(entrie->theName, x)) {
|
||||||
return entrie;
|
return entrie;
|
||||||
}
|
}
|
||||||
|
74
test.sh
74
test.sh
@ -34,23 +34,23 @@ fi
|
|||||||
|
|
||||||
help() {
|
help() {
|
||||||
echo -e "${GREEN}[HELP] ${YELLOW}Usage: ./test.sh <file> [-exp] ${WHITE}"
|
echo -e "${GREEN}[HELP] ${YELLOW}Usage: ./test.sh <file> [-exp] ${WHITE}"
|
||||||
echo -e "${GREEN}[HELP] ${YELLOW}To all tests in a folder: ./test/sh <dir>/* [-exp]${WHITE}"
|
echo -e "${GREEN}[HELP] ${YELLOW}To all tests in a folder: ./test/sh <dir>/ [-exp]${WHITE}"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
filename=$(basename -- "$1")
|
filename=$(basename -- "$1")
|
||||||
first_line=$(head -n 1 "$1")
|
first_line=$(head -n 1 "$1")
|
||||||
if [[ "$first_line" == "\$\$ TEST: ["*"]"* ]]; then
|
if [[ "$first_line" == "(* TEST: ["*"] *)"* ]]; then
|
||||||
if [ -n "$2" ]; then
|
bracket_content=$(echo "$first_line" | sed -n 's/.*\[\(.*\)\].*/\1/p')
|
||||||
if [[ "$2" == "-exp" ]]; then
|
sed -i '1d' "$1"
|
||||||
bracket_content=$(echo "$first_line" | sed -n 's/.*\[\(.*\)\].*/\1/p')
|
./alpha ${bracket_content} "$1"
|
||||||
sed -i '1d' "$1"
|
sed -i "1s/^/$first_line\n/" "$1"
|
||||||
./alpha ${bracket_content} "$1"
|
|
||||||
sed -i "1s/^/$first_line\n/" "$1"
|
|
||||||
path=$(dirname "$1")
|
|
||||||
filename_noext=${filename:0:${#filename}-6}
|
|
||||||
|
|
||||||
|
if [ $# -ge 2 ]; then
|
||||||
|
path=$(dirname "$1")
|
||||||
|
filename_noext=${filename:0:${#filename}-6}
|
||||||
|
if [[ "$2" == "-exp" || "$3" == "-exp" ]]; then
|
||||||
for file in out/${filename_noext}.*; do
|
for file in out/${filename_noext}.*; do
|
||||||
if [[ "$file" == *".asc" || "$file" == *".s" || "$file" == *".st" || "$file" == *".tok" || "$file" == *".ir" ]]; then
|
if [[ "$file" == *".asc" || "$file" == *".s" || "$file" == *".st" || "$file" == *".tok" || "$file" == *".ir" ]]; then
|
||||||
for_filename=$(basename -- "$file")
|
for_filename=$(basename -- "$file")
|
||||||
@ -62,65 +62,75 @@ run() {
|
|||||||
else
|
else
|
||||||
echo -e "${RED}[ALERT] ${YELLOW}Unexpected file found: $file ${WHITE}"
|
echo -e "${RED}[ALERT] ${YELLOW}Unexpected file found: $file ${WHITE}"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$2" == "-diff" || "$3" == "-diff" ]]; then
|
||||||
|
for file in out/${filename_noext}.*; do
|
||||||
|
if [[ "$file" == *".asc" || "$file" == *".s" || "$file" == *".st" || "$file" == *".tok" || "$file" == *".ir" ]]; then
|
||||||
|
for_filename=$(basename -- "$file")
|
||||||
|
for_filename="${for_filename}.exp"
|
||||||
|
if [ -f "${path}/../expected/${for_filename}" ]; then
|
||||||
|
exp_basename=$(basename -- "$for_filename")
|
||||||
|
diff -q "${path}/../expected/${for_filename}" "$file"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "${GREEN}[SUCCESS] ${YELLOW}Test ${WHITE}$file ${YELLOW}passed ${WHITE}$exp_basename${WHITE}"
|
||||||
|
else
|
||||||
|
echo -e "${RED}[ERROR] ${YELLOW}Test ${WHITE}$file ${YELLOW}failed ${WHITE}$exp_basename${WHITE}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "${RED}[ALERT] ${YELLOW}File ${path}/../expected/${for_filename} not found!${WHITE}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "${RED}[ALERT] ${YELLOW}Unexpected file found: $file ${WHITE}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
else
|
|
||||||
echo -e "${BLUE}[ERROR] ${YELLOW}Invalid argument $2!${WHITE}"
|
|
||||||
help
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bracket_content=$(echo "$first_line" | sed -n 's/.*\[\(.*\)\].*/\1/p')
|
|
||||||
sed -i '1d' "$1"
|
|
||||||
./alpha ${bracket_content} "$1"
|
|
||||||
sed -i "1s/^/$first_line\n/" "$1"
|
|
||||||
else
|
else
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}File $1 is not a valid .alpha test file!${WHITE}"
|
echo -e "${RED}[ERROR] ${YELLOW}File $1 is not a valid .alpha test file!${WHITE}"
|
||||||
help
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$1" == *"/" ]]; then
|
if [[ "$1" == *"/" ]]; then
|
||||||
if [ -n $2 ]; then
|
if [ $# -ge 2 ]; then
|
||||||
for file in "$1"/*; do
|
for file in "$1"*; do
|
||||||
if [[ "$file" == *.alpha ]]; then
|
if [[ "$file" == *.alpha ]]; then
|
||||||
if [[ "$2" == "-exp" ]]; then
|
if [[ "$2" == "-exp" || "$3" == "-exp" || "$2" == "-diff" || "$3" == "-diff" ]]; then
|
||||||
run "$file" "$2"
|
run "$file" "$2" "$3"
|
||||||
else
|
else
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}Invalid argument $2!${WHITE}"
|
echo -e "${RED}[ERROR] ${YELLOW}Invalid argument $2!${WHITE}"
|
||||||
help
|
help
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}File $file is not a .alpha file!${WHITE}"
|
|
||||||
help
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
for file in "$1"/*; do
|
for file in "$1"*; do
|
||||||
if [[ "$file" == *.alpha ]]; then
|
if [[ "$file" == *.alpha ]]; then
|
||||||
run "$file"
|
run "$file"
|
||||||
else
|
else
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}File $file is not a .alpha file!${WHITE}"
|
echo -e "${RED}[ERROR] ${YELLOW}File $file is not a .alpha file!${WHITE}"
|
||||||
help
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$1" ]; then
|
if [ -f "$1" ]; then
|
||||||
if [[ "$1" == *.alpha ]]; then
|
if [[ "$1" == *.alpha ]]; then
|
||||||
if [ -n "$2" ]; then
|
if [ $# -ge 2 ]; then
|
||||||
if [[ "$2" == "-exp" ]]; then
|
if [[ "$2" == "-exp" || "$3" == "-exp" || "$2" == "-diff" || "$3" == "-diff" ]]; then
|
||||||
run "$1" "$2"
|
run "$1" "$2" "$3"
|
||||||
else
|
else
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}Invalid argument $2!${WHITE}"
|
echo -e "${RED}[ERROR] ${YELLOW}Invalid argument $2!${WHITE}"
|
||||||
help
|
help
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
run "$1"
|
run "$1"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${RED}[ERROR] ${YELLOW}File $1 is not a .alpha file!${WHITE}"
|
echo -e "${RED}[ERROR] ${YELLOW}File $1 is not a .alpha file!${WHITE}"
|
||||||
|
10
tests/given/expected/entry.definition.alpha.asc
Normal file
10
tests/given/expected/entry.definition.alpha.asc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file entry.definition.alpha
|
||||||
|
001: (* type string : 1 -> character *)
|
||||||
|
002: type M : string -> integer
|
||||||
|
003:
|
||||||
|
004: function entry : M
|
||||||
|
005:
|
||||||
|
006: entry(s) := {
|
||||||
|
007: return 0;
|
||||||
|
008: }
|
||||||
|
009:
|
13
tests/given/expected/entry.duplicateDifferent.alpha.asc
Normal file
13
tests/given/expected/entry.duplicateDifferent.alpha.asc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file entry.duplicateDifferent.alpha
|
||||||
|
001: type M : string -> integer
|
||||||
|
002:
|
||||||
|
003: function entry : M
|
||||||
|
004:
|
||||||
|
005: entry(s) := {
|
||||||
|
006: [
|
||||||
|
007: integer: x;
|
||||||
|
008: character: x
|
||||||
|
009: ]
|
||||||
|
010: return x;
|
||||||
|
011: }
|
||||||
|
012:
|
11
tests/given/expected/entry.duplicateSame.alpha.asc
Normal file
11
tests/given/expected/entry.duplicateSame.alpha.asc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file entry.duplicateSame.alpha
|
||||||
|
001: type M : string -> integer
|
||||||
|
002: function entry : M
|
||||||
|
003:
|
||||||
|
004: entry(s) := {
|
||||||
|
005: [
|
||||||
|
006: integer: x; integer: x
|
||||||
|
007: ]
|
||||||
|
008: return x;
|
||||||
|
009: }
|
||||||
|
010:
|
13
tests/given/expected/entry.local.alpha.asc
Normal file
13
tests/given/expected/entry.local.alpha.asc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file entry.local.alpha
|
||||||
|
001: type M : string -> integer
|
||||||
|
002:
|
||||||
|
003: function entry : M
|
||||||
|
004:
|
||||||
|
005: entry(s) := {
|
||||||
|
006: [
|
||||||
|
007: integer: x
|
||||||
|
008: ]
|
||||||
|
009: x := 0;
|
||||||
|
010: return x;
|
||||||
|
011: }
|
||||||
|
012:
|
16
tests/given/expected/error.entry.undeclaredType.alpha.asc
Normal file
16
tests/given/expected/error.entry.undeclaredType.alpha.asc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file entry.undeclaredType.alpha
|
||||||
|
001: type M : string -> integer
|
||||||
|
002:
|
||||||
|
003: function foo : M
|
||||||
|
004:
|
||||||
|
005: foo (s) := {
|
||||||
|
006: [
|
||||||
|
007: int: x
|
||||||
|
^0 ^1
|
||||||
|
LINE 7:9 ** ERROR #0: the name 'int', used here as a type, has not been declared at this point in the program.
|
||||||
|
LINE 7:14 ** ERROR #1: the name 'x' is being declared with an unknown type.
|
||||||
|
|
||||||
|
008: ]
|
||||||
|
009: return 0;
|
||||||
|
010: }
|
||||||
|
011:
|
12
tests/given/expected/error.entry.undeclaredVar.alpha.asc
Normal file
12
tests/given/expected/error.entry.undeclaredVar.alpha.asc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file entry.undeclaredVar.alpha
|
||||||
|
001: type M : string -> integer
|
||||||
|
002:
|
||||||
|
003: function entry : M
|
||||||
|
004:
|
||||||
|
005: entry(s) := {
|
||||||
|
006: return x;
|
||||||
|
^0
|
||||||
|
LINE 6:12 ** ERROR #0: the name 'x', used here as a variable name, has not been declared at this point in the program.
|
||||||
|
|
||||||
|
007: }
|
||||||
|
008:
|
16
tests/given/expected/error.none.alpha.asc
Normal file
16
tests/given/expected/error.none.alpha.asc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file error.none.alpha
|
||||||
|
001: type string2int: string -> integer
|
||||||
|
002:
|
||||||
|
003: function entry : string2int
|
||||||
|
004:
|
||||||
|
005: entry(arg) := {
|
||||||
|
006: [ integer: i ; integer: sum ]
|
||||||
|
007: sum := 0;
|
||||||
|
008: i := 0 ;
|
||||||
|
009: while (i < 10) {
|
||||||
|
010: sum := sum + i;
|
||||||
|
011: i := i + 1;
|
||||||
|
012: }
|
||||||
|
013: return 0;
|
||||||
|
014: }
|
||||||
|
015:
|
19
tests/given/expected/error.operator.alpha.asc
Normal file
19
tests/given/expected/error.operator.alpha.asc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file error.operator.alpha
|
||||||
|
001: type string2int: string -> integer
|
||||||
|
002:
|
||||||
|
003: function entry : string2int
|
||||||
|
004:
|
||||||
|
005: entry(arg) := {
|
||||||
|
006: [ integer: i; integer: sum ]
|
||||||
|
007: sum := 0;
|
||||||
|
008: i := 0;
|
||||||
|
009: while (i < 10) {
|
||||||
|
010: sum = sum + i;
|
||||||
|
^0
|
||||||
|
LINE 10:13 ** ERROR #0: assignment operator (:=) expected but equality operator (=) found.
|
||||||
|
|
||||||
|
011: i := i + 1;
|
||||||
|
012: }
|
||||||
|
013: return 0;
|
||||||
|
014: }
|
||||||
|
015:
|
5
tests/given/expected/function.declaration.alpha.asc
Normal file
5
tests/given/expected/function.declaration.alpha.asc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file function.declaration.alpha
|
||||||
|
001: type M : integer -> integer
|
||||||
|
002:
|
||||||
|
003: function f : M
|
||||||
|
004:
|
9
tests/given/expected/function.definition.alpha.asc
Normal file
9
tests/given/expected/function.definition.alpha.asc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file function.definition.alpha
|
||||||
|
001: type M : integer -> integer
|
||||||
|
002:
|
||||||
|
003: function f : M
|
||||||
|
004:
|
||||||
|
005: f(x) := {
|
||||||
|
006: return x;
|
||||||
|
007: }
|
||||||
|
008:
|
75
tests/given/expected/functionValue.alpha.asc
Normal file
75
tests/given/expected/functionValue.alpha.asc
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file functionValue.alpha
|
||||||
|
001: (* Type definitions *)
|
||||||
|
002:
|
||||||
|
003: (* mapping type *)
|
||||||
|
004: type string2int: string -> integer
|
||||||
|
005:
|
||||||
|
006: (* array of functions *)
|
||||||
|
007: type funArray: 1 -> string2int
|
||||||
|
008:
|
||||||
|
009: (* record of functions *)
|
||||||
|
010: type funRec: [ string2int: f; string2int: g ]
|
||||||
|
011:
|
||||||
|
012: (* function returning function *)
|
||||||
|
013: type integer_2_string2int: integer -> string2int
|
||||||
|
014:
|
||||||
|
015: (* function returning function *)
|
||||||
|
016: type string2int_2_integer: string2int -> integer
|
||||||
|
017:
|
||||||
|
018:
|
||||||
|
019: type iXiXc: [integer: a; integer: b; character: c]
|
||||||
|
020:
|
||||||
|
021: type iic2b: iXiXc -> Boolean
|
||||||
|
022:
|
||||||
|
023: (* Function declarations using the above type definitions *)
|
||||||
|
024: function a: string2int
|
||||||
|
025: function b: integer_2_string2int
|
||||||
|
026: function c: string2int_2_integer
|
||||||
|
027:
|
||||||
|
028: function d: iic2b
|
||||||
|
029:
|
||||||
|
030: d(x,y,z) := {
|
||||||
|
031: return (x < y & z < 'm');
|
||||||
|
032: }
|
||||||
|
033:
|
||||||
|
034: function entry: string2int
|
||||||
|
035:
|
||||||
|
036: a(x) := {
|
||||||
|
037: [string : s]
|
||||||
|
038: s := x;
|
||||||
|
039: return 0;
|
||||||
|
040: }
|
||||||
|
041:
|
||||||
|
042: b(x) := {
|
||||||
|
043: [integer: i]
|
||||||
|
044: i := x;
|
||||||
|
045: return a;
|
||||||
|
046: }
|
||||||
|
047:
|
||||||
|
048: c(x) := {
|
||||||
|
049: [string: s]
|
||||||
|
050: s := "Hi!";
|
||||||
|
051: return x(s);
|
||||||
|
052: }
|
||||||
|
053:
|
||||||
|
054:
|
||||||
|
055: (* Function definition
|
||||||
|
056: entry is the first function called
|
||||||
|
057: *)
|
||||||
|
058: entry(arg) := {
|
||||||
|
059: [integer: result; string2int: f; integer: temp]
|
||||||
|
060: temp := a("Hello");
|
||||||
|
061: f := b(temp);
|
||||||
|
062: result := c(f);
|
||||||
|
063: if (d(1,2,'c'))
|
||||||
|
064: then {
|
||||||
|
065: result := 0;
|
||||||
|
066: }
|
||||||
|
067: else {
|
||||||
|
068: [ Boolean : b]
|
||||||
|
069: result := entry("hello");
|
||||||
|
070: }
|
||||||
|
071: result := c(f);
|
||||||
|
072: return result;
|
||||||
|
073: }
|
||||||
|
074:
|
31
tests/given/expected/sample.good.alpha.asc
Normal file
31
tests/given/expected/sample.good.alpha.asc
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file sample.good.alpha
|
||||||
|
001:
|
||||||
|
001: (* Type definitions *)
|
||||||
|
003: type int2int: integer -> integer
|
||||||
|
004: type string2int: string -> integer
|
||||||
|
005:
|
||||||
|
006: (* Function declarations
|
||||||
|
007: They use the above type definitions
|
||||||
|
008: *)
|
||||||
|
009: function square : int2int
|
||||||
|
010: function entry : string2int
|
||||||
|
011:
|
||||||
|
012: (* Function definition
|
||||||
|
013: Functions must be declared before they are defined
|
||||||
|
014: *)
|
||||||
|
015: square(x) := {
|
||||||
|
016: return x * x;
|
||||||
|
017: }
|
||||||
|
018:
|
||||||
|
019: (* Function definition
|
||||||
|
020: entry is the first function called
|
||||||
|
021: *)
|
||||||
|
022: entry(arg) := {
|
||||||
|
023: [ integer: input ; integer: expected ; integer: actual ; Boolean: result ]
|
||||||
|
024: input := 7;
|
||||||
|
025: expected := 49;
|
||||||
|
026: actual := square(input);
|
||||||
|
027: result := expected = actual;
|
||||||
|
028: return 0;
|
||||||
|
029: }
|
||||||
|
030:
|
70
tests/given/expected/selectionSort.alpha.asc
Normal file
70
tests/given/expected/selectionSort.alpha.asc
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file selectionSort.alpha
|
||||||
|
001: (* Type definitions *)
|
||||||
|
002:
|
||||||
|
003: type string2int: string -> integer
|
||||||
|
004: type intArray: 1 -> integer
|
||||||
|
005: type intArrayXinteger: [ intArray: data; integer: index ]
|
||||||
|
006: type intArrayXinteger2integer: intArrayXinteger -> integer
|
||||||
|
007: type intArray2Boolean: intArray -> Boolean
|
||||||
|
008:
|
||||||
|
009:
|
||||||
|
010: (* Function declarations
|
||||||
|
011: They use the above type definitions
|
||||||
|
012: *)
|
||||||
|
013: function indexOfSmallest: intArrayXinteger2integer
|
||||||
|
014: function selectionSort: intArray2Boolean
|
||||||
|
015: function entry : string2int
|
||||||
|
016:
|
||||||
|
017: (* indexOfSmallest *)
|
||||||
|
018: indexOfSmallest (* as *) (data, startingIndex) := {
|
||||||
|
019: [ integer: indexOfSmallestSoFar; integer: i ]
|
||||||
|
020: indexOfSmallestSoFar := startingIndex;
|
||||||
|
021: i := 0 ;
|
||||||
|
022: while (i < data._1 ) {
|
||||||
|
023: if ( data(i) < data(indexOfSmallestSoFar) )
|
||||||
|
024: then {
|
||||||
|
025: indexOfSmallestSoFar := i;
|
||||||
|
026: }
|
||||||
|
027: else {
|
||||||
|
028: i := i;
|
||||||
|
029: }
|
||||||
|
030: i := i + 1;
|
||||||
|
031: }
|
||||||
|
032: return indexOfSmallestSoFar;
|
||||||
|
033: }
|
||||||
|
034:
|
||||||
|
035:
|
||||||
|
036: (* selectionSort *)
|
||||||
|
037: selectionSort(data) := {
|
||||||
|
038: [ integer: i ]
|
||||||
|
039: i := 0 ;
|
||||||
|
040: while (i < data._1 ) {
|
||||||
|
041: [ integer: index; integer: temp ]
|
||||||
|
042: index := indexOfSmallest(data,i);
|
||||||
|
043: temp := data(index);
|
||||||
|
044: data(index) := data(i);
|
||||||
|
045: data(i) := temp;
|
||||||
|
046: i := i + 1;
|
||||||
|
047: }
|
||||||
|
048: return true;
|
||||||
|
049: }
|
||||||
|
050:
|
||||||
|
051:
|
||||||
|
052: (* Function definition
|
||||||
|
053: entry is the first function called
|
||||||
|
054: *)
|
||||||
|
055: entry(arg) := {
|
||||||
|
056: [ intArray: data; Boolean: _ ]
|
||||||
|
057: data := reserve data(8);
|
||||||
|
058: data(0) := 60;
|
||||||
|
059: data(1) := 80;
|
||||||
|
060: data(2) := 10;
|
||||||
|
061: data(3) := 50;
|
||||||
|
062: data(4) := 30;
|
||||||
|
063: data(5) := 40;
|
||||||
|
064: data(6) := 20;
|
||||||
|
065: data(7) := 70;
|
||||||
|
066: _ := selectionSort(data);
|
||||||
|
067: return 0;
|
||||||
|
068: }
|
||||||
|
069:
|
3
tests/given/expected/type.array.alpha.asc
Normal file
3
tests/given/expected/type.array.alpha.asc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file type.array.alpha
|
||||||
|
001: type A : 1 -> integer
|
||||||
|
002:
|
4
tests/given/expected/type.mapping.alpha.asc
Normal file
4
tests/given/expected/type.mapping.alpha.asc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file type.mapping.alpha
|
||||||
|
001: type M : integer -> character
|
||||||
|
002:
|
||||||
|
003:
|
3
tests/given/expected/type.record.alpha.asc
Normal file
3
tests/given/expected/type.record.alpha.asc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file type.record.alpha
|
||||||
|
001: type R : [ integer : i ; character : c ]
|
||||||
|
002:
|
77
tests/given/expected/types.alpha.asc
Normal file
77
tests/given/expected/types.alpha.asc
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
alpha parser, version 0.2 (2023-03-04) - Annotated Source Code for file types.alpha
|
||||||
|
001: (*
|
||||||
|
001:
|
||||||
|
002: At compiler start-up your program should
|
||||||
|
003: create symbol table entries for the following
|
||||||
|
004: built-in types:
|
||||||
|
005:
|
||||||
|
006: Boolean (1 byte)
|
||||||
|
007: character (1 byte)
|
||||||
|
008: integer (4 bytes)
|
||||||
|
009: address (8 bytes)
|
||||||
|
010:
|
||||||
|
011: and the following privileged type (it has literals):
|
||||||
|
012:
|
||||||
|
013: type string: 1 -> character
|
||||||
|
014:
|
||||||
|
015: Your compiler can define other types during
|
||||||
|
016: its start-up routine as well, if it is helpful
|
||||||
|
017: to do so.
|
||||||
|
018:
|
||||||
|
019: *)
|
||||||
|
021:
|
||||||
|
022:
|
||||||
|
023:
|
||||||
|
024: type BooleanXBoolean: [Boolean: x; Boolean: y]
|
||||||
|
025: type characterXcharacter: [character: x; character: y]
|
||||||
|
026: type integerXinteger: [integer: x; integer: y]
|
||||||
|
027:
|
||||||
|
028: type Boolean2Boolean: Boolean -> Boolean
|
||||||
|
029: type integer2integer: integer -> integer
|
||||||
|
030:
|
||||||
|
031: type character2integer: character -> integer
|
||||||
|
032: type Boolean2integer: Boolean -> integer
|
||||||
|
033: type string2integer: string -> integer
|
||||||
|
034:
|
||||||
|
035: type integerXinteger2integer: integerXinteger -> integer
|
||||||
|
036:
|
||||||
|
037: type integerXinteger2Boolean: integerXinteger -> Boolean
|
||||||
|
038: type characterXcharacter2Boolean: characterXcharacter -> Boolean
|
||||||
|
039: type BooleanXBoolean2Boolean: BooleanXBoolean -> Boolean
|
||||||
|
040:
|
||||||
|
041:
|
||||||
|
042: type integer2address: integer -> address
|
||||||
|
043: type address2integer: address -> integer
|
||||||
|
044:
|
||||||
|
045:
|
||||||
|
046: (* The alpha library functions
|
||||||
|
047: You will be provided with x86-64 assembly
|
||||||
|
048: code implementations of these.
|
||||||
|
049: *)
|
||||||
|
050:
|
||||||
|
051: external function printInteger: integer2integer
|
||||||
|
052: external function printCharacter: character2integer
|
||||||
|
053: external function printBoolean: Boolean2integer
|
||||||
|
054:
|
||||||
|
055: (*
|
||||||
|
056: A declaration of the entry point function for your program
|
||||||
|
057:
|
||||||
|
058: You may assume that when starting this function will behave as if
|
||||||
|
059: it had been called from the C language main function like this:
|
||||||
|
060:
|
||||||
|
061: int main(int argc, char * argv[]) {
|
||||||
|
062: if (argc == 1) {
|
||||||
|
063: return entry(NULL);
|
||||||
|
064: }
|
||||||
|
065: else {
|
||||||
|
066: return entry(makeAlphaString(argv[1]));
|
||||||
|
067: }
|
||||||
|
068: }
|
||||||
|
069:
|
||||||
|
070: for some suitable definition of makeAlphaString which creates
|
||||||
|
071: an alpha string representation of its argument C string in memory
|
||||||
|
072: and returns a pointer to that alpha string.
|
||||||
|
073: *)
|
||||||
|
074:
|
||||||
|
075: function entry: string2integer
|
||||||
|
076:
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
(* type string : 1 -> character *)
|
(* type string : 1 -> character *)
|
||||||
type M : string -> integer
|
type M : string -> integer
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type M : string -> integer
|
type M : string -> integer
|
||||||
|
|
||||||
function entry : M
|
function entry : M
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type M : string -> integer
|
type M : string -> integer
|
||||||
function entry : M
|
function entry : M
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type M : string -> integer
|
type M : string -> integer
|
||||||
|
|
||||||
function entry : M
|
function entry : M
|
||||||
|
11
tests/given/test/error.entry.undeclaredType.alpha
Normal file
11
tests/given/test/error.entry.undeclaredType.alpha
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
(* TEST: [-asc -tc] *)
|
||||||
|
type M : string -> integer
|
||||||
|
|
||||||
|
function foo : M
|
||||||
|
|
||||||
|
foo (s) := {
|
||||||
|
[
|
||||||
|
int: x
|
||||||
|
]
|
||||||
|
return 0;
|
||||||
|
}
|
8
tests/given/test/error.entry.undeclaredVar.alpha
Normal file
8
tests/given/test/error.entry.undeclaredVar.alpha
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
(* TEST: [-asc -tc] *)
|
||||||
|
type M : string -> integer
|
||||||
|
|
||||||
|
function entry : M
|
||||||
|
|
||||||
|
entry(s) := {
|
||||||
|
return x;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type string2int: string -> integer
|
type string2int: string -> integer
|
||||||
|
|
||||||
function entry : string2int
|
function entry : string2int
|
||||||
|
15
tests/given/test/error.operator.alpha
Normal file
15
tests/given/test/error.operator.alpha
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
(* TEST: [-asc -tc] *)
|
||||||
|
type string2int: string -> integer
|
||||||
|
|
||||||
|
function entry : string2int
|
||||||
|
|
||||||
|
entry(arg) := {
|
||||||
|
[ integer: i; integer: sum ]
|
||||||
|
sum := 0;
|
||||||
|
i := 0;
|
||||||
|
while (i < 10) {
|
||||||
|
sum = sum + i;
|
||||||
|
i := i + 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type M : integer -> integer
|
type M : integer -> integer
|
||||||
|
|
||||||
function f : M
|
function f : M
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type M : integer -> integer
|
type M : integer -> integer
|
||||||
|
|
||||||
function f : M
|
function f : M
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
(* Type definitions *)
|
(* Type definitions *)
|
||||||
|
|
||||||
(* mapping type *)
|
(* mapping type *)
|
||||||
@ -29,7 +29,6 @@ function c: string2int_2_integer
|
|||||||
function d: iic2b
|
function d: iic2b
|
||||||
|
|
||||||
d(x,y,z) := {
|
d(x,y,z) := {
|
||||||
[string: s;integer: s]
|
|
||||||
return (x < y & z < 'm');
|
return (x < y & z < 'm');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,11 +57,11 @@ c(x) := {
|
|||||||
entry is the first function called
|
entry is the first function called
|
||||||
*)
|
*)
|
||||||
entry(arg) := {
|
entry(arg) := {
|
||||||
[integer: result; string2int: f; integer: temp; character: char]
|
[integer: result; string2int: f; integer: temp]
|
||||||
temp := a("Hello");
|
temp := a("Hello");
|
||||||
f := b(temp);
|
f := b(temp);
|
||||||
result := c(f);
|
result := c(f);
|
||||||
if (d(1,2,char))
|
if (d(1,2,'c'))
|
||||||
then {
|
then {
|
||||||
result := 0;
|
result := 0;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
|
|
||||||
(* Type definitions *)
|
(* Type definitions *)
|
||||||
type int2int: integer -> integer
|
type int2int: integer -> integer
|
||||||
type string2int: string -> integer
|
type string2int: string -> integer
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
(* Type definitions *)
|
(* Type definitions *)
|
||||||
|
|
||||||
type string2int: string -> integer
|
type string2int: string -> integer
|
||||||
@ -46,9 +46,9 @@ selectionSort(data) := {
|
|||||||
data(i) := temp;
|
data(i) := temp;
|
||||||
i := i + 1;
|
i := i + 1;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
(* Function definition
|
(* Function definition
|
||||||
entry is the first function called
|
entry is the first function called
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type A : 1 -> integer
|
type A : 1 -> integer
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type M : integer -> character
|
type M : integer -> character
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
type R : [ integer : i ; character : c ]
|
type R : [ integer : i ; character : c ]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-asc -tc]
|
(* TEST: [-asc -tc] *)
|
||||||
(*
|
(*
|
||||||
|
|
||||||
At compiler start-up your program should
|
At compiler start-up your program should
|
||||||
|
29
tests/sprint1/expected/sp1_keywords.tok.exp
Normal file
29
tests/sprint1/expected/sp1_keywords.tok.exp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
1 1 401 "while"
|
||||||
|
2 1 101 "While"
|
||||||
|
3 1 101 "whiLe"
|
||||||
|
4 1 402 "if"
|
||||||
|
5 1 101 "IF"
|
||||||
|
6 1 101 "If"
|
||||||
|
7 1 101 "iF"
|
||||||
|
8 1 403 "then"
|
||||||
|
9 1 101 "Then"
|
||||||
|
10 1 101 "theN"
|
||||||
|
11 1 404 "else"
|
||||||
|
12 1 101 "eLse"
|
||||||
|
13 1 101 "elSe"
|
||||||
|
14 1 101 "Else"
|
||||||
|
15 1 405 "type"
|
||||||
|
16 1 101 "Type"
|
||||||
|
17 1 101 "tyPe"
|
||||||
|
18 1 406 "function"
|
||||||
|
19 1 101 "Function"
|
||||||
|
20 1 101 "functioN"
|
||||||
|
21 1 407 "return"
|
||||||
|
22 1 101 "Return"
|
||||||
|
23 1 101 "returN"
|
||||||
|
24 1 408 "external"
|
||||||
|
25 1 101 "External"
|
||||||
|
26 1 101 "exteRnal"
|
||||||
|
27 1 409 "as"
|
||||||
|
28 1 101 "As"
|
||||||
|
29 1 101 "aS"
|
22
tests/sprint1/expected/sp1_operators.tok.exp
Normal file
22
tests/sprint1/expected/sp1_operators.tok.exp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
1 1 601 "+"
|
||||||
|
2 1 602 "-"
|
||||||
|
3 1 603 "*"
|
||||||
|
4 1 604 "/"
|
||||||
|
6 1 605 "%"
|
||||||
|
7 1 606 "<"
|
||||||
|
9 1 607 "="
|
||||||
|
10 1 608 ":="
|
||||||
|
11 1 607 "="
|
||||||
|
11 2 508 ":"
|
||||||
|
12 1 508 ":"
|
||||||
|
13 1 607 "="
|
||||||
|
14 1 609 "!"
|
||||||
|
15 1 610 "&"
|
||||||
|
16 1 611 "|"
|
||||||
|
17 1 612 "."
|
||||||
|
18 1 101 "relEASE"
|
||||||
|
19 1 614 "release"
|
||||||
|
20 1 101 "RELEASE"
|
||||||
|
21 1 613 "reserve"
|
||||||
|
22 1 101 "RESERVE"
|
||||||
|
23 1 101 "reSERVe"
|
7
tests/sprint1/expected/sp1_other_punc.tok.exp
Normal file
7
tests/sprint1/expected/sp1_other_punc.tok.exp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
1 1 507 ";"
|
||||||
|
2 1 508 ":"
|
||||||
|
3 1 509 ","
|
||||||
|
4 1 510 "->"
|
||||||
|
5 1 510 "->"
|
||||||
|
6 1 602 "-"
|
||||||
|
6 2 510 "->"
|
59
tests/sprint1/expected/sp1_punc_grouping.tok.exp
Normal file
59
tests/sprint1/expected/sp1_punc_grouping.tok.exp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
1 1 502 ")"
|
||||||
|
2 1 101 "a"
|
||||||
|
2 2 502 ")"
|
||||||
|
3 1 502 ")"
|
||||||
|
3 2 101 "a"
|
||||||
|
4 1 502 ")"
|
||||||
|
4 2 603 "*"
|
||||||
|
5 1 603 "*"
|
||||||
|
5 2 502 ")"
|
||||||
|
7 1 700 "(* jellsls
|
||||||
|
well this seems to work
|
||||||
|
|
||||||
|
|
||||||
|
*)"
|
||||||
|
13 1 501 "("
|
||||||
|
14 1 101 "a"
|
||||||
|
14 2 501 "("
|
||||||
|
15 1 501 "("
|
||||||
|
15 2 101 "a"
|
||||||
|
16 1 501 "("
|
||||||
|
16 2 603 "*"
|
||||||
|
17 1 603 "*"
|
||||||
|
17 2 501 "("
|
||||||
|
20 1 505 "{"
|
||||||
|
21 1 101 "a"
|
||||||
|
21 2 505 "{"
|
||||||
|
22 1 505 "{"
|
||||||
|
22 2 101 "a"
|
||||||
|
23 1 505 "{"
|
||||||
|
23 2 603 "*"
|
||||||
|
24 1 603 "*"
|
||||||
|
24 2 505 "{"
|
||||||
|
25 1 506 "}"
|
||||||
|
26 1 101 "a"
|
||||||
|
26 2 506 "}"
|
||||||
|
27 1 506 "}"
|
||||||
|
27 2 101 "a"
|
||||||
|
28 1 506 "}"
|
||||||
|
28 2 603 "*"
|
||||||
|
29 1 603 "*"
|
||||||
|
29 2 506 "}"
|
||||||
|
33 1 503 "["
|
||||||
|
34 1 101 "a"
|
||||||
|
34 2 503 "["
|
||||||
|
35 1 503 "["
|
||||||
|
35 2 101 "a"
|
||||||
|
36 1 503 "["
|
||||||
|
36 2 603 "*"
|
||||||
|
37 1 603 "*"
|
||||||
|
37 2 503 "["
|
||||||
|
38 1 504 "]"
|
||||||
|
39 1 101 "a"
|
||||||
|
39 2 504 "]"
|
||||||
|
40 1 504 "]"
|
||||||
|
40 2 101 "a"
|
||||||
|
41 1 504 "]"
|
||||||
|
41 2 603 "*"
|
||||||
|
42 1 603 "*"
|
||||||
|
42 2 504 "]"
|
145
tests/sprint1/expected/sp1_real_alpha_file1.tok.exp
Normal file
145
tests/sprint1/expected/sp1_real_alpha_file1.tok.exp
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
1 1 405 "type"
|
||||||
|
1 6 101 "rec"
|
||||||
|
1 9 508 ":"
|
||||||
|
1 11 503 "["
|
||||||
|
1 12 201 "integer"
|
||||||
|
1 19 508 ":"
|
||||||
|
1 21 101 "x"
|
||||||
|
1 22 507 ";"
|
||||||
|
1 24 201 "integer"
|
||||||
|
1 31 508 ":"
|
||||||
|
1 33 101 "y"
|
||||||
|
1 34 504 "]"
|
||||||
|
2 1 405 "type"
|
||||||
|
2 6 101 "T1"
|
||||||
|
2 8 508 ":"
|
||||||
|
2 10 201 "integer"
|
||||||
|
2 18 510 "->"
|
||||||
|
2 21 201 "integer"
|
||||||
|
3 1 405 "type"
|
||||||
|
3 6 101 "T2"
|
||||||
|
3 8 508 ":"
|
||||||
|
3 10 101 "rec"
|
||||||
|
3 14 510 "->"
|
||||||
|
3 17 201 "integer"
|
||||||
|
4 1 406 "function"
|
||||||
|
4 10 101 "foo"
|
||||||
|
4 14 508 ":"
|
||||||
|
4 16 101 "T1"
|
||||||
|
5 1 406 "function"
|
||||||
|
5 10 101 "bar1"
|
||||||
|
5 15 508 ":"
|
||||||
|
5 17 101 "T2"
|
||||||
|
6 1 406 "function"
|
||||||
|
6 10 101 "bar2"
|
||||||
|
6 15 508 ":"
|
||||||
|
6 17 101 "T2"
|
||||||
|
7 1 101 "foo"
|
||||||
|
7 4 501 "("
|
||||||
|
7 5 101 "x"
|
||||||
|
7 6 502 ")"
|
||||||
|
7 8 608 ":="
|
||||||
|
7 11 505 "{"
|
||||||
|
8 2 407 "return"
|
||||||
|
8 9 101 "x"
|
||||||
|
8 11 603 "*"
|
||||||
|
8 13 101 "x"
|
||||||
|
8 14 507 ";"
|
||||||
|
9 9 506 "}"
|
||||||
|
10 1 101 "bar1"
|
||||||
|
10 5 501 "("
|
||||||
|
10 6 101 "a"
|
||||||
|
10 7 502 ")"
|
||||||
|
10 9 608 ":="
|
||||||
|
10 12 505 "{"
|
||||||
|
11 9 407 "return"
|
||||||
|
11 16 101 "a"
|
||||||
|
11 17 612 "."
|
||||||
|
11 18 101 "x"
|
||||||
|
11 20 603 "*"
|
||||||
|
11 22 101 "a"
|
||||||
|
11 23 612 "."
|
||||||
|
11 24 101 "y"
|
||||||
|
11 25 507 ";"
|
||||||
|
12 9 506 "}"
|
||||||
|
13 1 101 "bar2"
|
||||||
|
13 6 409 "as"
|
||||||
|
13 9 501 "("
|
||||||
|
13 10 101 "r"
|
||||||
|
13 11 509 ","
|
||||||
|
13 12 101 "s"
|
||||||
|
13 13 502 ")"
|
||||||
|
13 15 608 ":="
|
||||||
|
13 18 505 "{"
|
||||||
|
14 9 407 "return"
|
||||||
|
14 16 101 "r"
|
||||||
|
14 18 603 "*"
|
||||||
|
14 20 101 "s"
|
||||||
|
14 21 507 ";"
|
||||||
|
15 9 506 "}"
|
||||||
|
16 1 101 "entry"
|
||||||
|
16 6 501 "("
|
||||||
|
16 7 101 "arg"
|
||||||
|
16 10 502 ")"
|
||||||
|
16 12 608 ":="
|
||||||
|
16 15 505 "{"
|
||||||
|
17 9 503 "["
|
||||||
|
17 11 201 "integer"
|
||||||
|
17 18 508 ":"
|
||||||
|
17 20 101 "result"
|
||||||
|
17 27 507 ";"
|
||||||
|
17 29 101 "rec"
|
||||||
|
17 32 508 ":"
|
||||||
|
17 34 101 "w"
|
||||||
|
17 35 504 "]"
|
||||||
|
18 9 101 "result"
|
||||||
|
18 16 608 ":="
|
||||||
|
18 19 101 "foo"
|
||||||
|
18 22 501 "("
|
||||||
|
18 23 301 "5"
|
||||||
|
18 24 502 ")"
|
||||||
|
18 25 507 ";"
|
||||||
|
19 9 101 "w"
|
||||||
|
19 11 608 ":="
|
||||||
|
19 14 613 "reserve"
|
||||||
|
19 21 501 "("
|
||||||
|
19 22 101 "w"
|
||||||
|
19 23 502 ")"
|
||||||
|
19 24 507 ";"
|
||||||
|
19 26 700 "(* see types.alpha – reserve returns a value of type address,
|
||||||
|
which can be assigned to array and record variables
|
||||||
|
*)"
|
||||||
|
22 9 101 "w"
|
||||||
|
22 10 612 "."
|
||||||
|
22 11 101 "x"
|
||||||
|
22 13 608 ":="
|
||||||
|
22 16 301 "5"
|
||||||
|
22 17 507 ";"
|
||||||
|
23 9 101 "w"
|
||||||
|
23 10 612 "."
|
||||||
|
23 11 101 "y"
|
||||||
|
23 13 608 ":="
|
||||||
|
23 16 301 "7"
|
||||||
|
23 17 507 ";"
|
||||||
|
24 9 101 "result"
|
||||||
|
24 16 608 ":="
|
||||||
|
24 19 101 "bar1"
|
||||||
|
24 23 501 "("
|
||||||
|
24 24 101 "w"
|
||||||
|
24 25 502 ")"
|
||||||
|
24 26 507 ";"
|
||||||
|
24 28 700 "(* pass w (a rec type value) to bar1 *)"
|
||||||
|
25 9 101 "result"
|
||||||
|
25 16 608 ":="
|
||||||
|
25 19 101 "bar2"
|
||||||
|
25 23 501 "("
|
||||||
|
25 24 301 "5"
|
||||||
|
25 25 509 ","
|
||||||
|
25 26 301 "7"
|
||||||
|
25 27 502 ")"
|
||||||
|
25 28 507 ";"
|
||||||
|
25 30 700 "(* implicitly build a rec type value, assign 5 and 7 to fields x and y, but call them r and s *)"
|
||||||
|
27 9 407 "return"
|
||||||
|
27 16 301 "0"
|
||||||
|
27 17 507 ";"
|
||||||
|
28 1 506 "}"
|
100
tests/sprint1/expected/sp1_real_alpha_file2.tok.exp
Normal file
100
tests/sprint1/expected/sp1_real_alpha_file2.tok.exp
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
1 1 700 "(* Type definitions *)"
|
||||||
|
2 1 405 "type"
|
||||||
|
2 6 101 "string"
|
||||||
|
2 12 508 ":"
|
||||||
|
2 14 301 "1"
|
||||||
|
2 16 510 "->"
|
||||||
|
2 19 204 "character"
|
||||||
|
3 1 405 "type"
|
||||||
|
3 6 101 "int2int"
|
||||||
|
3 13 508 ":"
|
||||||
|
3 15 201 "integer"
|
||||||
|
3 23 510 "->"
|
||||||
|
3 26 201 "integer"
|
||||||
|
4 1 405 "type"
|
||||||
|
4 6 101 "string2int"
|
||||||
|
4 16 508 ":"
|
||||||
|
4 18 101 "string"
|
||||||
|
4 25 510 "->"
|
||||||
|
4 28 201 "integer"
|
||||||
|
5 1 700 "(* Function prototypes
|
||||||
|
They use the above type definitions
|
||||||
|
*)"
|
||||||
|
8 1 406 "function"
|
||||||
|
8 10 101 "square"
|
||||||
|
8 17 508 ":"
|
||||||
|
8 19 101 "int2int"
|
||||||
|
9 1 406 "function"
|
||||||
|
9 10 101 "entry"
|
||||||
|
9 16 508 ":"
|
||||||
|
9 18 101 "string2int"
|
||||||
|
10 1 700 "(* Function definition
|
||||||
|
Functions must be declared before they are defined
|
||||||
|
*)"
|
||||||
|
13 1 101 "square"
|
||||||
|
13 7 501 "("
|
||||||
|
13 8 101 "x"
|
||||||
|
13 9 502 ")"
|
||||||
|
13 11 608 ":="
|
||||||
|
13 14 505 "{"
|
||||||
|
14 1 407 "return"
|
||||||
|
14 8 101 "x"
|
||||||
|
14 10 603 "*"
|
||||||
|
14 12 101 "x"
|
||||||
|
14 13 507 ";"
|
||||||
|
15 1 506 "}"
|
||||||
|
16 1 700 "(* Function definition
|
||||||
|
entry is the first function called
|
||||||
|
*)"
|
||||||
|
19 1 101 "entry"
|
||||||
|
19 6 501 "("
|
||||||
|
19 7 101 "arg"
|
||||||
|
19 10 502 ")"
|
||||||
|
19 12 608 ":="
|
||||||
|
19 15 505 "{"
|
||||||
|
20 1 101 "input"
|
||||||
|
20 7 607 "="
|
||||||
|
20 9 301 "7"
|
||||||
|
20 10 507 ";"
|
||||||
|
21 1 101 "expected"
|
||||||
|
21 10 607 "="
|
||||||
|
21 12 301 "49"
|
||||||
|
21 14 507 ";"
|
||||||
|
22 1 101 "actual"
|
||||||
|
22 8 608 ":="
|
||||||
|
22 11 101 "square"
|
||||||
|
22 17 501 "("
|
||||||
|
22 18 101 "input"
|
||||||
|
22 23 502 ")"
|
||||||
|
22 24 507 ";"
|
||||||
|
23 1 101 "rseult"
|
||||||
|
23 8 608 ":="
|
||||||
|
23 11 101 "expected"
|
||||||
|
23 20 607 "="
|
||||||
|
23 22 101 "actual"
|
||||||
|
23 28 507 ";"
|
||||||
|
24 1 407 "return"
|
||||||
|
24 8 301 "0"
|
||||||
|
24 9 507 ";"
|
||||||
|
25 1 503 "["
|
||||||
|
25 3 201 "integer"
|
||||||
|
25 10 508 ":"
|
||||||
|
25 12 101 "input"
|
||||||
|
25 17 507 ";"
|
||||||
|
25 19 201 "integer"
|
||||||
|
25 26 508 ":"
|
||||||
|
25 28 101 "expected"
|
||||||
|
25 36 507 ";"
|
||||||
|
25 38 201 "integer"
|
||||||
|
25 45 508 ":"
|
||||||
|
25 47 101 "actual"
|
||||||
|
25 53 507 ";"
|
||||||
|
25 55 101 "boolean"
|
||||||
|
25 62 508 ":"
|
||||||
|
25 64 101 "result"
|
||||||
|
25 70 507 ";"
|
||||||
|
25 72 101 "string"
|
||||||
|
25 78 508 ":"
|
||||||
|
25 80 101 "input"
|
||||||
|
25 86 504 "]"
|
||||||
|
26 1 506 "}"
|
20
tests/sprint1/expected/sp1_simple_alpha.tok.exp
Normal file
20
tests/sprint1/expected/sp1_simple_alpha.tok.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
1 1 405 "type"
|
||||||
|
1 6 101 "main"
|
||||||
|
1 10 508 ":"
|
||||||
|
1 12 101 "string"
|
||||||
|
1 19 510 "->"
|
||||||
|
1 22 201 "integer"
|
||||||
|
2 1 406 "function"
|
||||||
|
2 10 101 "entry"
|
||||||
|
2 15 508 ":"
|
||||||
|
2 17 101 "main"
|
||||||
|
4 1 101 "entry"
|
||||||
|
4 6 501 "("
|
||||||
|
4 7 101 "arg"
|
||||||
|
4 10 502 ")"
|
||||||
|
4 12 608 ":="
|
||||||
|
4 15 505 "{"
|
||||||
|
5 5 407 "return"
|
||||||
|
5 12 301 "0"
|
||||||
|
5 13 507 ";"
|
||||||
|
6 1 506 "}"
|
8
tests/sprint1/expected/sp1_simple_int.tok.exp
Normal file
8
tests/sprint1/expected/sp1_simple_int.tok.exp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
1 1 301 "45"
|
||||||
|
2 1 301 "123"
|
||||||
|
3 1 301 "8392"
|
||||||
|
4 1 301 "40"
|
||||||
|
4 4 301 "40"
|
||||||
|
5 2 301 "200"
|
||||||
|
5 6 301 "50"
|
||||||
|
5 9 301 "21783"
|
64
tests/sprint1/expected/sp1_simple_literals.tok.exp
Normal file
64
tests/sprint1/expected/sp1_simple_literals.tok.exp
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
1 1 304 ""this is a string""
|
||||||
|
1 20 301 "721398"
|
||||||
|
1 27 303 "'g'"
|
||||||
|
1 32 604 "/"
|
||||||
|
1 33 101 "n"
|
||||||
|
1 36 700 "(* should print 3 tokens before this *)"
|
||||||
|
4 1 301 "12893"
|
||||||
|
4 8 101 "this"
|
||||||
|
4 13 101 "is"
|
||||||
|
4 16 101 "not"
|
||||||
|
4 20 101 "a"
|
||||||
|
4 22 101 "string"
|
||||||
|
4 29 700 "(*one valid token before this*)"
|
||||||
|
5 1 700 "(* spacey comment here
|
||||||
|
over multiple lines
|
||||||
|
will it work? *)"
|
||||||
|
7 18 306 "false"
|
||||||
|
11 1 306 "false"
|
||||||
|
12 1 700 "(**)"
|
||||||
|
14 1 101 "nullfalse"
|
||||||
|
15 2 101 "nulltrue"
|
||||||
|
16 1 302 "null"
|
||||||
|
17 1 303 "'7'"
|
||||||
|
18 1 305 "true"
|
||||||
|
19 2 301 "189"
|
||||||
|
20 1 303 "'\t'"
|
||||||
|
21 1 303 "'"'"
|
||||||
|
22 1 303 "'/'"
|
||||||
|
23 1 303 "'\n'"
|
||||||
|
24 1 303 "'\''"
|
||||||
|
25 1 303 "'\t'"
|
||||||
|
26 1 303 "'\\'"
|
||||||
|
27 1 303 "'n'"
|
||||||
|
29 2 101 "fdsf"
|
||||||
|
30 1 700 "(*/jnewjno2893u86^ Lots of random characters /n /t '") *)"
|
||||||
|
35 1 304 ""STRINGwithnotSPaces""
|
||||||
|
36 1 303 "' '"
|
||||||
|
38 1 304 ""J""
|
||||||
|
39 1 304 """"
|
||||||
|
40 1 304 "" ""
|
||||||
|
42 1 304 ""{SCHAR}""
|
||||||
|
43 1 304 ""SCHAR""
|
||||||
|
44 1 304 ""[SCHAR]""
|
||||||
|
45 1 304 ""FINAL: I'd think this is a legal \"string\" that contains \n \t several escaped characters, isn't it?""
|
||||||
|
46 2 101 "I"
|
||||||
|
46 4 101 "d"
|
||||||
|
46 6 101 "think"
|
||||||
|
46 12 101 "this"
|
||||||
|
46 17 101 "is"
|
||||||
|
46 20 101 "a"
|
||||||
|
46 22 101 "legal"
|
||||||
|
46 30 101 "string"
|
||||||
|
46 39 101 "that"
|
||||||
|
46 44 101 "contains"
|
||||||
|
46 53 101 "several"
|
||||||
|
46 63 101 "n"
|
||||||
|
46 66 101 "t"
|
||||||
|
46 68 101 "escaped"
|
||||||
|
46 76 101 "characters"
|
||||||
|
46 86 509 ","
|
||||||
|
46 88 101 "isn"
|
||||||
|
46 92 101 "t"
|
||||||
|
46 94 101 "it"
|
||||||
|
47 1 101 "nullLike"
|
13
tests/sprint1/expected/sp1_variables.tok.exp
Normal file
13
tests/sprint1/expected/sp1_variables.tok.exp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
1 1 101 "valid1"
|
||||||
|
2 1 101 "Valid2"
|
||||||
|
3 1 101 "_valid3"
|
||||||
|
4 1 101 "_valid_name_4"
|
||||||
|
5 1 101 "VALID"
|
||||||
|
6 1 301 "0"
|
||||||
|
6 2 101 "Invalid"
|
||||||
|
7 1 301 "1"
|
||||||
|
7 2 101 "invalid"
|
||||||
|
8 2 101 "invalid"
|
||||||
|
9 1 101 "invalid"
|
||||||
|
9 8 607 "="
|
||||||
|
10 1 101 "String"
|
@ -1,2 +1,2 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
(***)
|
(***)
|
@ -1,2 +1,2 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
(*(**)*)
|
(*(**)*)
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
(*(**)*)
|
(*(**)*)
|
||||||
(***)
|
(***)
|
||||||
(******)(*\kpp*********)
|
(******)(*\kpp*********)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
(* hello *)
|
(* hello *)
|
||||||
(* hello *)
|
(* hello *)
|
||||||
(* I'd think this is a legal "string" that contains several \n \t
|
(* I'd think this is a legal "string" that contains several \n \t
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
This is a test
|
This is a test
|
||||||
9combined 7okens
|
9combined 7okens
|
||||||
12345
|
12345
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
while
|
while
|
||||||
While
|
While
|
||||||
whiLe
|
whiLe
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
+
|
+
|
||||||
-
|
-
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
;
|
;
|
||||||
:
|
:
|
||||||
,
|
,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
)
|
)
|
||||||
a)
|
a)
|
||||||
)a
|
)a
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
type rec: [integer: x; integer: y]
|
type rec: [integer: x; integer: y]
|
||||||
type T1: integer -> integer
|
type T1: integer -> integer
|
||||||
type T2: rec -> integer
|
type T2: rec -> integer
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
(* Type definitions *)
|
(* Type definitions *)
|
||||||
type string: 1 -> character
|
type string: 1 -> character
|
||||||
type int2int: integer -> integer
|
type int2int: integer -> integer
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
45
|
45
|
||||||
123
|
123
|
||||||
8392
|
8392
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
"this is a string" 721398 'g' '/n' (* should print 3 tokens before this *)
|
"this is a string" 721398 'g' '/n' (* should print 3 tokens before this *)
|
||||||
'
|
'
|
||||||
'
|
'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
$$ TEST: [-tok]
|
(* TEST: [-tok] *)
|
||||||
valid1
|
valid1
|
||||||
Valid2
|
Valid2
|
||||||
_valid3
|
_valid3
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
bar2 : 001001 : : undefined : Function Definition
|
|
||||||
bar1 : 001001 : : undefined : Function Definition
|
|
||||||
foo : 001001 : : undefined : Function Definition
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
arr : 001001 : : 1 -> integer : Type of Array
|
|
||||||
T2 : 001001 : : rec -> integer : Type of Function
|
|
||||||
T1 : 001001 : : integer -> integer : Type of Function
|
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
T1 : 001001 : : integer -> integer : Type of Function
|
||||||
|
T2 : 001001 : : rec -> integer : Type of Function
|
||||||
|
arr : 001001 : : 1 -> integer : Type of Array
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 25
|
||||||
|
foo : 001001 : : T1 : Function Definition that starts at line 13
|
||||||
|
bar1 : 001001 : : T2 : Function Definition that starts at line 17
|
||||||
|
bar2 : 001001 : : T2 : Function Definition that starts at line 21
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
w : 025000 : 001001 : rec : Record Instance
|
|
||||||
result : 025000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 025000 : 001001 : string : Array Instance
|
arg : 025000 : 001001 : string : Array Instance
|
||||||
|
result : 025000 : 001001 : integer : Primitive Instance
|
||||||
|
w : 025000 : 001001 : rec : Record Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
r : 021000 : 001001 : integer : Primitive Instance
|
r : 021000 : 001001 : integer : Primitive Instance
|
||||||
s : 021000 : 001001 : integer : Primitive Instance
|
s : 021000 : 001001 : integer : Primitive Instance
|
||||||
@ -31,5 +31,5 @@ y : 017000 : 001001 : integer
|
|||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
x : 013000 : 001001 : integer : Primitive Instance
|
x : 013000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 001000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 001000 : 001001 : integer : Primitive Instance
|
x : 001000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 001000 : 001001 : integer : Primitive Instance
|
@ -1,29 +1,29 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
integer2integer2integerFunc : 001001 : : undefined : Function Definition
|
|
||||||
released : 001001 : : undefined : Function Definition
|
|
||||||
reserved : 001001 : : undefined : Function Definition
|
|
||||||
printBoolean : 001001 : : undefined : Function Definition
|
|
||||||
printCharacter : 001001 : : undefined : Function Definition
|
|
||||||
printInteger : 001001 : : undefined : Function Definition
|
|
||||||
integer2integer2integer : 001001 : : integer2integer -> integer : Type of Function
|
|
||||||
address2integer : 001001 : : address -> integer : Type of Function
|
|
||||||
integer2address : 001001 : : integer -> address : Type of Function
|
|
||||||
Boolean2Boolean2Boolean : 001001 : : Boolean2Boolean -> Boolean : Type of Function
|
|
||||||
character2character2Boolean : 001001 : : undefined -> undefined : Type of Function
|
|
||||||
integer2integer2Boolean : 001001 : : integer2integer -> Boolean : Type of Function
|
|
||||||
string2integer : 001001 : : string -> integer : Type of Function
|
|
||||||
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
|
|
||||||
character2integer : 001001 : : character -> integer : Type of Function
|
|
||||||
integer2integer : 001001 : : integer -> integer : Type of Function
|
|
||||||
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
|
||||||
|
integer2integer : 001001 : : integer -> integer : Type of Function
|
||||||
|
character2integer : 001001 : : character -> integer : Type of Function
|
||||||
|
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
|
||||||
|
string2integer : 001001 : : string -> integer : Type of Function
|
||||||
|
integer2integer2Boolean : 001001 : : integer2integer -> Boolean : Type of Function
|
||||||
|
character2character2Boolean : 001001 : : undefined -> undefined : Type of Function
|
||||||
|
Boolean2Boolean2Boolean : 001001 : : Boolean2Boolean -> Boolean : Type of Function
|
||||||
|
integer2address : 001001 : : integer -> address : Type of Function
|
||||||
|
address2integer : 001001 : : address -> integer : Type of Function
|
||||||
|
integer2integer2integer : 001001 : : integer2integer -> integer : Type of Function
|
||||||
|
printInteger : 001001 : : integer2integer : Function not defined before runtime
|
||||||
|
printCharacter : 001001 : : character2integer : Function not defined before runtime
|
||||||
|
printBoolean : 001001 : : Boolean2integer : Function not defined before runtime
|
||||||
|
reserved : 001001 : : integer2address : Function not defined before runtime
|
||||||
|
released : 001001 : : address2integer : Function not defined before runtime
|
||||||
|
integer2integer2integerFunc : 001001 : : integer2integer2integer : Function not defined before runtime
|
||||||
|
entry : 001001 : : string2integer : Function not defined before runtime
|
@ -1,21 +1,21 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
testarr : 001001 : : 1 -> integer : Type of Array
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 5
|
||||||
|
testarr : 001001 : : 1 -> integer : Type of Array
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
b1 : 005000 : 001001 : Boolean : Primitive Instance
|
|
||||||
b2 : 005000 : 001001 : Boolean : Primitive Instance
|
|
||||||
arr2 : 005000 : 001001 : testarr : Array Instance
|
|
||||||
arr : 005000 : 001001 : testarr : Array Instance
|
|
||||||
x : 005000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 005000 : 001001 : string : Array Instance
|
arg : 005000 : 001001 : string : Array Instance
|
||||||
|
x : 005000 : 001001 : integer : Primitive Instance
|
||||||
|
arr : 005000 : 001001 : testarr : Array Instance
|
||||||
|
arr2 : 005000 : 001001 : testarr : Array Instance
|
||||||
|
b2 : 005000 : 001001 : Boolean : Primitive Instance
|
||||||
|
b1 : 005000 : 001001 : Boolean : Primitive Instance
|
@ -1,20 +1,20 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
test : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : rec -> integer : Type of Function
|
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
main : 001001 : : rec -> integer : Type of Function
|
||||||
|
test : 001001 : : main : Function Definition that starts at line 5
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
arg : 005000 : 001001 : integer : Primitive Instance
|
arg : 005000 : 001001 : integer : Primitive Instance
|
||||||
arg2 : 005000 : 001001 : integer : Primitive Instance
|
arg2 : 005000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 001000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 001000 : 001001 : integer : Primitive Instance
|
x : 001000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 001000 : 001001 : integer : Primitive Instance
|
@ -1,20 +1,20 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 6
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
w : 006000 : 001001 : rec : Record Instance
|
|
||||||
arg : 006000 : 001001 : string : Array Instance
|
arg : 006000 : 001001 : string : Array Instance
|
||||||
|
w : 006000 : 001001 : rec : Record Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
x : 004000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 004000 : 001001 : integer : Primitive Instance
|
@ -1,17 +1,17 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
w : 003000 : 001001 : rec : Record Instance
|
w : 003000 : 001001 : rec : Record Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 001000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 001000 : 001001 : integer : Primitive Instance
|
x : 001000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 001000 : 001001 : integer : Primitive Instance
|
@ -1,39 +1,38 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
printBoolean : 001001 : : undefined : Function Definition
|
|
||||||
printCharacter : 001001 : : undefined : Function Definition
|
|
||||||
printInteger : 001001 : : undefined : Function Definition
|
|
||||||
address2integer : 001001 : : address -> integer : Type of Function
|
|
||||||
integer2address : 001001 : : integer -> address : Type of Function
|
|
||||||
BooleanXBoolean2Boolean : 001001 : : BooleanXBoolean -> Boolean : Type of Function
|
|
||||||
characterXcharacter2Boolean : 001001 : : characterXcharacter -> Boolean : Type of Function
|
|
||||||
integerXinteger2Boolean : 001001 : : integerXinteger -> Boolean : Type of Function
|
|
||||||
integerXinteger2integer : 001001 : : integerXinteger -> integer : Type of Function
|
|
||||||
string2integer : 001001 : : string -> integer : Type of Function
|
|
||||||
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
|
|
||||||
character2integer : 001001 : : character -> integer : Type of Function
|
|
||||||
integer2integer : 001001 : : integer -> integer : Type of Function
|
|
||||||
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
|
|
||||||
integerXinteger : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
characterXcharacter : 001001 : : Record Type : elements-2 size-2 bytes
|
|
||||||
BooleanXBoolean : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
BooleanXBoolean : 001001 : : Record Type : elements-2 size-2 bytes
|
||||||
|
characterXcharacter : 001001 : : Record Type : elements-2 size-2 bytes
|
||||||
|
integerXinteger : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
|
||||||
|
integer2integer : 001001 : : integer -> integer : Type of Function
|
||||||
|
character2integer : 001001 : : character -> integer : Type of Function
|
||||||
|
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
|
||||||
|
string2integer : 001001 : : string -> integer : Type of Function
|
||||||
|
integerXinteger2integer : 001001 : : integerXinteger -> integer : Type of Function
|
||||||
|
integerXinteger2Boolean : 001001 : : integerXinteger -> Boolean : Type of Function
|
||||||
|
characterXcharacter2Boolean : 001001 : : characterXcharacter -> Boolean : Type of Function
|
||||||
|
BooleanXBoolean2Boolean : 001001 : : BooleanXBoolean -> Boolean : Type of Function
|
||||||
|
integer2address : 001001 : : integer -> address : Type of Function
|
||||||
|
address2integer : 001001 : : address -> integer : Type of Function
|
||||||
|
printInteger : 001001 : : integer2integer : Function not defined before runtime
|
||||||
|
printCharacter : 001001 : : character2integer : Function not defined before runtime
|
||||||
|
printBoolean : 001001 : : Boolean2integer : Function not defined before runtime
|
||||||
|
entry : 001001 : : string2integer : Function not defined before runtime
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 015000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 015000 : 001001 : integer : Primitive Instance
|
x : 015000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 015000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 014000 : 001001 : character : Primitive Instance
|
|
||||||
x : 014000 : 001001 : character : Primitive Instance
|
x : 014000 : 001001 : character : Primitive Instance
|
||||||
|
y : 014000 : 001001 : character : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 013000 : 001001 : Boolean : Primitive Instance
|
|
||||||
x : 013000 : 001001 : Boolean : Primitive Instance
|
x : 013000 : 001001 : Boolean : Primitive Instance
|
||||||
|
y : 013000 : 001001 : Boolean : Primitive Instance
|
58
tests/sprint2/expected/sp2_llnode.st.exp
Normal file
58
tests/sprint2/expected/sp2_llnode.st.exp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 68
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
T1 : 001001 : : integer -> integer : Type of Function
|
||||||
|
T2 : 001001 : : rec -> integer : Type of Function
|
||||||
|
llnode : 001001 : : Record Type : elements-3 size-24 bytes
|
||||||
|
list : 001001 : : integer -> llnode : Type of Function
|
||||||
|
foo : 001001 : : T1 : Function Definition that starts at line 45
|
||||||
|
bar1 : 001001 : : T2 : Function Definition that starts at line 49
|
||||||
|
bar2 : 001001 : : T2 : Function Definition that starts at line 53
|
||||||
|
make_list : 001001 : : list : Function Definition that starts at line 16
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
arg : 068000 : 001001 : string : Array Instance
|
||||||
|
result : 068000 : 001001 : integer : Primitive Instance
|
||||||
|
w : 068000 : 001001 : rec : Record Instance
|
||||||
|
li : 068000 : 001001 : llnode : Record Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
r : 053000 : 001001 : integer : Primitive Instance
|
||||||
|
s : 053000 : 001001 : integer : Primitive Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
x : 058012 : 053000 : integer : Primitive Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
a : 049000 : 001001 : integer : Primitive Instance
|
||||||
|
b : 049000 : 001001 : integer : Primitive Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
x : 045000 : 001001 : integer : Primitive Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
a : 016000 : 001001 : integer : Primitive Instance
|
||||||
|
orig_a : 016000 : 001001 : integer : Primitive Instance
|
||||||
|
ret : 016000 : 001001 : llnode : Record Instance
|
||||||
|
curr : 016000 : 001001 : llnode : Record Instance
|
||||||
|
temp : 016000 : 001001 : llnode : Record Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
prev : 008000 : 001001 : llnode : Record Instance
|
||||||
|
val : 008000 : 001001 : integer : Primitive Instance
|
||||||
|
next : 008000 : 001001 : llnode : Record Instance
|
||||||
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
|
x : 004000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 004000 : 001001 : integer : Primitive Instance
|
@ -1,66 +1,58 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
make_list : 001001 : : undefined : Function Definition
|
|
||||||
bar2 : 001001 : : undefined : Function Definition
|
|
||||||
bar1 : 001001 : : undefined : Function Definition
|
|
||||||
foo : 001001 : : undefined : Function Definition
|
|
||||||
list : 001001 : : integer -> llnode : Type of Function
|
|
||||||
llnode : 001001 : : Record Type : elements-3 size-24 bytes
|
|
||||||
T2 : 001001 : : rec -> integer : Type of Function
|
|
||||||
T1 : 001001 : : integer -> integer : Type of Function
|
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 69
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
T1 : 001001 : : integer -> integer : Type of Function
|
||||||
|
T2 : 001001 : : rec -> integer : Type of Function
|
||||||
|
llnode : 001001 : : Record Type : elements-3 size-24 bytes
|
||||||
|
list : 001001 : : integer -> llnode : Type of Function
|
||||||
|
foo : 001001 : : T1 : Function Definition that starts at line 46
|
||||||
|
bar1 : 001001 : : T2 : Function Definition that starts at line 50
|
||||||
|
bar2 : 001001 : : T2 : Function Definition that starts at line 54
|
||||||
|
make_list : 001001 : : list : Function Definition that starts at line 16
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
li : 069000 : 001001 : llnode : Record Instance
|
|
||||||
w : 069000 : 001001 : rec : Record Instance
|
|
||||||
result : 069000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 069000 : 001001 : string : Array Instance
|
arg : 069000 : 001001 : string : Array Instance
|
||||||
|
result : 069000 : 001001 : integer : Primitive Instance
|
||||||
|
w : 069000 : 001001 : rec : Record Instance
|
||||||
|
li : 069000 : 001001 : llnode : Record Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
r : 054000 : 001001 : integer : Primitive Instance
|
r : 054000 : 001001 : integer : Primitive Instance
|
||||||
s : 054000 : 001001 : integer : Primitive Instance
|
s : 054000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
x : 059012 : 054000 : integer : Primitive Instance
|
x : 059012 : 054000 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 062028 : 059012 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 055021 : 054000 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 056026 : 055021 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
a : 050000 : 001001 : integer : Primitive Instance
|
a : 050000 : 001001 : integer : Primitive Instance
|
||||||
b : 050000 : 001001 : integer : Primitive Instance
|
b : 050000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
x : 046000 : 001001 : integer : Primitive Instance
|
x : 046000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
temp : 016000 : 001001 : address : Primitive Instance
|
|
||||||
curr : 016000 : 001001 : address : Primitive Instance
|
|
||||||
ret : 016000 : 001001 : address : Primitive Instance
|
|
||||||
orig_a : 016000 : 001001 : integer : Primitive Instance
|
|
||||||
a : 016000 : 001001 : integer : Primitive Instance
|
a : 016000 : 001001 : integer : Primitive Instance
|
||||||
|
orig_a : 016000 : 001001 : integer : Primitive Instance
|
||||||
|
ret : 016000 : 001001 : llnode : Record Instance
|
||||||
|
curr : 016000 : 001001 : llnode : Record Instance
|
||||||
|
temp : 016000 : 001001 : llnode : Record Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 021012 : 016000 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 026023 : 021012 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 035020 : 026023 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 031034 : 026023 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 019029 : 016000 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
next : 008000 : 001001 : llnode : Record Instance
|
|
||||||
val : 008000 : 001001 : integer : Primitive Instance
|
|
||||||
prev : 008000 : 001001 : llnode : Record Instance
|
prev : 008000 : 001001 : llnode : Record Instance
|
||||||
|
val : 008000 : 001001 : integer : Primitive Instance
|
||||||
|
next : 008000 : 001001 : llnode : Record Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
x : 004000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 004000 : 001001 : integer : Primitive Instance
|
@ -1,22 +1,22 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
bar2 : 001001 : : undefined : Function Definition
|
|
||||||
bar1 : 001001 : : undefined : Function Definition
|
|
||||||
foo : 001001 : : undefined : Function Definition
|
|
||||||
T2 : 001001 : : rec -> integer : Type of Function
|
|
||||||
T1 : 001001 : : integer -> integer : Type of Function
|
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function not defined before runtime
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
T1 : 001001 : : integer -> integer : Type of Function
|
||||||
|
T2 : 001001 : : rec -> integer : Type of Function
|
||||||
|
foo : 001001 : : T1 : Function Definition that starts at line 1
|
||||||
|
bar1 : 001001 : : T2 : Function Definition that starts at line 1
|
||||||
|
bar2 : 001001 : : T2 : Function not defined before runtime
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
: 000000 : 001001 : : Empty Scope
|
: 000000 : 001001 : : Empty Scope
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
@ -25,5 +25,5 @@ undefined : 001000 : 001001 : integer
|
|||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
x : 001000 : 001001 : integer : Primitive Instance
|
x : 001000 : 001001 : integer : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
y : 001000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 001000 : 001001 : integer : Primitive Instance
|
x : 001000 : 001001 : integer : Primitive Instance
|
||||||
|
y : 001000 : 001001 : integer : Primitive Instance
|
@ -1,23 +1,23 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 6
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
arg_bool : 006000 : 001001 : Boolean : Primitive Instance
|
|
||||||
arg_record : 006000 : 001001 : rec : Record Instance
|
|
||||||
arg_y : 006000 : 001001 : integer : Primitive Instance
|
|
||||||
arg_x : 006000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 006000 : 001001 : string : Array Instance
|
arg : 006000 : 001001 : string : Array Instance
|
||||||
|
arg_x : 006000 : 001001 : integer : Primitive Instance
|
||||||
|
arg_y : 006000 : 001001 : integer : Primitive Instance
|
||||||
|
arg_record : 006000 : 001001 : rec : Record Instance
|
||||||
|
arg_bool : 006000 : 001001 : Boolean : Primitive Instance
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
rec_y : 002000 : 001001 : integer : Primitive Instance
|
|
||||||
rec_x : 002000 : 001001 : integer : Primitive Instance
|
rec_x : 002000 : 001001 : integer : Primitive Instance
|
||||||
|
rec_y : 002000 : 001001 : integer : Primitive Instance
|
@ -1,16 +1,16 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
main : 001001 : : string -> integer : Type of Function
|
||||||
|
entry : 001001 : : main : Function Definition that starts at line 4
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 004000 : 001001 : string : Array Instance
|
arg : 004000 : 001001 : string : Array Instance
|
||||||
|
x : 004000 : 001001 : integer : Primitive Instance
|
@ -1,17 +1,16 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
a_of_s : 001001 : : 1 -> string : Type of Array
|
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
|
a_of_s : 001001 : : 1 -> string : Type of Array
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
many_names : 006000 : 001001 : a_of_s : Array Instance
|
|
||||||
another_name : 006000 : 001001 : string : Array Instance
|
|
||||||
one_name : 006000 : 001001 : string : Array Instance
|
one_name : 006000 : 001001 : string : Array Instance
|
||||||
|
another_name : 006000 : 001001 : string : Array Instance
|
||||||
|
many_names : 006000 : 001001 : a_of_s : Array Instance
|
@ -1,21 +0,0 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
|
||||||
T2 : 001001 : : rec -> integer : Type of Function
|
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
|
||||||
reserve : 001001 : : undefined : Function Definition
|
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
|
||||||
release : 001001 : : undefined : Function Definition
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
|
||||||
w : 007000 : 001001 : rec : Record Instance
|
|
||||||
arg : 007000 : 001001 : string : Array Instance
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
|
||||||
y : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
|
@ -1,19 +1,13 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
integer : 001001 : : Primitive Type : size-4 bytes
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
address : 001001 : : Primitive Type : size-8 bytes
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
character : 001001 : : Primitive Type : size-1 bytes
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
string : 001001 : : 1 -> character : Type of Array
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
Boolean : 001001 : : Primitive Type : size-1 bytes
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
reserve type : 001001 : : integer -> address : Type of Function
|
||||||
reserve : 001001 : : undefined : Function Definition
|
reserve : 001001 : : reserve type : Function not defined before runtime
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
release type : 001001 : : address -> integer : Type of Function
|
||||||
release : 001001 : : undefined : Function Definition
|
release : 001001 : : release type : Function not defined before runtime
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
||||||
bool : 015000 : 001001 : Boolean : Primitive Instance
|
: 000000 : 001001 : : Empty Scope
|
||||||
char : 015000 : 001001 : character : Primitive Instance
|
|
||||||
add : 015000 : 001001 : address : Primitive Instance
|
|
||||||
i : 015000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 015000 : 001001 : string : Array Instance
|
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type rec: [integer: x; integer: y]
|
type rec: [integer: x; integer: y]
|
||||||
|
|
||||||
type T1: integer -> integer
|
type T1: integer -> integer
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type Boolean2Boolean: Boolean -> Boolean
|
type Boolean2Boolean: Boolean -> Boolean
|
||||||
type integer2integer: integer -> integer
|
type integer2integer: integer -> integer
|
||||||
type character2integer: character -> integer
|
type character2integer: character -> integer
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
type testarr : 1 -> integer
|
type testarr : 1 -> integer
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type rec: [integer: x; integer: y]
|
type rec: [integer: x; integer: y]
|
||||||
type main: rec -> integer
|
type main: rec -> integer
|
||||||
function test: main
|
function test: main
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type rec: [integer: x; integer: y]
|
type rec: [integer: x; integer: y]
|
||||||
|
|
||||||
entry (arg) := {
|
entry (arg) := {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
(*
|
(*
|
||||||
At compiler start-up your program should create symbol table entries for the four primitive types:
|
At compiler start-up your program should create symbol table entries for the four primitive types:
|
||||||
Boolean (1 byte)
|
Boolean (1 byte)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer function entry: main type rec: [integer: x; integer: y] type T1: integer -> integer type T2: rec -> integer function foo : T1 function bar1 : T2 function bar2 : T2 foo(x) := { return x * x; } bar1(a) := { return a.x * a.y; } bar2 as (r,s) := { return r * s; } entry(arg) := { [ integer: result ; rec: w] result := foo(5); w := reserve w; w.x := 5; w.y := 7; result := bar1(w); result := bar2(5,7); return 0; }
|
type main: string -> integer function entry: main type rec: [integer: x; integer: y] type T1: integer -> integer type T2: rec -> integer function foo : T1 function bar1 : T2 function bar2 : T2 foo(x) := { return x * x; } bar1(a) := { return a.x * a.y; } bar2 as (r,s) := { return r * s; } entry(arg) := { [ integer: result ; rec: w] result := foo(5); w := reserve w; w.x := 5; w.y := 7; result := bar1(w); result := bar2(5,7); return 0; }
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
type rec: [integer: rec_x; integer: rec_y]
|
type rec: [integer: rec_x; integer: rec_y]
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type main: string -> integer
|
type main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
(* TEST: [-st] *)
|
||||||
type string: 1 -> character
|
type string: 1 -> character
|
||||||
type a_of_s: 1 -> string
|
type a_of_s: 1 -> string
|
||||||
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
type string: 1 -> character
|
|
||||||
type a_of_s: 1 -> string
|
|
||||||
|
|
||||||
(* maybe some other type definitions *)
|
|
||||||
|
|
||||||
entry(arg) := {
|
|
||||||
[ string: one_name; string: another_name; a_of_s: many_names ]
|
|
||||||
another_name := reserve another_name(4); (* reserve space for an an array of character, with 4 members *)
|
|
||||||
many_names := reserve a_of_s(3);
|
|
||||||
many_names(0) := one_name;
|
|
||||||
many_names(1) := another_name;
|
|
||||||
many_names(2) := reserve a_of_s(2)(6); (* reserve space for an item of the same type as a_of_s(2), an array of character, with 6 members *)
|
|
||||||
many_names(2)(0) := "P";
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,4 +1,5 @@
|
|||||||
type main: string -> integer
|
(* TEST: [-st] *)
|
||||||
|
ype main: string -> integer
|
||||||
function entry: main
|
function entry: main
|
||||||
|
|
||||||
type rec: [integer: x; integer: y]
|
type rec: [integer: x; integer: y]
|
||||||
|
92
tests/sprint3/expected/sp3_and_or_type_check.asc.exp
Normal file
92
tests/sprint3/expected/sp3_and_or_type_check.asc.exp
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
001: type rec: [integer: x; integer: y]
|
||||||
|
002: type main: rec -> integer
|
||||||
|
003: function test: main
|
||||||
|
004:
|
||||||
|
005: test (arg) := {
|
||||||
|
006: [integer:x; Boolean: b]
|
||||||
|
007: while (true) {
|
||||||
|
008: x := 0;
|
||||||
|
LINE (8:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t1 of type integer
|
||||||
|
LINE (8:9) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (8:3) ** TYPE ERROR: Undefined variable x
|
||||||
|
009: }
|
||||||
|
010:
|
||||||
|
011: while (7) {
|
||||||
|
012: x := 1;
|
||||||
|
LINE (12:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t3 of type integer
|
||||||
|
LINE (12:9) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (12:3) ** TYPE ERROR: Undefined variable x
|
||||||
|
013: }
|
||||||
|
014:
|
||||||
|
015: if (true) then {
|
||||||
|
016: x := 1;
|
||||||
|
LINE (16:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t5 of type integer
|
||||||
|
LINE (16:9) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (16:3) ** TYPE ERROR: Undefined variable x
|
||||||
|
017: } else {
|
||||||
|
018: x := 0;
|
||||||
|
LINE (18:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t6 of type integer
|
||||||
|
LINE (18:9) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (18:3) ** TYPE ERROR: Undefined variable x
|
||||||
|
019: }
|
||||||
|
020:
|
||||||
|
021: if (x) then {
|
||||||
|
LINE (21:6) ** TYPE ERROR: Undefined variable x
|
||||||
|
022: x := 0;
|
||||||
|
LINE (22:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t7 of type integer
|
||||||
|
LINE (22:9) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (22:3) ** TYPE ERROR: Undefined variable x
|
||||||
|
023: } else {
|
||||||
|
024: x := 1;
|
||||||
|
LINE (24:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t8 of type integer
|
||||||
|
LINE (24:9) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (24:3) ** TYPE ERROR: Undefined variable x
|
||||||
|
025: }
|
||||||
|
026:
|
||||||
|
027: b := b | b;
|
||||||
|
LINE (27:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (27:12) ** TYPE ERROR: Object undefined of type undefined and Object undefined of type undefined must both be Boolean
|
||||||
|
LINE (27:11) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (27:7) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (27:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
028: b := b & b;
|
||||||
|
LINE (28:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (28:12) ** TYPE ERROR: Object undefined of type undefined and Object undefined of type undefined must both be Boolean
|
||||||
|
LINE (28:11) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (28:7) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (28:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
029: b := 1 | b;
|
||||||
|
LINE (29:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (29:12) ** TYPE ERROR: Object $t9 of type integer and Object undefined of type undefined must both be Boolean
|
||||||
|
LINE (29:11) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (29:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
030: b := b | 1;
|
||||||
|
LINE (30:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (30:12) ** TYPE ERROR: Object undefined of type undefined and Object $t10 of type integer must both be Boolean
|
||||||
|
LINE (30:7) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (30:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
031: b := b & 1;
|
||||||
|
LINE (31:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (31:12) ** TYPE ERROR: Object undefined of type undefined and Object $t11 of type integer must both be Boolean
|
||||||
|
LINE (31:7) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (31:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
032: b := 1 & b;
|
||||||
|
LINE (32:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (32:12) ** TYPE ERROR: Object $t12 of type integer and Object undefined of type undefined must both be Boolean
|
||||||
|
LINE (32:11) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (32:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
033: b := 1 = 1;
|
||||||
|
LINE (33:12) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t15 of type Boolean
|
||||||
|
LINE (33:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (33:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
034:
|
||||||
|
035:
|
||||||
|
036:
|
||||||
|
037: b := 1 = b;
|
||||||
|
LINE (37:12) ** TYPE ERROR: Invalid type passed to assignable.
|
||||||
|
LINE (37:12) ** TYPE ERROR: Object $t16 of type integer and Object undefined of type undefined must both be the same type
|
||||||
|
LINE (37:11) ** TYPE ERROR: Undefined variable b
|
||||||
|
LINE (37:2) ** TYPE ERROR: Undefined variable b
|
||||||
|
038:
|
||||||
|
039: return 0;
|
||||||
|
040: }
|
@ -1,50 +0,0 @@
|
|||||||
001: type rec: [integer: x; integer: y]
|
|
||||||
002: type main: rec -> integer
|
|
||||||
003: function test: main
|
|
||||||
004:
|
|
||||||
005: test (arg) := {
|
|
||||||
006: [integer:x; Boolean: b]
|
|
||||||
007: while (true) {
|
|
||||||
008: x := 0;
|
|
||||||
009: }
|
|
||||||
010:
|
|
||||||
011: while (7) {
|
|
||||||
012: x := 1;
|
|
||||||
013: }
|
|
||||||
014:
|
|
||||||
015: if (true) then {
|
|
||||||
016: x := 1;
|
|
||||||
017: } else {
|
|
||||||
018: x := 0;
|
|
||||||
019: }
|
|
||||||
020:
|
|
||||||
021: if (x) then {
|
|
||||||
022: x := 0;
|
|
||||||
023: } else {
|
|
||||||
024: x := 1;
|
|
||||||
025: }
|
|
||||||
026:
|
|
||||||
027: b := b | b;
|
|
||||||
028: b := b & b;
|
|
||||||
029: b := 1 | b;
|
|
||||||
LINE (29:12) ** TYPE ERROR: b != undefined
|
|
||||||
|
|
||||||
030: b := b | 1;
|
|
||||||
LINE (30:12) ** TYPE ERROR: b != undefined
|
|
||||||
|
|
||||||
031: b := b & 1;
|
|
||||||
LINE (31:12) ** TYPE ERROR: b != undefined
|
|
||||||
|
|
||||||
032: b := 1 & b;
|
|
||||||
LINE (32:12) ** TYPE ERROR: b != undefined
|
|
||||||
|
|
||||||
033: b := 1 = 1;
|
|
||||||
034:
|
|
||||||
035:
|
|
||||||
036:
|
|
||||||
037: b := 1 = b;
|
|
||||||
LINE (37:12) ** TYPE ERROR: b != undefined
|
|
||||||
|
|
||||||
038:
|
|
||||||
039: return 0;
|
|
||||||
040: }
|
|
@ -0,0 +1,17 @@
|
|||||||
|
001: type main: string -> integer
|
||||||
|
002: function entry: main
|
||||||
|
003:
|
||||||
|
004: entry (arg) := {
|
||||||
|
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
|
||||||
|
006:
|
||||||
|
007: b2 := 3 < x;
|
||||||
|
008: b1 := arr = 2;
|
||||||
|
LINE (8:18) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
|
||||||
|
LINE (8:18) ** TYPE ERROR: Object arr of type address and Object $t2 of type integer must both be the same type
|
||||||
|
009: b1 := 6<7 & arr2=7;
|
||||||
|
LINE (9:23) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
|
||||||
|
LINE (9:23) ** TYPE ERROR: Object $t5 of type Boolean and Object undefined of type undefined must both be Boolean
|
||||||
|
LINE (9:23) ** TYPE ERROR: Object arr2 of type address and Object $t6 of type integer must both be the same type
|
||||||
|
010:
|
||||||
|
011: return 0;
|
||||||
|
012: }
|
@ -1,16 +0,0 @@
|
|||||||
001: type main: string -> integer
|
|
||||||
002: function entry: main
|
|
||||||
003:
|
|
||||||
004: entry (arg) := {
|
|
||||||
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
|
|
||||||
006:
|
|
||||||
007: b2 := 3 < x;
|
|
||||||
008: b1 := arr = 2;
|
|
||||||
LINE (8:18) ** TYPE ERROR: b1 != undefined
|
|
||||||
|
|
||||||
009: b1 := 6<7 & arr2=7;
|
|
||||||
LINE (9:23) ** TYPE ERROR: b1 != undefined
|
|
||||||
|
|
||||||
010:
|
|
||||||
011: return 0;
|
|
||||||
012: }
|
|
@ -6,8 +6,8 @@
|
|||||||
006:
|
006:
|
||||||
007: b2 := !(3 < 2);
|
007: b2 := !(3 < 2);
|
||||||
008: b1 := !5;
|
008: b1 := !5;
|
||||||
LINE (8:13) ** TYPE ERROR: b1 != undefined
|
LINE (8:13) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
|
||||||
|
LINE (8:12) ** TYPE ERROR: Object $t4 of type integer is not of type Boolean and can't be negated
|
||||||
009:
|
009:
|
||||||
010: return 0;
|
010: return 0;
|
||||||
011: }
|
011: }
|
36
tests/sprint3/expected/sp3_carls_second_mistake.asc.exp
Normal file
36
tests/sprint3/expected/sp3_carls_second_mistake.asc.exp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
001: type main: string -> integer
|
||||||
|
002: function entry: main
|
||||||
|
003:
|
||||||
|
004: type string: 1 -> character
|
||||||
|
005: type a_of_s: 1 -> string
|
||||||
|
006:
|
||||||
|
007: (* maybe some other type definitions *)
|
||||||
|
008:
|
||||||
|
009: entry (arg) := {
|
||||||
|
010: [ string: one_name; string: another_name; a_of_s: many_names ]
|
||||||
|
011:
|
||||||
|
012: one_name := "a string literal";
|
||||||
|
013: another_name := reserve another_name(4); (* reserve space for an an array of character, with 4 members *)
|
||||||
|
LINE (13:44) ** TYPE ERROR: Assignable Assign Expression - Object another_name of type string != Object undefined of type undefined
|
||||||
|
014: another_name(0) := 'C';
|
||||||
|
015: another_name(1) := 'a';
|
||||||
|
016: another_name(2) := 'r';
|
||||||
|
017: another_name(3) := 'l';
|
||||||
|
018: many_names := reserve many_names(3);
|
||||||
|
LINE (18:40) ** TYPE ERROR: Assignable Assign Expression - Object many_names of type a_of_s != Object undefined of type undefined
|
||||||
|
019: many_names(0) := one_name;
|
||||||
|
020: many_names(1) := another_name;
|
||||||
|
021: many_names(2) := reserve many_names(2)(6); (* reserve space for an item of the same type as a_of_s(2), an array of character, with 6 members *)
|
||||||
|
LINE (21:45) ** SYNTAX ERROR: Incorrect syntax at token ')'
|
||||||
|
LINE (21:44) ** SYNTAX ERROR: Incorrect syntax at token '6'
|
||||||
|
LINE (21:43) ** SYNTAX ERROR: Incorrect syntax at token '('
|
||||||
|
LINE (21:43) ** TYPE ERROR: Assignable Assign Expression - Object $t20 of type string != Object undefined of type undefined
|
||||||
|
022: many_names(2)(0) := 'P';
|
||||||
|
023: many_names(2)(1) := 'a';
|
||||||
|
024: many_names(2)(2) := 'r';
|
||||||
|
025: many_names(2)(3) := 't';
|
||||||
|
026: many_names(2)(4) := 'h';
|
||||||
|
027: many_names(2)(5) := 'o';
|
||||||
|
028:
|
||||||
|
029: return 0;
|
||||||
|
030: }
|
@ -1,20 +0,0 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
|
||||||
a_of_s : 001001 : : 1 -> string : Type of Array
|
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
|
||||||
entry : 001001 : : undefined : Function Definition
|
|
||||||
main : 001001 : : string -> integer : Type of Function
|
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
|
||||||
reserve : 001001 : : undefined : Function Definition
|
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
|
||||||
release : 001001 : : undefined : Function Definition
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
|
||||||
many_names : 009000 : 001001 : a_of_s : Array Instance
|
|
||||||
another_name : 009000 : 001001 : string : Array Instance
|
|
||||||
one_name : 009000 : 001001 : string : Array Instance
|
|
||||||
arg : 009000 : 001001 : string : Array Instance
|
|
25
tests/sprint3/expected/sp3_if_else.asc.exp
Normal file
25
tests/sprint3/expected/sp3_if_else.asc.exp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
001: type rec: [character: x; integer: y]
|
||||||
|
002:
|
||||||
|
003: type T2: rec -> integer
|
||||||
|
004:
|
||||||
|
005: type main: string -> integer
|
||||||
|
006: function entry: main
|
||||||
|
007: function bar: T2
|
||||||
|
008:
|
||||||
|
009: bar (r,s) := {
|
||||||
|
010: return 0;
|
||||||
|
011: }
|
||||||
|
012:
|
||||||
|
013: entry (arg) := {
|
||||||
|
014: [ integer: result ; rec: w]
|
||||||
|
015: if ( result = result ) then {
|
||||||
|
016: if ( result < w.y ) then {
|
||||||
|
017: result := 8;
|
||||||
|
018: } else {
|
||||||
|
019: result := 9;
|
||||||
|
020: }(* *)
|
||||||
|
021: } else {
|
||||||
|
022: result := bar('c', 7);
|
||||||
|
023: }
|
||||||
|
024: return 0;
|
||||||
|
025: }
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user