123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778(*********************************************************************************)(* Higlo *)(* *)(* Copyright (C) 2014-2021 Institut National de Recherche en Informatique *)(* et en Automatique. All rights reserved. *)(* *)(* This program is free software; you can redistribute it and/or modify *)(* it under the terms of the GNU Lesser General Public License version *)(* 3 as published by the Free Software Foundation. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Library General Public License for more details. *)(* *)(* You should have received a copy of the GNU Lesser General Public *)(* License along with this program; if not, write to the Free Software *)(* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *)(* 02111-1307 USA *)(* *)(* Contact: Maxence.Guesdon@inria.fr *)(* *)(* *)(*********************************************************************************)openLangletlexemelb=Sedlexing.(Utf8.lexemelb,lexeme_lengthlb);;letsedlexeme=Sedlexing.Utf8.lexeme;;letechar=[%sedlex.regexp?'t'|'b'|'n'|'r'|'f'|'\\'|'"'|'\'']letescaped_char=[%sedlex.regexp?'\\',echar]letstring=[%sedlex.regexp?'"',Star(Compl(0x22)|escaped_char),'"']letchar=[%sedlex.regexp?"'",(Compl(0x27)|escaped_char),"'"]letspace=[%sedlex.regexp?Plus(' '|'\n'|'\t'|'\r')]letcomment=[%sedlex.regexp?"/*",Star(Compl(0x2A)|('*',Compl('/'))),"*/"]letkeyword=[%sedlex.regexp?"digraph"|"edge"|"graph"|"subgraph"](* split attribute list because of sedlex bug:
https://github.com/ocaml-community/sedlex/issues/97 *)letattribute=[%sedlex.regexp?"arrowhead"|"arrowsize"|"arrowtail"|"bgcolor"|"center"|"color"|"constraint"]letattribute2=[%sedlex.regexp?"decorateP"|"dir"|"distortion"|"fillcolor"|"fontcolor"|"fontname"|"fontsize"]letattribute3=[%sedlex.regexp?"headclip"|"headlabel"|"height"|"labelangle"|"labeldistance"|"labelfontcolor"|"labelfontname"|"labelfontsize"|"label"|"layers"|"layer"|"margin"|"mclimit"]letattribute4=[%sedlex.regexp?"minlen"|"name"|"nodesep"|"nslimit"|"ordering"|"orientation"|"pagedir"|"page"|"peripheries"|"port_label_distance"|"rankdir"|"ranksep"|"rank"|"ratio"|"regular"]letattribute5=[%sedlex.regexp?"rotate"|"samehead"|"sametail"|"shapefile"|"shape"|"sides"|"size"|"skew"|"style"|"tailclip"|"taillabel"|"URL"|"weight"|"width"]letsymbol=[%sedlex.regexp?"--"|"->"]letmainlexbuf=match%sedlex