10000 Add Miso.Util.Lexer by dmjio · Pull Request #972 · dmjio/miso · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Miso.Util.Lexer #972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
Merged

Add Miso.Util.Lexer #972

merged 1 commit into from
Jun 6, 2025

Conversation

dmjio
Copy link
Owner
@dmjio dmjio commented Jun 6, 2025

Adds a lexer that operates on MisoString in Utils/ submodules. This employs the "maximal munch" rule, as seen in the Alternative instance

  • Adds Lexer Monad that operates on MisoString
  • Adds combinators for char and string (using MisoString), and helpers oneOf, etc.

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.

Adds a lexer that operates on MisoString in Utils/ submodules.

- [x] Adds Lexer type that operates on `MisoString`
- [x] Adds combinators for `char` and `string` (using `MisoString`)

This will be useful for creating lexers, parsers, and QQs, that
operate on HTML (jsx-esque), CSS, URIs.
dmjio added a commit that referenced this pull request Jun 6, 2025
Builds on `Miso.Util.Lexer` in #972

Adds a parser that operates on `[token]` in `Utils/` submodules. This
is based on the classic Hutton Monadic Parser combinator formulation.

- [x] Adds `Parser` `Monad`
- [x] Adds combinators for parsing, `satisfy`, `sepBy`, `peek`, `oneOf`
- [x] Adjusts some shadowing in `Miso.Util.Lexer`

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.
dmjio added a commit that referenced this pull request Jun 6, 2025
Builds on `Miso.Util.Lexer` in #972

Adds a parser that operates on `[token]` in `Utils/` submodules. This
is based on the classic Hutton Monadic Parser combinator formulation.

- [x] Adds `Parser` `Monad`
- [x] Adds combinators for parsing, `satisfy`, `sepBy`, `peek`, `oneOf`
- [x] Adjusts some shadowing in `Miso.Util.Lexer`

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.
@dmjio dmjio mentioned this pull request Jun 6, 2025
3 tasks
dmjio added a commit that referenced this pull request Jun 6, 2025
Builds on `Miso.Util.Lexer` in #972

Adds a parser that operates on `[token]` in `Utils/` submodules. This
is based on the classic Hutton Monadic Parser combinator formulation.

- [x] Adds `Parser` `Monad`
- [x] Adds combinators for parsing, `satisfy`, `sepBy`, `peek`, `oneOf`
- [x] Adjusts some shadowing in `Miso.Util.Lexer`

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.
dmjio added a commit that referenced this pull request Jun 6, 2025
Builds on `Miso.Util.Lexer` in #972

Adds a parser that operates on `[token]` in `Utils/` submodules. This
is based on the classic Hutton Monadic Parser combinator formulation.

- [x] Adds `Parser` `Monad`
- [x] Adds combinators for parsing, `satisfy`, `sepBy`, `peek`, `oneOf`
- [x] Adjusts some shadowing in `Miso.Util.Lexer`

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.
dmjio added a commit that referenced this pull request Jun 6, 2025
Builds on `Miso.Util.Lexer` in #972

Adds a parser that operates on `[token]` in `Utils/` submodules. This
is based on the classic Hutton Monadic Parser combinator formulation.

- [x] Adds `Parser` `Monad`
- [x] Adds combinators for parsing, `satisfy`, `sepBy`, `peek`, `oneOf`
- [x] Adjusts some shadowing in `Miso.Util.Lexer`

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.
@dmjio dmjio merged commit 9e3f8f5 into master Jun 6, 2025
3 checks passed
@dmjio dmjio deleted the lexer branch June 6, 2025 23:18
dmjio added a commit that referenced this pull request Jun 7, 2025
* Add Miso.Util.Lexer

Adds a lexer that operates on MisoString in Utils/ submodules.

- [x] Adds Lexer type that operates on `MisoString`
- [x] Adds combinators for `char` and `string` (using `MisoString`)

This will be useful for creating lexers, parsers, and QQs, that
operate on HTML (jsx-esque), CSS, URIs.

* Add Miso.Util.Parser

Builds on `Miso.Util.Lexer` in #972

Adds a parser that operates on `[token]` in `Utils/` submodules. This
is based on the classic Hutton Monadic Parser combinator formulation.

- [x] Adds `Parser` `Monad`
- [x] Adds combinators for parsing, `satisfy`, `sepBy`, `peek`, `oneOf`
- [x] Adjusts some shadowing in `Miso.Util.Lexer`

This will be useful for creating lexers, parsers, and QQs, that operate on HTML (jsx-esque), CSS, URIs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0