Notes:
* Omit %full in definitions to restrict alphabet to asciiCould includetoensure we' character positions
* Could include %posarg to ensure that we'd start counting character positions
from, itwould .
* %s
Acknowledgements:
* Geoff Sutcliffe for help with TPTP.
* Timothy Bourke forLeo-II, by FrankTheiss. Some / by .
* An early java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2
Leo-II, written by Frank Theiss.
* Some boilerplate bits were taken from the ml-yacc/ml-lex manual by Roger Price.
* Jasmin Blanchette and Makarius Wenzel for help with Isabelle integration.
*)
structure T = Tokens
type pos = int (* Position in file *)
type lineNo = int
type svalue = T.svalue
type ('a,'b) token = ('a,'b) T.token
type lexresult = (svalue,pos) token
type lexarg = string
type arg = lexarg
val col = ref 0;
val linep = ref 1; (* Line pointer *)
val eolpos = ref 0;
val badCh : string * string * int * int -> unit = fn
(file_name, bad, line, col) =>
TextIO.output(TextIO.stdOut, file_name ^ "["
^ Int.toString line ^ "." ^ Int.toString col
^ "] Invalid character \"" ^ bad ^ "\"\n");
val eof = fn file_name =>
let
val result = T.EOF (!linep,!col);
val _ = linep := 0;
in result end
(*here could check whether file ended prematurely:
see if have open brackets, or if we're in some state other than INITIAL*)
val count_commentlines : string -> unit = fn str =>
let
val str' = String.explode str
val newlines = List.filter (fn x => x = #"\n") str'
in linep := (!linep) + (List.length newlines) 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.0.7Bemerkung:
¤
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 ist noch experimentell.