OSDN Git Service

Added NT-Basic for the sample program.
[kozos-expbrd/kozos_expbrd.git] / firm / sample / simple_mp3_player / target / os / ntbasic / error.h
diff --git a/firm/sample/simple_mp3_player/target/os/ntbasic/error.h b/firm/sample/simple_mp3_player/target/os/ntbasic/error.h
new file mode 100644 (file)
index 0000000..ea602bf
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * @file error.h
+ * @author Shinichiro Nakamura
+ */
+
+/*
+ * ===============================================================
+ * "Natural Tiny Basic (NT-Basic)"
+ * "A tiny BASIC interpreter"
+ * ---------------------------------------------------------------
+ * Error message module
+ * ===============================================================
+ * Copyright (c) 2012 Shinichiro Nakamura
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ * ===============================================================
+ */
+
+#ifndef ERROR_H
+#define ERROR_H
+
+#include "core.h"
+
+typedef enum {
+    SyntaxError = 0,
+    UnbalancedParentheses = 1,
+    NoExpressionPresent = 2,
+    EqualsSignExpected = 3,
+    NotAVariable = 4,
+    LabelTableFull = 5,
+    DuplicateLabel = 6,
+    UndefinedLabel = 7,
+    THENExpected = 8,
+    TOExpected = 9,
+    TooManyNestedFORLoops = 10,
+    NEXTWithoutFOR = 11,
+    TooManyNestedGOSUBs = 12,
+    RETURNWithoutGOSUB = 13,
+} ntbasic_error_t;
+
+void error_message(core_t *core, ntbasic_error_t error);
+
+#endif
+