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) ")" -&...
Kirchner asked 9/8, 2014 at 17:29

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'] {...
Franklinfranklinite asked 28/1, 2016 at 17:50

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 ...
Bughouse asked 8/12, 2014 at 3:19

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...
Stumble asked 27/11, 2014 at 22:10

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...
Juliannjulianna asked 26/4, 2011 at 16:56

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...
Progenitive asked 15/3, 2011 at 16:17

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...
Blagoveshchensk asked 4/12, 2010 at 0:11

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.