<cyanure>
Hi, I'm trying to build a ocaml program with menhir and ocamlbuild but it keeps failing, what is the simplest way to call the main function of the parser (on a full file) from the caml prog
mnabil has joined #ocaml
<thelema>
Lexing.from_string s |> Ns_yac.pred Ns_lex.pred_token
<thelema>
this parses a string. there's likely a lexing.from_file or channel for you
munga has quit [Ping timeout: 240 seconds]
LeNsTR has quit [Quit: LeNsTR]
napping has quit [Quit: leaving]
<cyanure>
thelema, thx i found Lexing.from_channel (open_in ...)
lpereira has quit [Quit: Leaving.]
oriba has quit [Quit: Verlassend]
BiDOrD has quit [Ping timeout: 240 seconds]
cyanure has quit [Quit: Quitte]
mnabil has quit [Read error: Connection reset by peer]
mnabil has joined #ocaml
mnabil has quit [Remote host closed the connection]
smerz has quit [Remote host closed the connection]
smerz has joined #ocaml
alexyk has joined #ocaml
BiDOrD has joined #ocaml
Edward__ has quit []
alexyk has quit [Quit: alexyk]
ymasory_ has joined #ocaml
rks has quit [Ping timeout: 240 seconds]
rks has joined #ocaml
rks has quit [Ping timeout: 276 seconds]
rks has joined #ocaml
Fullma has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
_unK has joined #ocaml
drunK has quit [Ping timeout: 260 seconds]
Amorphous has quit [Ping timeout: 272 seconds]
Amorphous has joined #ocaml
decaf has left #ocaml []
_unK has quit [Remote host closed the connection]
jamii has joined #ocaml
eye-scuzzy has quit [Ping timeout: 240 seconds]
eye-scuzzy has joined #ocaml
itegebo has joined #ocaml
itegebo has quit [Remote host closed the connection]
<jamii>
although i would put a space in here: string_of_float (c1+.c2)
<lewis1711>
oh yes
<lewis1711>
was mainly wondering about indenting after the match stuff
<lewis1711>
http://paste.pocoo.org/show/320902/ at the bottom here, -> Var;; expects an argument of course. how can I give it an argument from the pattern?
<lewis1711>
(oops the top definition for Var should use chars, not strings
<lewis1711>
)
<mrvn>
Line 13 should be -> Printf.sprintf "'%c'" v
<mrvn>
and your expr_of_string needs a parser
<mrvn>
ah, forget the first.
<mrvn>
You should look into the examples for streams or yacc