<Frederick>
ive read it it is what Im suposed to do in order of makemy program, so I can use the lib and just imp,ement the algorithms using the given data structure
<ski>
ok
<Frederick>
but I will have to learn ocaml
<Frederick>
so I will take a bath and start now :p
<ski>
you gave up pn Parsec, for the time being ?
<Frederick>
ski, I think so
<ski>
ok
<Frederick>
cause I was unable to acces my structures
<Frederick>
ski, do you think this new approach might be easier?
<ski>
i don't know, i haven't looked at this CFG lib
* ski
wonders which structures Frederick couldn't access
<Frederick>
my lists
* ski
doesn't understand
<ski>
(iirc you had something like 'data CFG t nt = CFG {terminals :: [t], nonterminals :: [nt],root :: nt,productions :: [Prod t nt]}')
<ski>
(do you mean those lists in there ?)
<Frederick>
ski, yep
<ski>
so, i don't understand the trouble with accessing the lists ..
<Frederick>
dunno I had problems dealing with them and generating the productions
* ski
wonders if they were inherent problems, or just problems with not knowing the language so well ..
<Frederick>
probably option b
<ski>
anyway, you do whichever way you want
<ski>
good luck, anyway
<Frederick>
I need an "easy" way
<ski>
mhm
<Frederick>
I would like a language I could only worry about the algorithm not with the structures
<ski>
you need some structures, too
<Frederick>
sure I would like a language / lib hat give me such structures
<ski>
(possibly you haven't found the best fitting ones yet, though)
<Frederick>
sure
<ski>
hm, remind me, what was it you wanted to do now, again ?
<ski>
make a program that parses grammar specifications ?
<ski>
if so, then what ? compile that into a specific parser for that grammar ?
<Frederick>
do a program that parses a grammar specificatrion in fact a CFG (so the only restriction is that all rules must come from a single variable), once it is parsec I must remove useless symbols, left recursion and epsilon productions
<Frederick>
than put the grammar in Chomskys and Greibachs normal forms
<ski>
the first part, parsing it in, shouldn't be very difficult with Parsec, i think
<ski>
then after that, you should be able to do whatever transformations you want on the CFG
<Frederick>
I really couldnt find the right structures, and Ive read all haskell tutorials from the site
<ski>
right structures for what ?
<ski>
for storing the CFG ?
<Frederick>
yes and acessing and handling it
<ski>
shouldn't your 'data CFG t nt = ...', etc suffice ?
<Frederick>
this assignment if well done in a functional language would have at most 50 lines of code
<ski>
possibly .. i can't comment on how many lines the transformation parts would take
<Frederick>
if I decide to do it in C I would use like 300 or more
<ski>
anyway, with parsec, you'd get a top-parser
<Frederick>
transformations can be a little hard but if I manage for exemple to do chomskys tranformation (wich is pretty easy algorithm) greibachs wouldnt be hard
<ski>
parseCFG :: Parser (CFG t nt)
<ski>
parser_CFG :: Parser (CFG t nt)
<ski>
i meant
<ski>
then you could make a function that starts the parsing
<ski>
parseCFG :: String -> Maybe CFG
<Frederick>
hold a sec
<Frederick>
I nedd to take a fast shower
<ski>
parseCFG :: String -> Maybe (CFG t nt)
<ski>
i.e.
<Frederick>
than I come back and start drafting
<ski>
sure
<ski>
(hmm, possibly you also need to either fix the types 't' and 'nt', or pass in parsers that tell how to parse them .. but this shouldn't be a problem)
<ski>
then, you'd do some transformations
<ski>
transform :: CFG t nt -> TransformedCFG t nt
<ski>
possibly TransformedCFG = CFG, that depends on what kind of transformations you want
<ski>
finally, you'd get a function
<ski>
parseAndTransformCFG :: String -> Maybe (TransformedCFG t nt)
<ski>
(the 'Maybe' signifying that the parsing might fail, i.e. parse error .. you could of course abort the program here, instead of catching this failure, if you want)
exa has quit [Remote closed the connection]
<Frederick>
oki back and clean
<ski>
what do you say ? does this sound like a workable design ?
<Frederick>
ski, yes, Im trying to open rafb to show what I have and try to adap
<ski>
(this above wa just a sketch, though .. you needn't do exactly like that ..)
<Frederick>
ski, do you mind I pvt you or we move to #haskell in respect of these channel guidelines?
<ski>
yes, we possibly should move to #haskell
<Frederick>
k
bzzbzz has quit ["leaving"]
Frederick has left #ocaml []
ecc has quit ["Client exiting"]
pango_ has joined #ocaml
pango has quit [Read error: 60 (Operation timed out)]
vezenchio has quit ["\\o hutari ga kitto deaeru you na mahou wo kakete - ryoute wo sotto kasanete hora! hohoemu kara - hontou no kimoti kidukanai ]
Nutssh has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
shirogane has quit [Read error: 104 (Connection reset by peer)]
Skal has joined #ocaml
Tachyon76 has joined #ocaml
Tachyon76 has quit [Client Quit]
Tachyon76 has joined #ocaml
mauke has quit [Remote closed the connection]
pango_ has quit [brown.freenode.net irc.freenode.net]
Tachyon76 has quit ["Leaving"]
pango_ has joined #ocaml
Nutssh has quit [brown.freenode.net irc.freenode.net]
Nutssh has joined #ocaml
Nutssh has quit [brown.freenode.net irc.freenode.net]
Nutssh has joined #ocaml
ramkrsna has joined #ocaml
m3ga has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
MisterC has joined #ocaml
_fab has joined #ocaml
Nutssh has quit ["Client exiting"]
Skal has quit [Read error: 110 (Connection timed out)]
Hadaka has quit [Remote closed the connection]
Naked has joined #ocaml
Naked is now known as Hadaka
ramkrsna has quit [No route to host]
Revision17 has joined #ocaml
revision17_ has quit [Read error: 110 (Connection timed out)]
ppsmimou has joined #ocaml
vodka-goo has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Snark has joined #ocaml
vezenchio has joined #ocaml
kryptt has joined #ocaml
mauke has joined #ocaml
mikeX has joined #ocaml
<mikeX>
hello, isn't a bytecode executable supposed to be portable? I'm trying to run one compiled on unix with ocamlc (3.0.8) on windows running ocaml 3.0.7 (mingw, no mingw installed however), and I get a weird error: unknown C primitive 'unix_waitpid'. I'm using merely some Unix.stat calls on the program
<flux__>
I think it should be, and it is portable atleast among linuxes ;)
<flux__>
oh, cross versions-compatible, no
<mikeX>
if I use ocamlc.exe to compile it, it will fail on my linux box with: unknown C primitive 'win_waitpid'
<flux__>
bytecode can be incompatible even in the same machine
<flux__>
if there are different versions of ocaml
<flux__>
I think, atleast ;)
<mikeX>
I see, I'll try updating, thanks k
<flux__>
I would expect a different error though
<mikeX>
btw, ocamlopt.exe fails with some Assembler warnings:
<mikeX>
Warning: alignment too large: 15 assumed
<mikeX>
and finaly fails with
<mikeX>
The system cannot execute the specified program.
<mikeX>
Error during linking
ecc has joined #ocaml
<flux__>
maybe your installation is somehow incomplete
<mikeX>
the command was ocamlopt str.cmxa unix.cmxa file.ml
<flux__>
but, I need to go ->
<mikeX>
ok, bye :)
<mikeX>
I figure that has to do with mingw not being installed
mikeX has quit ["leaving"]
Raziel has quit ["Yo soy goma. Tú eres cola."]
exa has joined #ocaml
Schmurtz has quit ["Plouf !"]
Bigb[a]ng is now known as Bigbang
kryptt has left #ocaml []
pango has quit ["Leaving"]
ppsmimou has quit ["Leaving"]
Schmurtz has joined #ocaml
shirogane has joined #ocaml
shirogane has quit [Remote closed the connection]
MisterC has quit [Remote closed the connection]
pango has joined #ocaml
smimou has joined #ocaml
pango has quit [Read error: 113 (No route to host)]
__DL__ has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
Bigbang is now known as Bigb[a]ng
pmdboi has joined #ocaml
Raziel has joined #ocaml
Demitar_ has joined #ocaml
Nutssh has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
mrpingoo has joined #ocaml
vodka-goo has quit [Read error: 110 (Connection timed out)]