<flux>
is there as-simple-as-possible ;) c parsing lib one would want to use for parsing C?
malc_ has quit [Read error: Connection reset by peer]
<flux>
actually maybe it's usable for my toy test case, converting cases to graphviz. no extra crap, I can just take the parser.mly and lexer and stick whatever I need to 'case' and chain it back to whichever level I need.
<flux>
..except getting the actual expression values seems quite painful given the tokens are literal string constants. no place to express anything else.
olle has joined #ocaml
kleisli_ has joined #ocaml
waleee-cl has joined #ocaml
<def>
flux: I implemented a parser on top of C11parser
<def>
I can share the code if you want. But it does not do preprocessing.
<flux>
but I can maybe hack that away as that's not essential
<flux>
in fact a simpler test-based approach could serve well also :)
<flux>
for serious use there's always clang..
<flux>
in fact if I just hack support for xxx.yyy as function calls then I don't even need to modify them away 🤔. I also need the comments for naming nodes.
<def>
xxx.yyy() is a function call in a record, it should be fine.
<flux>
right :)
<flux>
in that case the code probably works as-is
<flux>
and I can just hack the comments with search-replace ie. by replacing them with standalone string constants (in this particular piece of code) followed by ;
<flux>
I assume writing a merlin-based parser for c++ to be impossible
<flux>
and perhaps thrice the size..
<flux>
(if it were possible)
<flux>
I don't think merlin and lexer can really exchange information in a bidirectional manner?
objmagic has joined #ocaml
muskan has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
h14u has joined #ocaml
dborisog__ has quit [Ping timeout: 264 seconds]
olle has quit [Ping timeout: 244 seconds]
h14u has quit [Ping timeout: 240 seconds]
muskan has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
malc_ has joined #ocaml
<flux>
def: do you have hints how to get useful error messages out of that?-)
h14u has joined #ocaml
zv has joined #ocaml
Haudegen has joined #ocaml
<mbuf>
Is there a way to specify the master branch as .tar.gz in the src section of an opam file?
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hannes>
mbuf: though this will (a) not use a tarball and (b) use a specific branch (you can leave the "#bla" out to get the default branch - you can as well put a commid ID there)
<mbuf>
hannes, I see
<ollehar>
gnu
<ollehar>
oops
<ollehar>
sorry
mfp has quit [Ping timeout: 246 seconds]
jnavila has joined #ocaml
Hrundi_V_Bakshi has joined #ocaml
objmagic has joined #ocaml
chripell has quit [Ping timeout: 256 seconds]
catern has quit [Excess Flood]
catern has joined #ocaml
malc_ has left #ocaml ["ERC (IRC client for Emacs 28.0.50)"]
malc_ has joined #ocaml
malc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
kleisli__ has joined #ocaml
kleisli_ has quit [Ping timeout: 260 seconds]
jnavila has quit [Ping timeout: 272 seconds]
mbuf has quit [Quit: Leaving]
<flux>
I suppose OCamlGraph doesn't have an easy way to associate data to a vertex or edge that isn't really part of its identity? ie. if I wanted to have integer nodes and arbitrary labels for them, and then build edges by using just the integers.
<Drup>
That's more or less what the "Abstract" functors do, but they don't expose the integer nodes
<Drup>
you just get an abstract type.
<flux>
they don't expose the integer per se, but then I have function like: `val find_edge : t -> vertex -> vertex -> edge` where I must provide a complete vertex to call that. so if the label is part of the identity, then I must give that
<flux>
so there's no way to go from that partial information (integer) to the complete information (integer and assigned label)?
<flux>
I guess I can then just keep that label information completely separately, but then to use the GraphViz functionality I guess I need to also use first class modules to pass that additional context, in addition to graph
<Drup>
humm, that might not be exposed
<Drup>
What's your use case exactly ? In most cases, you could just have the complete information, and a custom equality function that only uses the integer
<flux>
well my input data is integers. I insert edges using those integers and sometimes I have additional data I can use to create a label for that vertex.
<flux>
but other times I don't have access to that additional data
<flux>
can I just use ie. label=None in that case if my comparison doesn't care about it?
<flux>
doesn't seem quite elegant but if it works.. ?
<Drup>
yeah
<flux>
and as long I have those edges added before-hand, they stick to the version that has the label st