ocamllex Questions
2
My OCaml .ml code looks like this:
open Str
let idregex = Str.regexp ['a'-'z' 'A'-'Z']+ ['a'-'z' 'A'-'Z' '0'-'9' '_']*;
let evalT (x,y) = (match x with
Str.regexp "Id(" (idregex as var) ")" -&...
2
Solved
Is there a way to have case in-sensitive token in Ocamllex specification?
I already tried to make case in-sensitive token in this way:
let token = parser
...
| ['C''c']['A''a']['S''s']['E''e'] {...
1
I am writing a small parser with Menhir + Ocamllex and I have two requirements I cannot seem to meet at the same time
I would like to keep parsing after an error (to report more errors).
I would ...
1
Solved
I'm using ocamllex to write a lexer for a scripting language but I am facing a conflict with my rule for comments.
I want to allow my command arguments to be unquoted as long as they only contai...
1
Solved
I'm trying to follow Appel's "Modern Compiler Implementation in ML" and am writing the lexer using Ocamllex.
The specification asks for the lexer to return strings after translating escape sequenc...
1
Solved
I am messing around writing a toy programming language in OCaml with ocamllex, and was trying to make the language sensitive to indentation changes, python-style, but am having a problem matching t...
1
Solved
I've been working on a Lua fslex lexer in my spare time, using the ocamllex manual as a reference.
I hit a few snags while trying to tokenize long strings correctly. "Long strings" are delimited b...
1
Solved
Is there any way to return multiple tokens in OCamlLex?
I'm trying to write a lexer and parser for an indentation based language, and I would like my lexer to return multiple DEDENT tokens when i...
Booted asked 9/8, 2010 at 6:42
1
© 2022 - 2024 — McMap. All rights reserved.