fun compile grab = let val maxLookAhead = 0(* no error correction *) fun printError (msg,pos,_) = letval posS = if pos = ~1then""else"(Pos "^Int.toString pos^") " in print (posS^msg^"\n") end in
PLTL.parse maxLookAhead grab printError handle PLTL.ParseError => raise LtlError "Parsing error" end
fun compile_from_string str = let val substr = ref (Substring.full str) fun grab n = ifSubstring.size (!substr) < n then letval s = !substr in
substr := Substring.full ""; Substring.string s end else letval (sl, sr) = Substring.splitAt(!substr, n) in
substr := sr; Substring.string sl end in
compile grab end
fun compile_from_file fileName = let val inStream = TextIO.openIn fileName fun grab n = if TextIO.endOfStream inStream then"" else TextIO.inputN (inStream,n) val tree = compile grab in
TextIO.closeIn inStream;
tree end end;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.