Commit graph

13 commits

Author SHA1 Message Date
Petar Kapriš 225a2b13ea Move lexer back into main package with updated go.mod 2025-01-22 19:28:38 +01:00
Petar Kapriš 6ac4a512c2 Add intended grammar for expression syntax 2025-01-22 19:25:47 +01:00
Petar Kapriš 9e1ef93990 Add modulo operators to lexer
Tokens MODULO and SLASH_MODULO are going to represent the modulo and
fmod operations on integers and floats, or return a pair with the
divisor and the modulo, respectively.
2025-01-22 19:25:10 +01:00
Petar Kapriš 4178bfefea Add reverse polish notation printer for AST
This is meant to complete chapter 5 challenge 3.
2025-01-22 19:24:34 +01:00
Petar Kapriš a647c39ec4 Uncomment main function 2025-01-22 19:24:03 +01:00
Petar Kapriš c6bde606d6 Add text challenges for end of chapter 5 2025-01-22 19:23:42 +01:00
Petar Kapriš 475b155228 Add and test abstract syntax tree data type 2024-11-25 22:54:27 +01:00
Petar Kapriš e4733b20a6 Move lexer and Error into separate packages 2024-11-25 22:54:23 +01:00
Petar Kapriš c102b47e9a Create tools package directory 2024-11-25 22:53:29 +01:00
Petar Kapriš b214affe1e fixup gitignore 2024-11-25 22:53:29 +01:00
Petar Kapriš 236172c9c5 Add support for nested C-style comments 2024-11-25 22:53:29 +01:00
Petar Kapriš 9f3ab157eb Add gitignore 2024-11-25 22:53:29 +01:00
Petar Kapriš 7f72ba59d5 Initial commit: completed simple lexer for pj1 2024-11-25 22:53:29 +01:00