From 02b3792e08a20f2f5d75babf96e886708cdc222d Mon Sep 17 00:00:00 2001 From: SinusFox Date: Thu, 8 Jun 2023 15:26:01 +0200 Subject: [PATCH] first steps of the lexer --- Exercise 5/Lexer.java | 9 +++++++++ Exercise 5/LexerTestApp.java | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 Exercise 5/Lexer.java create mode 100644 Exercise 5/LexerTestApp.java diff --git a/Exercise 5/Lexer.java b/Exercise 5/Lexer.java new file mode 100644 index 0000000..d42595e --- /dev/null +++ b/Exercise 5/Lexer.java @@ -0,0 +1,9 @@ +public class Lexer { + Lexer(String src_in) { + System.out.println(src_in); + } + + public void run() { + System.out.println("Lexer runs."); + } +} diff --git a/Exercise 5/LexerTestApp.java b/Exercise 5/LexerTestApp.java new file mode 100644 index 0000000..0fe0208 --- /dev/null +++ b/Exercise 5/LexerTestApp.java @@ -0,0 +1,9 @@ +public class LexerTestApp { + public static void main(String[] Args) { + // Meldung bei Programmaufruf + System.out.println("Lexer Test App."); + + Lexer this_Lexer = new Lexer("index = 2 * count + 42;"); + this_Lexer.run(); + } +}