Skip to content

Instantly share code, notes, and snippets.

@DaemonOverlord
Last active February 21, 2016 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaemonOverlord/a605b1ddf3185b0406fb to your computer and use it in GitHub Desktop.
Save DaemonOverlord/a605b1ddf3185b0406fb to your computer and use it in GitHub Desktop.
Wolf.cs is an extremely simple parse I wrote. It's currently a work in progress because I plan on redoing it with the workload put onto the code and not the programmer.
using System;
namespace Wolf
{
public class Pack {
internal static string input { get; set; }
public static string[] parsed { get; internal set; }
public static int count { get; internal set; }
public static int entries { get; internal set; }
}
public class Parser {
public static void Parse(string input) {
Pack.input = input;
Pack.parsed = Pack.input.Split (' ');
Pack.count = Pack.parsed.Length;
Pack.entries = Pack.parsed.Length - 1;
}
public class Parsed {
public string Entry (int number) {
return Pack.parsed [0 + number];
}
public string Initial() {
return Pack.parsed [0];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment