Skip to content

Commit d7f724d

Browse files
committed
fix
1 parent c793496 commit d7f724d

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

csharp/Antlr4Helper.CSharpHelper/Program.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ static void Main(string[] args)
116116

117117

118118
csText = Regex.Replace(csText, @"//.*", "");
119+
csText = Regex.Replace(csText, @"[\r\n]+[ \t]*[\r\n]+", "\r\n");
120+
csText = Regex.Replace(csText, @"[\r\n]+[ \t]*[\r\n]+", "\r\n");
119121
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
120122
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
121123
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
122124
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
123-
124-
125125
csText = "namespace ToolGood.Algorithm.math\r\n{" + csText + "\r\n}";
126126
File.WriteAllText("mathLexer.cs", csText);
127127

@@ -137,7 +137,12 @@ static void Main(string[] args)
137137

138138

139139

140-
140+
csText = Regex.Replace(csText, @"[\r\n]+[ \t]*[\r\n]+", "\r\n");
141+
csText = Regex.Replace(csText, @"[\r\n]+[ \t]*[\r\n]+", "\r\n");
142+
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
143+
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
144+
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
145+
csText = Regex.Replace(csText, @"\r\n[ \t]*\r\n", "\r\n");
141146
csText = "namespace ToolGood.Algorithm.math\r\n{" + csText + "\r\n}";
142147
File.WriteAllText("mathVisitor.cs", csText);
143148

csharp/ToolGood.Algorithm/math/mathLexer.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
namespace ToolGood.Algorithm.math
22
{
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
153
#pragma warning disable 0162
16-
174
#pragma warning disable 0219
18-
195
#pragma warning disable 1591
20-
216
#pragma warning disable 419
227
using System;
238
using System.IO;

csharp/ToolGood.Algorithm/math/mathVisitor.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ namespace ToolGood.Algorithm.math
88
// the code is regenerated.
99
// </auto-generated>
1010
//------------------------------------------------------------------------------
11-
1211
// Generated from math.g4 by ANTLR 4.13.2
13-
1412
// Unreachable code detected
1513
#pragma warning disable 0162
1614
// The variable '...' is assigned but its value is never used
@@ -19,18 +17,14 @@ namespace ToolGood.Algorithm.math
1917
#pragma warning disable 1591
2018
// Ambiguous reference in cref attribute
2119
#pragma warning disable 419
22-
2320
using Antlr4.Runtime.Misc;
2421
using Antlr4.Runtime.Tree;
2522
using IToken = Antlr4.Runtime.IToken;
26-
2723
/// <summary>
2824
/// This interface defines a complete generic visitor for a parse tree produced
2925
/// by <see cref="mathParser"/>.
3026
/// </summary>
3127
/// <typeparam name="Result">The return type of the visit operation.</typeparam>
32-
33-
3428
interface ImathVisitor<Result> : IParseTreeVisitor<Result> {
3529
/// <summary>
3630
/// Visit a parse tree produced by <see cref="mathParser.prog"/>.

0 commit comments

Comments
 (0)