mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
<danderson> how do I specify multiple patterns to assign to the same action in a match x with construct?
<Smerdyakov> | binary pattern constructor
<danderson> eg. I'd like to fold [] -> false | [_] -> false into a single <both patterns> -> false
<bluestorm> ([] | [_]) -> false ?
<Smerdyakov> Try and see.
<Smerdyakov> Oh, bluestorm said that.
<bluestorm> most of the time ( ) are useless here
<bluestorm> hm
<danderson> wow, that was really obvious, now that I know it.
<danderson> Thanks.
<bluestorm> you can even bind values to identifiers in these, provided that you bind the same identifiers in each branch
<bluestorm> (([], x) | (x, [])) -> ... will work as excepted)
<danderson> right. As ocaml told me when I tried to match ([] | [x]) instead of ([] | [_])
seafoodX has joined #ocaml
crabstick has joined #ocaml
crabstick_ has quit [Read error: 110 (Connection timed out)]
bluestorm has quit ["Konversation terminated!"]
buluca has quit ["Leaving."]
mr_hugo has left #ocaml []
joshcryer has quit [Read error: 104 (Connection reset by peer)]
joshcryer has joined #ocaml
CRathman has joined #ocaml
|Jedai| has quit ["KVIrc 3.2.6 Anomalies http://www.kvirc.net/"]
CRathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
szsz has joined #ocaml
kelaouch1 has joined #ocaml
kelaouchi has quit [Read error: 110 (Connection timed out)]
crabstick has quit []
Smerdyakov has quit ["Leaving"]
Cygaal has joined #ocaml
schme`` has joined #ocaml
Cygaal has quit [Remote closed the connection]
ktne has joined #ocaml
schme` has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
ktne has quit []
Cygaal has joined #ocaml
Cygaaal has joined #ocaml
schme`` is now known as schme
Cygaal has quit [No route to host]
Cygaaal has quit [Read error: 104 (Connection reset by peer)]
Tetsuo has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 113 (No route to host)]
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
G has quit [Read error: 110 (Connection timed out)]
seafoodX has quit []
G has joined #ocaml
love-pingoo has joined #ocaml
seafoodX has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
seafoodX_ has joined #ocaml
lde has joined #ocaml
seafoodX_ has quit []
seafoodX has quit [Read error: 110 (Connection timed out)]
fnf has joined #ocaml
fnf has left #ocaml []
seafoodX has joined #ocaml
Zzompp has quit [Read error: 104 (Connection reset by peer)]
jedai has joined #ocaml
lde has quit [Remote closed the connection]
lde has joined #ocaml
seafoodX has quit []
ygrek has joined #ocaml
haelix has joined #ocaml
ulfdoz has quit [Remote closed the connection]
ulfdoz has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
ygrek has quit [Remote closed the connection]
jedai has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
crathman has joined #ocaml
diakopter has joined #ocaml
crathman has quit [Client Quit]
piggybox_ has joined #ocaml
buluca has joined #ocaml
piggybox has quit [Connection timed out]
pango has quit [Remote closed the connection]
love-pingoo has quit ["Connection reset by pear"]
piggybox__ has joined #ocaml
pango has joined #ocaml
ygrek has joined #ocaml
gunark has joined #ocaml
Smerdyakov has joined #ocaml
piggybox_ has quit [Connection timed out]
piggybox has joined #ocaml
Mr_Awesome has quit [Connection timed out]
piggybox__ has quit [Connection timed out]
ygrek has quit [Remote closed the connection]
jedai has joined #ocaml
EliasAmaral has quit [Remote closed the connection]
ygrek has joined #ocaml
Hadaka has quit [heinlein.freenode.net irc.freenode.net]
Demitar has quit [heinlein.freenode.net irc.freenode.net]
ulfdoz has quit [heinlein.freenode.net irc.freenode.net]
tty56 has quit [heinlein.freenode.net irc.freenode.net]
oracle1 has quit [heinlein.freenode.net irc.freenode.net]
smkl has quit [heinlein.freenode.net irc.freenode.net]
danderson has quit [heinlein.freenode.net irc.freenode.net]
flux has quit [heinlein.freenode.net irc.freenode.net]
TFK has quit [heinlein.freenode.net irc.freenode.net]
ulfdoz has joined #ocaml
Demitar has joined #ocaml
tty56 has joined #ocaml
oracle1 has joined #ocaml
TFK has joined #ocaml
danderson has joined #ocaml
Hadaka has joined #ocaml
flux has joined #ocaml
smkl has joined #ocaml
love-pingoo has joined #ocaml
crabstick has joined #ocaml
dmentre has joined #ocaml
gmh33 has joined #ocaml
gmh33 has left #ocaml []
ktne has joined #ocaml
buluca has quit [No route to host]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
buluca has joined #ocaml
ktne has quit []
ygrek has quit [Remote closed the connection]
buluca has quit [Read error: 113 (No route to host)]
li` has joined #ocaml
bpalmer has quit ["ERC Version 5.1.2 $Revision: 1.796.2.6 $ (IRC client for Emacs)"]
Dark-Side has joined #ocaml
<Dark-Side> hello
Mr_Awesome has joined #ocaml
li` has left #ocaml []
dmentre has left #ocaml []
<fremo> what's the way to get the location (line) of a grammatical error using ocamlyacc ?
<fremo> passing location in tokens ?
<fremo> it's not possible to share a reference between parser and lexer ?
<fremo> (in an other way than in a token :)
<fremo> maybe by passing the reference when I call the parser and the lexer...
<Smerdyakov> Oh, it's painful.
<Smerdyakov> I found a tutorial that shows you how.
<Smerdyakov> You have to access a parsing or lexing structure and set handler functions.
<Smerdyakov> Maybe I was wrong on the details, but one effective kind of voodoo is described here: http://plus.kaist.ac.kr/~shoh/ocaml/ocamllex-ocamlyacc/ocamlyacc-tutorial/sec-tracking-locations.html
<Smerdyakov> Then there are the stateful position functions in the Parsing module to access the record that you maintain in your lexer.
ShockSMX has quit [Client Quit]
<fremo> nice, thank you, I had lost this link, and some good informations in the Parser doc page, of course :)
ShockSMX has joined #ocaml
Tetsuo has quit ["Leaving"]
seafoodX has joined #ocaml
Dark-Side has quit [Remote closed the connection]
cpst has quit [Read error: 110 (Connection timed out)]
love-pingoo has quit [heinlein.freenode.net irc.freenode.net]
piggybox has quit [heinlein.freenode.net irc.freenode.net]
seafood has quit [heinlein.freenode.net irc.freenode.net]
love-pingoo has joined #ocaml
piggybox has joined #ocaml
seafood has joined #ocaml
love-pingoo has quit [heinlein.freenode.net irc.freenode.net]
love-pingoo has joined #ocaml