12345678910111213141516171819202122232425262728293031(**************************************************************************)(* -*- tuareg -*- *)(* *)(* Copyright (C) 2017,2018,2019 Yann Régis-Gianas, Nicolas Jeannerod, *)(* Ralf Treinen. *)(* *)(* This is free software: you can redistribute it and/or modify it *)(* under the terms of the GNU General Public License, version 3. *)(* *)(* Additional terms apply, due to the reproduction of portions of *)(* the POSIX standard. Please refer to the file COPYING for details. *)(**************************************************************************)letmake(current:PrelexerState.t)lexbuf=letpretokenizer=Prelexer.tokencurrentin(**
The pretokenizer may produce several pretokens, we use an
intermediate queue to synchronize pretokens' consumption with
their production.
*)letq=Queue.create()inletpushx=Queue.pushxqinletrecaux()=tryQueue.takeqwithQueue.Empty->List.iter(funx->Queue.pushxq)(pretokenizerlexbuf);aux()inaux,push