From 7a8d2bcd75d88a5429937bf551878c55e1dcf0fd Mon Sep 17 00:00:00 2001
From: Melodi <62381002+Melodi17@users.noreply.github.com>
Date: Wed, 6 Aug 2025 22:36:34 +1000
Subject: moved everything to seperate projects, and started compiler work +
push and pop instructions added
---
Compiler/gen/CGrammarVisitor.cs | 200 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 200 insertions(+)
create mode 100644 Compiler/gen/CGrammarVisitor.cs
(limited to 'Compiler/gen/CGrammarVisitor.cs')
diff --git a/Compiler/gen/CGrammarVisitor.cs b/Compiler/gen/CGrammarVisitor.cs
new file mode 100644
index 0000000..1f9691a
--- /dev/null
+++ b/Compiler/gen/CGrammarVisitor.cs
@@ -0,0 +1,200 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// ANTLR Version: 4.13.2
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+// Generated from /Users/melodidey/Source/csharp/Q1/Compiler/CGrammar.g4 by ANTLR 4.13.2
+
+// Unreachable code detected
+#pragma warning disable 0162
+// The variable '...' is assigned but its value is never used
+#pragma warning disable 0219
+// Missing XML comment for publicly visible type or member '...'
+#pragma warning disable 1591
+// Ambiguous reference in cref attribute
+#pragma warning disable 419
+
+using Antlr4.Runtime.Misc;
+using Antlr4.Runtime.Tree;
+using IToken = Antlr4.Runtime.IToken;
+
+///
+/// This interface defines a complete generic visitor for a parse tree produced
+/// by .
+///
+/// The return type of the visit operation.
+[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")]
+[System.CLSCompliant(false)]
+public interface ICGrammarVisitor : IParseTreeVisitor {
+ ///
+ /// Visit a parse tree produced by .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitProgram([NotNull] CGrammarParser.ProgramContext context);
+ ///
+ /// Visit a parse tree produced by .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitFunction([NotNull] CGrammarParser.FunctionContext context);
+ ///
+ /// Visit a parse tree produced by the returnStatement
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitReturnStatement([NotNull] CGrammarParser.ReturnStatementContext context);
+ ///
+ /// Visit a parse tree produced by the bitwiseXorExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitBitwiseXorExpression([NotNull] CGrammarParser.BitwiseXorExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the constantExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitConstantExpression([NotNull] CGrammarParser.ConstantExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the lessThanOrEqualExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitLessThanOrEqualExpression([NotNull] CGrammarParser.LessThanOrEqualExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the modulusExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitModulusExpression([NotNull] CGrammarParser.ModulusExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the notExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitNotExpression([NotNull] CGrammarParser.NotExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the notEqualExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitNotEqualExpression([NotNull] CGrammarParser.NotEqualExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the multiplyExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitMultiplyExpression([NotNull] CGrammarParser.MultiplyExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the greaterThanExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitGreaterThanExpression([NotNull] CGrammarParser.GreaterThanExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the logicalOrExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitLogicalOrExpression([NotNull] CGrammarParser.LogicalOrExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the greaterThanOrEqualExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitGreaterThanOrEqualExpression([NotNull] CGrammarParser.GreaterThanOrEqualExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the divideExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitDivideExpression([NotNull] CGrammarParser.DivideExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the bitwiseOrExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitBitwiseOrExpression([NotNull] CGrammarParser.BitwiseOrExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the parenthesizedExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitParenthesizedExpression([NotNull] CGrammarParser.ParenthesizedExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the addExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitAddExpression([NotNull] CGrammarParser.AddExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the subtractExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitSubtractExpression([NotNull] CGrammarParser.SubtractExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the bitwiseAndExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitBitwiseAndExpression([NotNull] CGrammarParser.BitwiseAndExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the lessThanExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitLessThanExpression([NotNull] CGrammarParser.LessThanExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the logicalAndExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitLogicalAndExpression([NotNull] CGrammarParser.LogicalAndExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the invertExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitInvertExpression([NotNull] CGrammarParser.InvertExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the equalExpression
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitEqualExpression([NotNull] CGrammarParser.EqualExpressionContext context);
+ ///
+ /// Visit a parse tree produced by the intConstant
+ /// labeled alternative in .
+ ///
+ /// The parse tree.
+ /// The visitor result.
+ Result VisitIntConstant([NotNull] CGrammarParser.IntConstantContext context);
+}
--
cgit v1.3.1