Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rishit7/ocamlbasedlexer-parser
A Simple Lexer and Parser written in Ocamllex and Menhir
https://github.com/rishit7/ocamlbasedlexer-parser
menhir ocaml ocamllex
Last synced: 3 months ago
JSON representation
A Simple Lexer and Parser written in Ocamllex and Menhir
- Host: GitHub
- URL: https://github.com/rishit7/ocamlbasedlexer-parser
- Owner: RISHIT7
- Created: 2024-02-16T12:20:33.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-24T12:46:33.000Z (8 months ago)
- Last Synced: 2024-10-12T21:21:04.594Z (3 months ago)
- Topics: menhir, ocaml, ocamllex
- Language: OCaml
- Homepage:
- Size: 14.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](#features)
## 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.