Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Update Trash and node.js. #4365

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,189 +3,189 @@
"isRoot": true,
"tools": {
"trcaret": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trcaret"
],
"rollForward": false
},
"trcover": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trcover"
],
"rollForward": false
},
"trgen": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trgen"
],
"rollForward": false
},
"trglob": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trglob"
],
"rollForward": false
},
"triconv": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"triconv"
],
"rollForward": false
},
"trparse": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trparse"
],
"rollForward": false
},
"trquery": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trquery"
],
"rollForward": false
},
"trtext": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trtext"
],
"rollForward": false
},
"trwdog": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trwdog"
],
"rollForward": false
},
"trxgrep": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trxgrep"
],
"rollForward": false
},
"trxml": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trxml"
],
"rollForward": false
},
"trxml2": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trxml2"
],
"rollForward": false
},
"trclonereplace": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trclonereplace"
],
"rollForward": false
},
"trcombine": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trcombine"
],
"rollForward": false
},
"trconvert": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trconvert"
],
"rollForward": false
},
"trfoldlit": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trfoldlit"
],
"rollForward": false
},
"trgenvsc": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trgenvsc"
],
"rollForward": false
},
"tritext": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"tritext"
],
"rollForward": false
},
"trjson": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trjson"
],
"rollForward": false
},
"trperf": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trperf"
],
"rollForward": false
},
"trrename": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trrename"
],
"rollForward": false
},
"trsort": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trsort"
],
"rollForward": false
},
"trsplit": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trsplit"
],
"rollForward": false
},
"trsponge": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trsponge"
],
"rollForward": false
},
"trtokens": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trtokens"
],
"rollForward": false
},
"trtree": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trtree"
],
"rollForward": false
},
"trunfold": {
"version": "0.23.7",
"version": "0.23.11",
"commands": [
"trunfold"
],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Install JavaScript
uses: actions/[email protected]
with:
node-version: '21.7.3'
node-version: '22.12.0'
- name: Test JavaScript
run: |
node --version
Expand Down
2 changes: 1 addition & 1 deletion _scripts/templates/Antlr4ng/st.Test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function main() {
}
timer.stop();
var t = timer.time().m * 60 + timer.time().s + timer.time().ms / 1000;
if (!quiet) console.error('Total Time: ' + t);
if (!quiet) console.error(prefix + 'Total Time: ' + t);
}
process.exitCode = error_code;
}
Expand Down
99 changes: 87 additions & 12 deletions _scripts/templates/Antlr4ng/st.perf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,56 @@
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")

rm -f parse.txt

echo "Testing for Antlr4ng" >> parse.txt
echo "<parser_name>" >> parse.txt
date >> parse.txt
echo "" >> parse.txt

# Output basic information on machine.
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac

echo OS: >> parse.txt
if [[ "$machine" == "Linux" ]]
then
lsb_release -a >> parse.txt
fi
if [[ "$machine" == "CYGWIN" || "$machine" == "MinGw" ]]
then
systeminfo | grep -E '^OS' >> parse.txt
fi
echo "" >> parse.txt

echo CPU: >> parse.txt
if [[ "$machine" == "Linux" ]]
then
lscpu | grep -e 'Model name' >> parse.txt
fi
if [[ "$machine" == "CYGWIN" || "$machine" == "MinGw" ]]
then
pwsh -c '(Get-WmiObject -Class Win32_Processor).Name' >> parse.txt
fi
echo "" >> parse.txt

echo Memory: >> parse.txt
if [[ "$machine" == "Linux" ]]
then
free -h >> parse.txt
fi
if [[ "$machine" == "CYGWIN" || "$machine" == "MinGw" ]]
then
pwsh -c '(Get-WmiObject -Class Win32_PhysicalMemory).Capacity' >> parse.txt
fi
echo "" >> parse.txt

# Get a list of test files from the test directory. Do not include any
# .errors or .tree files. Pay close attention to remove only file names
# that end with the suffix .errors or .tree.
Expand All @@ -27,20 +77,45 @@ then
exit 0
fi

n=$1
type=$2
echo SampleSize=$n >> parse.txt
echo "" >> parse.txt

# Parse all input files.
# Individual parsing.
rm -f parse.txt
for f in ${files[*]}
do
trwdog sh -c "ts-node Test.js -prefix individual $f" >> parse.txt 2>&1
xxx="$?"
if [ "$xxx" -ne 0 ]
then
status="$xxx"
fi
done
if [[ "$type" == "individual" ]]
then
for f in ${files[*]}
do
# Loop from 1 to n and execute the body of the loop each time
for ((i=1; i\<=n; i++))
do
dotnet trwdog sh -c "exec npx tsx Test.js -prefix individual $f" >> parse.txt 2>&1
xxx="$?"
if [ "$xxx" -ne 0 ]
then
status="$xxx"
fi
done
done
fi

# Group parsing.
echo "${files[*]}" | trwdog sh -c "ts-node Test.js -x -prefix group" >> parse.txt 2>&1
status=$?
# Loop from 1 to n and execute the body of the loop each time
if [[ "$type" == "group" ]]
then
for ((i=1; i\<=n; i++))
do
echo "${files[*]}" | dotnet trwdog sh -c "exec npx tsx Test.js -x -prefix group" >> parse.txt 2>&1
xxx="$?"
if [ "$xxx" -ne 0 ]
then
status="$xxx"
fi
done
fi

dos2unix parse.txt

exit 0
3 changes: 0 additions & 3 deletions _scripts/templates/Antlr4ng/st.run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Generated from trgen <version>
set -e
set -x

exec npx tsx Test.js "$@"

exit $?
2 changes: 0 additions & 2 deletions _scripts/templates/CSharp/MyParserInterpreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
/// </remarks>
public class MyParserInterpreter : Parser
{
private readonly string _grammarFileName;

private readonly ATN _atn;

private readonly DFA[] _decisionToDFA;
Expand Down
Loading
Loading