1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

Make trial version from master branch

This commit is contained in:
Kevin Glynn 2011-03-27 14:44:47 +02:00
parent 6689f78028
commit 25947236fe
2 changed files with 28 additions and 34 deletions

View File

@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Xml;
using Antlr.Runtime.Tree;
@ -343,9 +344,6 @@ namespace Twiglet.CS2J.Translator
// Suck in translation file
Stream txStream = new FileStream(fullName, FileMode.Open, FileAccess.Read);
if (numLines < numLines - 1)
{
// TRIAL ONLY
// Create a new XML document.
XmlDocument xmlDoc = new XmlDocument();
@ -369,7 +367,6 @@ namespace Twiglet.CS2J.Translator
}
txStream.Seek(0, SeekOrigin.Begin);
}
TypeRepTemplate t = TypeRepTemplate.newInstance(txStream);
// Fullname has form: <path>/<key>.xml
AppEnv[t.TypeName+(t.TypeParams != null && t.TypeParams.Length > 0 ? "'" + t.TypeParams.Length.ToString() : "")] = t;
@ -402,17 +399,12 @@ namespace Twiglet.CS2J.Translator
}
private static string limit(string inp) {
if (numLines > numLines - 1)
return inp;
// TRIAL ONLY
String[] lines = inp.Split(newLines, numLines+1, StringSplitOptions.None);
if (lines.Length <= numLines) {
return inp;
}
String[] res = new String[numLines+1];
Array.Copy(lines, res, numLines);
res[numLines] = "";
return String.Join(Environment.NewLine, res);
lines[numLines] = Regex.Replace(lines[numLines], "\\w", "x");
return String.Join(Environment.NewLine, lines);
}
// Here's where we do the real work...

View File

@ -19,6 +19,8 @@ itsmine(now, includeDate) ::= <<
//
// This file was translated from C# to Java by CS2J (http://www.cs2j.com).
//
// This code is to be used for evaluation of the CS2J tool ONLY.
//
// For more information about CS2J please contact info@twigletsoftware.com
<if(includeDate)>
//