ocamlyacc Questions

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 trying to parse a language where the operators have a dynamic attributes (priority and precedence) using the Menhir parser (similar to Ocamlyacc). During the lexing phase, all the operators fil...
Vaginismus asked 1/7, 2012 at 16:8

3

Solved

Is it possible to feed an OCamlYacc-generated parser an explicit token list for analysis? I'd like to use OCamlLex to explicitly generate a token list which I then analyze using a Yacc-generated ...
Lyford asked 5/6, 2012 at 14:49

3

Solved

I'm OCaml newbie and I'm trying to write a simple OCaml-like grammar, and I can't figure this out. My grammar allows something like this: let sub = fun x -> fun y -> x - y;; However, if I ...
Vaunting asked 17/5, 2010 at 7:53

3

Solved

I have a type expr in an expr.ml file. In parser.mly (OCamlyacc file), I define the expr rule and give the type : %start expr %type <expr> expr However, I get : File "parser.mli", line...
Cecillececily asked 15/6, 2011 at 15:1

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

3

Solved

I'm using ocamlyacc and ocamllex. I have an error production in my grammar that signals a custom exception. So far, I can get it to report the error position: | error { raise (Parse_failure (strin...
Phylactery asked 19/12, 2009 at 14:56
1

© 2022 - 2024 — McMap. All rights reserved.