Version 1.3.1
Added repeat(s,n) method takes a string and returns that string repeated n times
This commit is contained in:
parent
b4cca046a3
commit
16ada0e707
BIN
packages/OpenTK.1.1.2349.61993/OpenTK.1.1.2349.61993.nupkg
vendored
Normal file
BIN
packages/OpenTK.1.1.2349.61993/OpenTK.1.1.2349.61993.nupkg
vendored
Normal file
Binary file not shown.
15
packages/OpenTK.1.1.2349.61993/lib/NET40/OpenTK.dll.config
vendored
Normal file
15
packages/OpenTK.1.1.2349.61993/lib/NET40/OpenTK.dll.config
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<configuration>
|
||||||
|
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||||
|
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||||
|
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
|
||||||
|
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
|
||||||
|
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
|
||||||
|
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
|
||||||
|
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
|
||||||
|
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
|
||||||
|
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
|
||||||
|
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||||
|
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||||
|
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
|
||||||
|
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
|
||||||
|
</configuration>
|
||||||
186065
packages/OpenTK.1.1.2349.61993/lib/NET40/OpenTK.xml
vendored
Normal file
186065
packages/OpenTK.1.1.2349.61993/lib/NET40/OpenTK.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
packages/OpenTK.NETCore.1.1.2749.6433/OpenTK.NETCore.1.1.2749.6433.nupkg
vendored
Normal file
BIN
packages/OpenTK.NETCore.1.1.2749.6433/OpenTK.NETCore.1.1.2749.6433.nupkg
vendored
Normal file
Binary file not shown.
443138
packages/OpenTK.NETCore.1.1.2749.6433/lib/netstandard1.3/OpenTK.xml
vendored
Normal file
443138
packages/OpenTK.NETCore.1.1.2749.6433/lib/netstandard1.3/OpenTK.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
186065
parseManager/bin/Debug/OpenTK.xml
Normal file
186065
parseManager/bin/Debug/OpenTK.xml
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -6,3 +6,5 @@ C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\obj\Debu
|
|||||||
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\obj\Debug\parseManagerTester.pdb
|
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\obj\Debug\parseManagerTester.pdb
|
||||||
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\bin\Debug\NAudio.dll
|
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\bin\Debug\NAudio.dll
|
||||||
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\bin\Debug\NAudio.xml
|
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\bin\Debug\NAudio.xml
|
||||||
|
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\bin\Debug\OpenTK.dll
|
||||||
|
C:\Users\Ryan\Documents\SharpDevelop Projects\parseManager\parseManager\bin\Debug\OpenTK.xml
|
||||||
|
|||||||
@ -2,4 +2,5 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="MediaToolkit" version="1.1.0.1" targetFramework="net40" />
|
<package id="MediaToolkit" version="1.1.0.1" targetFramework="net40" />
|
||||||
<package id="NAudio" version="1.8.2" targetFramework="net40" />
|
<package id="NAudio" version="1.8.2" targetFramework="net40" />
|
||||||
|
<package id="OpenTK" version="1.1.2349.61993" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -8,6 +8,7 @@ using System.Data;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@ -18,12 +19,12 @@ using NAudio.Wave;
|
|||||||
using parseManagerCS;
|
using parseManagerCS;
|
||||||
namespace parseManagerCS
|
namespace parseManagerCS
|
||||||
{
|
{
|
||||||
/// The parseManager is an Advance Config Script
|
/// The parseManager is an Advance Config Script (It goes beyond what it was initially desgined for though!)
|
||||||
/// It allows the user to run code while also defining variables
|
/// It allows the user to run code while also defining variables
|
||||||
/// This also has very flexible flow control meaning you can use it for chat logic and such
|
/// This also has very flexible flow control meaning you can use it for chat logic and such
|
||||||
public class parseManager
|
public class parseManager
|
||||||
{
|
{
|
||||||
public string _VERSION = "1.3.0";
|
public string _VERSION = "1.3.1";
|
||||||
standardDefine _invoke = new standardDefine();
|
standardDefine _invoke = new standardDefine();
|
||||||
string _filepath;
|
string _filepath;
|
||||||
bool _active = true;
|
bool _active = true;
|
||||||
@ -143,7 +144,7 @@ namespace parseManagerCS
|
|||||||
_flags.Add("debugging", false);
|
_flags.Add("debugging", false);
|
||||||
_flags.Add("topdown", true);
|
_flags.Add("topdown", true);
|
||||||
_flags.Add("casesensitive", true);
|
_flags.Add("casesensitive", true);
|
||||||
_flags.Add("strictsyntax",false);
|
_flags.Add("strictsyntax", false);
|
||||||
}
|
}
|
||||||
public ENV Pop()
|
public ENV Pop()
|
||||||
{
|
{
|
||||||
@ -179,7 +180,7 @@ namespace parseManagerCS
|
|||||||
}
|
}
|
||||||
foreach (Match m in Regex.Matches(data, @"VERSION ([a-zA-Z0-9_\./]+)")) {
|
foreach (Match m in Regex.Matches(data, @"VERSION ([a-zA-Z0-9_\./]+)")) {
|
||||||
if (Version.Parse(m.Groups[1].ToString()) > Version.Parse(_VERSION)) {
|
if (Version.Parse(m.Groups[1].ToString()) > Version.Parse(_VERSION)) {
|
||||||
PushError("Attempt to run a code created for a greater version of the interperter/compiler! Script's Version: "+Version.Parse(m.Groups[1].ToString())+" Interperter's Version: "+Version.Parse(_VERSION));
|
PushError("Attempt to run a code created for a greater version of the interperter/compiler! Script's Version: " + Version.Parse(m.Groups[1].ToString()) + " Interperter's Version: " + Version.Parse(_VERSION));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (Match m in Regex.Matches(data, @"THREAD ([a-zA-Z0-9_\./]+)")) {
|
foreach (Match m in Regex.Matches(data, @"THREAD ([a-zA-Z0-9_\./]+)")) {
|
||||||
@ -359,7 +360,7 @@ namespace parseManagerCS
|
|||||||
_currentChunk = cchunk;
|
_currentChunk = cchunk;
|
||||||
_currentChunk.ResetPos();
|
_currentChunk.ResetPos();
|
||||||
} else {
|
} else {
|
||||||
PushError("Attempt to JUMP to a non existing block: \""+BLOCK+"\"");
|
PushError("Attempt to JUMP to a non existing block: \"" + BLOCK + "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public ENV GetENV()
|
public ENV GetENV()
|
||||||
@ -397,8 +398,8 @@ namespace parseManagerCS
|
|||||||
}
|
}
|
||||||
public void PushError(string err)
|
public void PushError(string err)
|
||||||
{
|
{
|
||||||
if (_currentChunk==null){
|
if (_currentChunk == null) {
|
||||||
Console.WriteLine(err+"\nPress Enter");
|
Console.WriteLine(err + "\nPress Enter");
|
||||||
Console.ReadLine();
|
Console.ReadLine();
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
@ -523,7 +524,7 @@ namespace parseManagerCS
|
|||||||
return tempReturn;
|
return tempReturn;
|
||||||
} else {
|
} else {
|
||||||
var b = GetFlag("strictsyntax");
|
var b = GetFlag("strictsyntax");
|
||||||
if (b){
|
if (b) {
|
||||||
PushError("INVALID SYNTAX!");
|
PushError("INVALID SYNTAX!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -802,7 +803,7 @@ namespace parseManagerCS
|
|||||||
temp = _lines[i];
|
temp = _lines[i];
|
||||||
var pureLine = Regex.Match(temp, "^\"(.+)\"");
|
var pureLine = Regex.Match(temp, "^\"(.+)\"");
|
||||||
var FuncTest = Regex.Match(temp, @"([a-zA-Z0-9_]+)\s?\((.*)\)");
|
var FuncTest = Regex.Match(temp, @"([a-zA-Z0-9_]+)\s?\((.*)\)");
|
||||||
var assignment = Regex.Match(temp, "^([a-zA-Z0-9_,\\[\\]\"]+)\\s*=([a-zA-Z\\s\\|&\\^\\+\\-\\*/%0-9_\",\\[\\]]*)");
|
var assignment = Regex.Match(temp, "^([a-zA-Z0-9_,\\[\\]\"]+)\\s*=\\s*(.+)");
|
||||||
var FuncWReturn = Regex.Match(temp, "([\\[\\]\"a-zA-Z0-9_,]+)\\s?=\\s?([a-zA-Z0-9_]+)\\s?\\((.*)\\)");
|
var FuncWReturn = Regex.Match(temp, "([\\[\\]\"a-zA-Z0-9_,]+)\\s?=\\s?([a-zA-Z0-9_]+)\\s?\\((.*)\\)");
|
||||||
var FuncWOReturn = Regex.Match(temp, @"^([a-zA-Z0-9_]+)\s?\((.*)\)");
|
var FuncWOReturn = Regex.Match(temp, @"^([a-zA-Z0-9_]+)\s?\((.*)\)");
|
||||||
var label = Regex.Match(temp, "::(.*)::");
|
var label = Regex.Match(temp, "::(.*)::");
|
||||||
@ -875,9 +876,10 @@ namespace parseManagerCS
|
|||||||
_compiledlines.Add(new CMD("LINE", new object[]{ pureLine.ToString() }));
|
_compiledlines.Add(new CMD("LINE", new object[]{ pureLine.ToString() }));
|
||||||
} else if (assignment.ToString() != "") {
|
} else if (assignment.ToString() != "") {
|
||||||
var vars = GLOBALS.Split(assignment.Groups[1].ToString());
|
var vars = GLOBALS.Split(assignment.Groups[1].ToString());
|
||||||
|
Console.WriteLine(assignment.Groups[2]);
|
||||||
var tabTest = assignment.Groups[2].ToString();
|
var tabTest = assignment.Groups[2].ToString();
|
||||||
string[] vals = GLOBALS.Split(tabTest);
|
string[] vals = GLOBALS.Split(tabTest);
|
||||||
//vals = Regex.Split(assignment.Groups[2].ToString(), ",(?=(?:[^\"'\\[\\]]*[\"'\\[\\]][^\"'\\[\\]]*[\"'\\[\\]])*[^\"'\\[\\]]*$)");
|
//string[] vals = Regex.Split(assignment.Groups[2].ToString(), ",(?=(?:[^\"'\\[\\]]*[\"'\\[\\]][^\"'\\[\\]]*[\"'\\[\\]])*[^\"'\\[\\]]*$)");
|
||||||
_compiledlines.Add(new CMD("ASSIGN", new object[]{ vars, vals }));
|
_compiledlines.Add(new CMD("ASSIGN", new object[]{ vars, vals }));
|
||||||
} else {
|
} else {
|
||||||
_compiledlines.Add(new CMD("UNKNOWN", new object[]{ }));
|
_compiledlines.Add(new CMD("UNKNOWN", new object[]{ }));
|
||||||
@ -941,9 +943,9 @@ namespace parseManagerCS
|
|||||||
}
|
}
|
||||||
public string GetCurrentLine()
|
public string GetCurrentLine()
|
||||||
{
|
{
|
||||||
string temp="";
|
string temp = "";
|
||||||
if (_pos == 0) {
|
if (_pos == 0) {
|
||||||
temp = _lines[_pos+2];
|
temp = _lines[_pos + 2];
|
||||||
} else {
|
} else {
|
||||||
temp = _lines[_pos - 1];
|
temp = _lines[_pos - 1];
|
||||||
}
|
}
|
||||||
@ -1000,7 +1002,7 @@ namespace parseManagerCS
|
|||||||
} else if (!double.IsNaN(temp2)) {
|
} else if (!double.IsNaN(temp2)) {
|
||||||
str = str.Replace(m.Groups[0].Value, temp2.ToString());
|
str = str.Replace(m.Groups[0].Value, temp2.ToString());
|
||||||
} else {
|
} else {
|
||||||
PM.PushError("Variable \""+m.Groups[0].Value+"\" does not exist: ");
|
return double.NaN;//PM.PushError("Variable \"" + m.Groups[0].Value + "\" does not exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
double result;
|
double result;
|
||||||
@ -1221,7 +1223,8 @@ namespace parseManagerCS
|
|||||||
{
|
{
|
||||||
return _current;
|
return _current;
|
||||||
}
|
}
|
||||||
public static parseManager GetMainPM(){
|
public static parseManager GetMainPM()
|
||||||
|
{
|
||||||
return _main;
|
return _main;
|
||||||
}
|
}
|
||||||
public static bool GetFlag(string flag)
|
public static bool GetFlag(string flag)
|
||||||
@ -1335,7 +1338,7 @@ public class standardDefine
|
|||||||
}
|
}
|
||||||
public void _newThread(parseManager PM, string filename)
|
public void _newThread(parseManager PM, string filename)
|
||||||
{
|
{
|
||||||
var thread = new Thread(() => _THREAD(PM,filename));
|
var thread = new Thread(() => _THREAD(PM, filename));
|
||||||
thread.Start();
|
thread.Start();
|
||||||
}
|
}
|
||||||
public void _THREAD(parseManager _PM, string filename)
|
public void _THREAD(parseManager _PM, string filename)
|
||||||
@ -1420,6 +1423,9 @@ public class standardDefine
|
|||||||
temp.SetParent(PM.GetENV());
|
temp.SetParent(PM.GetENV());
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
public string repeat(parseManager PM,string str, double n){
|
||||||
|
return string.Concat(Enumerable.Repeat(str, (int)n));
|
||||||
|
}
|
||||||
public string getInput(parseManager PM)
|
public string getInput(parseManager PM)
|
||||||
{
|
{
|
||||||
return Console.ReadLine();
|
return Console.ReadLine();
|
||||||
@ -1633,13 +1639,16 @@ public class standardDefine
|
|||||||
PM.PushError(e.Message);
|
PM.PushError(e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void setWindowSize(parseManager PM, double x,double y){
|
public void setWindowSize(parseManager PM, double x, double y)
|
||||||
Console.SetWindowSize((int)x,(int)y);
|
{
|
||||||
|
Console.SetWindowSize((int)x, (int)y);
|
||||||
}
|
}
|
||||||
public double getConsoleWidth(parseManager PM){
|
public double getConsoleWidth(parseManager PM)
|
||||||
|
{
|
||||||
return Console.WindowWidth;
|
return Console.WindowWidth;
|
||||||
}
|
}
|
||||||
public double getConsoleHeight(parseManager PM){
|
public double getConsoleHeight(parseManager PM)
|
||||||
|
{
|
||||||
return Console.WindowHeight;
|
return Console.WindowHeight;
|
||||||
}
|
}
|
||||||
public bool isDown(parseManager PM, string key)
|
public bool isDown(parseManager PM, string key)
|
||||||
|
|||||||
@ -38,6 +38,9 @@
|
|||||||
<Reference Include="NAudio">
|
<Reference Include="NAudio">
|
||||||
<HintPath>..\packages\NAudio.1.8.2\lib\net35\NAudio.dll</HintPath>
|
<HintPath>..\packages\NAudio.1.8.2\lib\net35\NAudio.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="OpenTK">
|
||||||
|
<HintPath>..\packages\OpenTK.1.1.2349.61993\lib\NET40\OpenTK.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="PresentationCore">
|
<Reference Include="PresentationCore">
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user