OCaml Lexer for Toy Language
Welcome to the OCaml Lexer repository! This project implements a lexer for a simple toy language using OCaml. The goal is to demonstrate how to build a lexer for a toy language and showcase the expressive power of OCaml.
Table of Contents
Features
-
Tokenization: The lexer tokenizes the source code of a simple toy language, identifying various types of tokens such as keywords, identifiers, numbers, operators, and punctuation.
-
Configurable: Customize the lexer's token rules or add support for additional tokens with ease.
-
Error Handling: Detects unrecognized tokens and unexpected inputs, providing helpful error messages.
-
Performance: Designed for efficiency, the lexer processes input code quickly and with minimal overhead.