Skip to content

Commit

Permalink
Fix #494
Browse files Browse the repository at this point in the history
  • Loading branch information
kaby76 committed Oct 16, 2024
1 parent 0539363 commit 76cd3fa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
60 changes: 30 additions & 30 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,210 +3,210 @@
"isRoot": true,
"tools": {
"tranalyze": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"tranalyze"
],
"rollForward": false
},
"trcaret": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trcaret"
],
"rollForward": false
},
"trclonereplace": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trclonereplace"
],
"rollForward": false
},
"trcombine": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trcombine"
],
"rollForward": false
},
"trconvert": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trconvert"
],
"rollForward": false
},
"trcover": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trcover"
],
"rollForward": false
},
"trdot": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trdot"
],
"rollForward": false
},
"trfoldlit": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trfoldlit"
],
"rollForward": false
},
"trgen": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trgen"
],
"rollForward": false
},
"trgenvsc": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trgenvsc"
],
"rollForward": false
},
"trglob": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trglob"
],
"rollForward": false
},
"triconv": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"triconv"
],
"rollForward": false
},
"tritext": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"tritext"
],
"rollForward": false
},
"trjson": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trjson"
],
"rollForward": false
},
"trparse": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trparse"
],
"rollForward": false
},
"trperf": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trperf"
],
"rollForward": false
},
"trquery": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trquery"
],
"rollForward": false
},
"trrename": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trrename"
],
"rollForward": false
},
"trsort": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trsort"
],
"rollForward": false
},
"trsplit": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trsplit"
],
"rollForward": false
},
"trsponge": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trsponge"
],
"rollForward": false
},
"trtext": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trtext"
],
"rollForward": false
},
"trtokens": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trtokens"
],
"rollForward": false
},
"trtree": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trtree"
],
"rollForward": false
},
"trunfold": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trunfold"
],
"rollForward": false
},
"trungroup": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trungroup"
],
"rollForward": false
},
"trwdog": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trwdog"
],
"rollForward": false
},
"trxgrep": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trxgrep"
],
"rollForward": false
},
"trxml": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trxml"
],
"rollForward": false
},
"trxml2": {
"version": "0.23.7",
"version": "0.23.8",
"commands": [
"trxml2"
],
Expand Down
8 changes: 6 additions & 2 deletions src/trgen/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,8 +1575,8 @@ private void GenFromTemplates(Config config, Test test)
: "");
t.Add("example_files_unix", RemoveTrailingSlash(test.example_files.Replace('\\', '/')));
t.Add("example_files_win", RemoveTrailingSlash(test.example_files.Replace('/', '\\')));
t.Add("example_dir_unix", RemoveTrailingSlash(RemoveGlobbingPattern(test.example_files.Replace('\\', '/'))));
t.Add("example_dir_win", RemoveTrailingSlash(RemoveGlobbingPattern(test.example_files.Replace('/', '\\'))));
t.Add("example_dir_unix", RemoveTrailingSlash(RemoveGlobbingPattern(test.example_files.Replace('\\', '/'))));
t.Add("example_dir_win", RemoveTrailingSlash(RemoveGlobbingPattern(test.example_files.Replace('/', '\\'))));
t.Add("exec_name", GetOSTarget() == "Windows" ? "Test.exe" : "Test");
t.Add("go_lexer_name", test.fully_qualified_go_lexer_name);
t.Add("go_parser_name", test.fully_qualified_go_parser_name);
Expand Down Expand Up @@ -1909,6 +1909,10 @@ AntlrJson.ParsingResultSet DoParse(string txt, string input_name)
result = "success";
}
System.Console.Error.WriteLine("CSharp " + " " + input_name + " " + result + " " + (after - before).TotalSeconds);
if ((bool)res3)
{
throw new Exception("Aborting. Correct syntax errors in grammar file " + input_name + " in order to generate driver.");
}
var parser = type.GetProperty("Parser").GetValue(null, new object[0]) as Antlr4.Runtime.Parser;
var lexer = type.GetProperty("Lexer").GetValue(null, new object[0]) as Antlr4.Runtime.Lexer;
var tokstream = type.GetProperty("TokenStream").GetValue(null, new object[0]) as ITokenStream;
Expand Down

0 comments on commit 76cd3fa

Please sign in to comment.