summaryrefslogtreecommitdiff
path: root/Shenanigans/src
diff options
context:
space:
mode:
Diffstat (limited to 'Shenanigans/src')
-rw-r--r--Shenanigans/src/org/archphantom/shenanigans/parser/ShenaniganParser.scala50
1 files changed, 0 insertions, 50 deletions
diff --git a/Shenanigans/src/org/archphantom/shenanigans/parser/ShenaniganParser.scala b/Shenanigans/src/org/archphantom/shenanigans/parser/ShenaniganParser.scala
deleted file mode 100644
index e413a03..0000000
--- a/Shenanigans/src/org/archphantom/shenanigans/parser/ShenaniganParser.scala
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.archphantom.shenanigans.parser
-/*
-import org.archphantom.shenanigans.elements.expressions._
-import org.archphantom.shenanigans.elements.expressions.statements._
-import org.archphantom.shenanigans.elements.values._
-import scala.util.parsing.combinator._
-import scala.util.parsing.combinator.lexical.StdLexical
-import scala.util.parsing.combinator.syntactical.StandardTokenParsers
-import org.archphantom.shenanigans.elements.expressions.operations._
-
-object ShenaniganParser extends StandardTokenParsers {
- override val lexical = new ShenaniLexer
-
- def parse (input : String) {
-
- }
-
- def boolean : Parser[BoolValue] = ("true" | "false") ^^ {
- s => new BoolValue(s.toBoolean)
- }
-
- def string : Parser[Array] = stringLit ^^ {
- s => new Array(s)
- }
-
- def double : Parser[DecimalValue] = numericLit ^^ {
- s => new DecimalValue(s)
- }
-
- def int : Parser[IntValue] = """\-?[0-9]+""".r ^^ {
- s => new IntValue(s)
- }
-
- def parens : Parser[Expression] = "(" ~> expr <~ ")"
-
- def unaryMinus:Parser[Subtraction] = "-" ~> expr ^^ { new Subtraction(new IntValue(0), expr) }
-
- def literal : Parser[Value] = boolean | string | double | int
-
- def variable : Parser[Variable] = """[a-zA-Z_]([\w\.]*\w)?""".r ^^ {
- s => new Variable(s)
- }
-
- def expr = literal | variable
-
-}
-
-class ShenaniLexer extends StdLexical {
-
-}*/ \ No newline at end of file