You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
788 B

using System;
using System.IO;
namespace SuperBASIC
{
class Program
{
static void Main(string[] args)
{
try
{
Library lib = new Library();
lib.AddFunction(new Functions.MemoryLoad(), 1, "MEMLOAD");
lib.AddFunction(new Functions.MemoryStore(), 2, "MEMSTORE");
lib.AddFunction(new Functions.Print(), 1, "PRINT");
lib.AddFunction(new Functions.Multiply(), 2, "MULTIPLY");
lib.AddFunction(new Functions.Compare(), 2, "COMPARE");
lib.AddFunction(new Functions.Pi(), 0, "PI");
lib.AddFunction(new Functions.Euler(), 0, "EULER");
Runtime r = new Runtime(lib);
r.OpenFile(Directory.GetCurrentDirectory() + "\\Test.basic");
r.Run();
} catch (Parser.ParseException e)
{
Console.WriteLine($"Parsing failed:\n{e}");
}
}
}
}