... You probably forgot to open one of the needed module. If you're using Debian you should have ocaml-findlib installed, I suggest to use it! $ ocaml ...
Hi Stefano, ... [...] ... [...] ... Thank you very much, that's exactly what I was looking for. Cheers, :) Pat...
patrick jayet
jayetp@...
Dec 1, 2005 1:27 pm
5123
Dear friends I am trying to count the memory my program is using. I use Gc module and do like this let stat = Gc.quick_stat in printf "%e" (stat.minor_words +....
Zhifeng Sheng
z.sheng@...
Dec 1, 2005 2:21 pm
5124
... Yes. This is simply a namespace problem. If you have a value "stat" of the type "Gc.stat" and you want to access its field called "minor_words" then you ...
I'm tinkering with ocamllex and was wondering if there is something like ^ for beginning of line as it is in lex because I'd like to check for tokens which...
Hi folks, I've just written a syntax extension, partly to offer a different interface to the Arg module, and partly to learn campl4. I'd appreciate any...
... Sweet. I think you should put it to the OCaml linkdb under "OCaml syntax extension" http://www.npc.de/ocaml/linkdb/ You can also make an announcement to...
I'm trying to reconcile an Ocamlyacc v. Yacc question. using the following Ocamllex file: { exception Eof open Crap_par } rule tokens = parse [' ']+ { tokens...
Joshua Smith wrote: [...] ... [...] ... It seems to me that the former is NOT a translation of the first. The first would rather use EOL as a separator, like...
I checked it too but I found it either, so I guess you have to do it by yourself. Something like: rule count = parse ... what comes after is placed in a new...
main: titles EOF { $1 } ; ... ; title: TITLE QSTRING EOL { $2 } ; what we can see there is that the rule titles is recursive on the left side of its definition...
... { "" } ... It works just fine with that modification. To the other replyers: 1. former = first, so its's hard to follow. 2. titles does have a base case ...
... NOW titles has a base case (the leaf of the abstract synta tree) means the empty case by which the recursion ends and the parser makes a reduce action...
Perhaps I understood what you mean... 1. you can start each file with a new line 2. you can decide that a new line is what there's B4 the '\n' char ending each...
... What do you mean? Nothing will be missed... What is the problem you are tallking about? Ciao, Oliver...
Oliver Bandel
oliver@...
Dec 2, 2005 2:49 pm
5137
On Fri, 2 Dec 2005 11:17:02 +0100 ... Actually I have to do something like this which isn't beautiful: <----- snip ----> { open Printf let bol = ref true } ...
On Fri, 2 Dec 2005 15:41:04 +0100 ... What he is saying is that there is no '\n' in the beginning of a file but nevertheless the beginning of a file is also...
To Oliver, I replied Joaquin who commented that doing so rule count = parse ... He will miss a potential match in the first line of the file. For me sounded...
... Well, it's a bit cleaner (and more useful for error messages tho keep track of line numbers and relative positions in the line (offsets in the buffer)....
... Why should a line-end marker be the beginning of a line?! (The first line is the beginning of a file...) Why should there be the end in the beginning? ... ...
Oliver Bandel
oliver@...
Dec 2, 2005 4:38 pm
5142
... ah, now I understand... something like Perl's m/^text/g; # or similar OK. So first line must be handled differently. What's about using two lexer-rules for...
Oliver Bandel
oliver@...
Dec 2, 2005 4:41 pm
5143
... There shouldn't be. Hence the problem. The original poster, Manfred, wanted a way to match patterns occurring at the beginning of a line. Now, say patt...
Hello, your soulution looks very low-level (in the sense of going down to the basment using a candle for lighting the flowers instead of switching on the...
Oliver Bandel
oliver@...
Dec 2, 2005 5:33 pm
5145
... Well, that's a difference from yacc/bison where it doesn't matter if you have an "action" or not. The pipe is enough. And that makes more sense. Ocamlyacc...
... (I meant: ...switching it on without going down to the basement...)...
Oliver Bandel
oliver@...
Dec 2, 2005 5:45 pm
5147
I really think this way is better in order to pay attantion on and control when and where the ambiguity problem of a grammar turns out. Since to have full...
... I don't follow you here, but... No, it clearly makes no sense and should be filed as a bug. The _grammar_ is the same in both cases. What actions you write...
... Not sure I understand that... could you elaborate? ... Regarding the readfile bit, yes. You missed the advantage that that was some code I had lying...