[RDBMS with zig] - Lexer
Zig의 allocator와 comptime에 대한 이해를 더하기 위해, facebook의 RocksDB를 기반으로 하는 RDBMS를 구성한다. 가장 먼저 SQL문을 분해하고 분류하는 Lexer를 제작한다. 모든 코드는 https://notes.eatonphil.com/zigrocks-sql.html 레포지토리를 기반으로 하며, 추가적인 기능을 구현하는 내용을 포함한다. Ready for 일단 가독성 및 효율성을 위한 유틸리티를 제작한다. pub const String = []const u8; pub const Error = String; pub fn Result(comptime T: type) type { return union(enum) { val: T, err: Error, }; } Lexer Lexer는 SQL문을 분석하는 도구를 말한다....