Skip to content

Commit 349d8d1

Browse files
authored
[build] Update to version 0.23.16 of Trash Toolkit. (#4425)
* Update to version 0.23.15 of Trash Toolkit. * Update dotnet-tools.json * Update to 0.23.16, add trapc. * Remaster due to changed grammar. * Remove all broken ports for antlr/antlr4. All ports need to be rewritten in target agnostic format. * Remove testing of PHP for trapc--PHP is not a reliable runtime. Add antlr-ng generator for Antlr4ng testing.
1 parent a27f0e2 commit 349d8d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1330
-1766
lines changed

.config/dotnet-tools.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,189 +3,189 @@
33
"isRoot": true,
44
"tools": {
55
"trcaret": {
6-
"version": "0.23.11",
6+
"version": "0.23.16",
77
"commands": [
88
"trcaret"
99
],
1010
"rollForward": false
1111
},
1212
"trcover": {
13-
"version": "0.23.11",
13+
"version": "0.23.16",
1414
"commands": [
1515
"trcover"
1616
],
1717
"rollForward": false
1818
},
1919
"trgen": {
20-
"version": "0.23.11",
20+
"version": "0.23.16",
2121
"commands": [
2222
"trgen"
2323
],
2424
"rollForward": false
2525
},
2626
"trglob": {
27-
"version": "0.23.11",
27+
"version": "0.23.16",
2828
"commands": [
2929
"trglob"
3030
],
3131
"rollForward": false
3232
},
3333
"triconv": {
34-
"version": "0.23.11",
34+
"version": "0.23.16",
3535
"commands": [
3636
"triconv"
3737
],
3838
"rollForward": false
3939
},
4040
"trparse": {
41-
"version": "0.23.11",
41+
"version": "0.23.16",
4242
"commands": [
4343
"trparse"
4444
],
4545
"rollForward": false
4646
},
4747
"trquery": {
48-
"version": "0.23.11",
48+
"version": "0.23.16",
4949
"commands": [
5050
"trquery"
5151
],
5252
"rollForward": false
5353
},
5454
"trtext": {
55-
"version": "0.23.11",
55+
"version": "0.23.16",
5656
"commands": [
5757
"trtext"
5858
],
5959
"rollForward": false
6060
},
6161
"trwdog": {
62-
"version": "0.23.11",
62+
"version": "0.23.16",
6363
"commands": [
6464
"trwdog"
6565
],
6666
"rollForward": false
6767
},
6868
"trxgrep": {
69-
"version": "0.23.11",
69+
"version": "0.23.16",
7070
"commands": [
7171
"trxgrep"
7272
],
7373
"rollForward": false
7474
},
7575
"trxml": {
76-
"version": "0.23.11",
76+
"version": "0.23.16",
7777
"commands": [
7878
"trxml"
7979
],
8080
"rollForward": false
8181
},
8282
"trxml2": {
83-
"version": "0.23.11",
83+
"version": "0.23.16",
8484
"commands": [
8585
"trxml2"
8686
],
8787
"rollForward": false
8888
},
8989
"trclonereplace": {
90-
"version": "0.23.11",
90+
"version": "0.23.16",
9191
"commands": [
9292
"trclonereplace"
9393
],
9494
"rollForward": false
9595
},
9696
"trcombine": {
97-
"version": "0.23.11",
97+
"version": "0.23.16",
9898
"commands": [
9999
"trcombine"
100100
],
101101
"rollForward": false
102102
},
103103
"trconvert": {
104-
"version": "0.23.11",
104+
"version": "0.23.16",
105105
"commands": [
106106
"trconvert"
107107
],
108108
"rollForward": false
109109
},
110110
"trfoldlit": {
111-
"version": "0.23.11",
111+
"version": "0.23.16",
112112
"commands": [
113113
"trfoldlit"
114114
],
115115
"rollForward": false
116116
},
117117
"trgenvsc": {
118-
"version": "0.23.11",
118+
"version": "0.23.16",
119119
"commands": [
120120
"trgenvsc"
121121
],
122122
"rollForward": false
123123
},
124124
"tritext": {
125-
"version": "0.23.11",
125+
"version": "0.23.16",
126126
"commands": [
127127
"tritext"
128128
],
129129
"rollForward": false
130130
},
131131
"trjson": {
132-
"version": "0.23.11",
132+
"version": "0.23.16",
133133
"commands": [
134134
"trjson"
135135
],
136136
"rollForward": false
137137
},
138138
"trperf": {
139-
"version": "0.23.11",
139+
"version": "0.23.16",
140140
"commands": [
141141
"trperf"
142142
],
143143
"rollForward": false
144144
},
145145
"trrename": {
146-
"version": "0.23.11",
146+
"version": "0.23.16",
147147
"commands": [
148148
"trrename"
149149
],
150150
"rollForward": false
151151
},
152152
"trsort": {
153-
"version": "0.23.11",
153+
"version": "0.23.16",
154154
"commands": [
155155
"trsort"
156156
],
157157
"rollForward": false
158158
},
159159
"trsplit": {
160-
"version": "0.23.11",
160+
"version": "0.23.16",
161161
"commands": [
162162
"trsplit"
163163
],
164164
"rollForward": false
165165
},
166166
"trsponge": {
167-
"version": "0.23.11",
167+
"version": "0.23.16",
168168
"commands": [
169169
"trsponge"
170170
],
171171
"rollForward": false
172172
},
173173
"trtokens": {
174-
"version": "0.23.11",
174+
"version": "0.23.16",
175175
"commands": [
176176
"trtokens"
177177
],
178178
"rollForward": false
179179
},
180180
"trtree": {
181-
"version": "0.23.11",
181+
"version": "0.23.16",
182182
"commands": [
183183
"trtree"
184184
],
185185
"rollForward": false
186186
},
187187
"trunfold": {
188-
"version": "0.23.11",
188+
"version": "0.23.16",
189189
"commands": [
190190
"trunfold"
191191
],

.github/workflows/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
arch
5959
uname -a
6060
if [ -f /proc/cpuinfo ]; then cat /proc/cpuinfo; fi
61+
export
6162
- name: Checkout
6263
uses: actions/checkout@v4
6364
with:
@@ -149,6 +150,16 @@ jobs:
149150
shell: bash
150151
run: |
151152
dotnet trgen --help
153+
- name: Install Antlr-ng
154+
shell: pwsh
155+
run: |
156+
cd $HOME
157+
git clone https://github.com/mike-lischke/antlr-ng.git
158+
cd antlr-ng
159+
echo HOME $HOME
160+
git checkout 4975d4a7b556e34c38c2e53b9815c8c4c802236f
161+
npm i
162+
npm run build
152163
- name: Test
153164
shell: pwsh
154165
run: |
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// Generated from trgen <version>
2+
3+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
4+
* Use of this file is governed by the BSD 3-clause license that
5+
* can be found in the LICENSE.txt file in the project root.
6+
*/
7+
using System;
8+
using Antlr4.Runtime.Misc;
9+
10+
namespace Antlr4.Runtime
11+
{
12+
/// \<summary>
13+
/// This class supports case-insensitive lexing by wrapping an existing
14+
/// \<see cref=""ICharStream""/> and forcing the lexer to see either upper or
15+
/// lowercase characters. Grammar literals should then be either upper or
16+
/// lower case such as 'BEGIN' or 'begin'. The text of the character
17+
/// stream is unaffected. Example: input 'BeGiN' would match lexer rule
18+
/// 'BEGIN' if constructor parameter upper=true but getText() would return
19+
/// 'BeGiN'.
20+
/// \</summary>
21+
public class CaseChangingCharStream : ICharStream
22+
{
23+
private ICharStream stream;
24+
private bool upper;
25+
26+
/// \<summary>
27+
/// Constructs a new CaseChangingCharStream wrapping the given \<paramref name=""stream""/> forcing
28+
/// all characters to upper case or lower case.
29+
/// \</summary>
30+
/// \<param name=""stream"">The stream to wrap.\</param>
31+
/// \<param name=""upper"">If true force each symbol to upper
32+
/// case, otherwise force to lower.\</param>
33+
public CaseChangingCharStream(ICharStream stream, bool upper)
34+
{
35+
this.stream = stream;
36+
this.upper = upper;
37+
}
38+
39+
public int Index
40+
{
41+
get
42+
{
43+
return stream.Index;
44+
}
45+
}
46+
47+
public int Size
48+
{
49+
get
50+
{
51+
return stream.Size;
52+
}
53+
}
54+
55+
public string SourceName
56+
{
57+
get
58+
{
59+
return stream.SourceName;
60+
}
61+
}
62+
63+
public void Consume()
64+
{
65+
stream.Consume();
66+
}
67+
68+
[return: NotNull]
69+
public string GetText(Interval interval)
70+
{
71+
return stream.GetText(interval);
72+
}
73+
74+
public int La(int i)
75+
{
76+
int c = stream.La(i);
77+
78+
if (c \<= 0)
79+
{
80+
return c;
81+
}
82+
83+
char o = (char)c;
84+
85+
if (upper)
86+
{
87+
return (int)char.ToUpperInvariant(o);
88+
}
89+
90+
return (int)char.ToLowerInvariant(o);
91+
}
92+
93+
public int Mark()
94+
{
95+
return stream.Mark();
96+
}
97+
98+
public void Release(int marker)
99+
{
100+
stream.Release(marker);
101+
}
102+
103+
public void Seek(int index)
104+
{
105+
stream.Seek(index);
106+
}
107+
}
108+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Generated from trgen <version>
2+
3+
using Antlr4.Runtime;
4+
using Antlr4.Runtime.Misc;
5+
using System;
6+
using System.Collections.Generic;
7+
using System.IO;
8+
using System.Linq;
9+
10+
<if(has_name_space)>namespace <name_space>
11+
{<endif>
12+
public class ErrorListener\<S> : IAntlrErrorListener\<S>
13+
{
14+
public bool had_error;
15+
bool _quiet;
16+
bool _tee;
17+
TextWriter _out;
18+
19+
public ErrorListener(bool quiet, bool tee, TextWriter @out)
20+
{
21+
_quiet = quiet;
22+
_tee = tee;
23+
_out = @out;
24+
}
25+
26+
public virtual void SyntaxError(IRecognizer recognizer, S offendingSymbol, int line, int col, string msg, RecognitionException e)
27+
{
28+
had_error = true;
29+
if (_tee)
30+
{
31+
_out.WriteLine("line " + line + ":" + col + " " + msg);
32+
}
33+
if (!_quiet)
34+
{
35+
System.Console.Error.WriteLine("line " + line + ":" + col + " " + msg);
36+
}
37+
}
38+
}
39+
<if(has_name_space)>}<endif>

0 commit comments

Comments
 (0)