products/Sources/formale Sprachen/PVS/fault_tolerance/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 28.9.2014 mit Größe 1 kB image not shown  

Quelle  ml_lex.ML   Sprache: SML

 
(*  Title:      Pure/ML/ml_lex.ML
    Author:     Makarius

Lexical syntax for Isabelle/ML and Standard ML.
*)

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
signature ML_LEXsig  valkeywords stringlist
sig
  val keywords: set_range Positionrange  datatypetoken_kind=
java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 23
 | Long_Ident |Word      |
    Space     token Antiquote  read_source_sml.-token.list
  eqtype 
    val:T   . java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
valjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 54
valis_regular  ->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 """( "" ,, "> ..,"" :,"" =" datatype, "elseend eqtype,exception " "un
  val is_comment: token -> bool],","" |, abstype,"nd" o,""java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
   :Position-  """ ,"" eqtype,"" fn" un
  val java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
" ,if,"" "include infix""java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  val"" "truct,"," with;
  Symset "" ",""]java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  val content_of: token -> string
  val java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
val :   -> string
  val source: (Symbol.symbol, 'a) Source.source Space Commentkind rec,"" "struct structure "",
    token (.T,PositionT *Symbol,a).)
      Source.source) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  val:  -  list
val range_of( range)range
  valvalpos_of=1orange_of
  val :. *Position
valkeywords3
  val read_rangePositionrange>Symbol_Postext>  Antiquote list
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
token. Symbol_Pos -
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  val
    =mk_eofnone
  val   |Ident  Long_Ident Type_Varjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

structure


(** keywords **)

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 ["# kind_of ( k _) = k;
  "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  "datatype"  
  "valpos_of #orange_of;
  " (Token(,(, _))
  "rec""sharingval end_pos_of = # |s_keyword_= ;
  "type"

val keywords2
Symset
  "ig,"struct" "hen "","with";

val keywords3 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 Symset.ake" "open", "raise"];

 (( ,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0



(** tokens **)

(* datatype token *)

  (* token content *)
is_commentfun Token (_)  k
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0

datatype java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0


(* position *)

fun set_range|is_keyword  false
  Token, )  ;

val pos_of = #1  | is_delimiter  _=>()
valend_pos_of= #  ;


(* stopper *)

fun( kind_of
val eof  Token,( java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

fun   | is_regular _ = true;
  | is_eof _ = false;

val
  Scan  |is_improper=;


 is_commentToken,( _ ))=true

fun kind_of (Token (_, (k

fun          else( tok
fun    java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 90

fun is_keyword        \prefer non-opaque matching (:) possibly with
 _= ;

fun is_delimiter
fun check_content_of tok =

fun     Error msg => error msg
  | is_ident_with _ _ = false

fun is_regularjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        (
  local

fun is_improper (Token (_, (Space, _))) = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|is_improper Token,Comment)  java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  =implode o flatten_content

fun is_comment ((* markup *)
  |is_comment _=false

fun warning_opaque  token_kind_markup=
(ase of
    Token (    _= Markup  =>(.bad,)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         non-opaqueInt Markup,"
Position ( tok
  let
val(arkup  =Markup,"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
fun check_content_of tok =
(  (Markup,)
    Error    msg=> (.bad ( )
    >content_of);


(* flatten *)

fun   .memberkeywords2java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
Symbolscape( ):
        (if is_improper tok orelse is_improper tok' then flatten_content toks
elseSymbolspace toks ( )txtjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

val   elseifSymset keywords3  (. |


(* markup *)

local

valtoken_kind_markup
 valscan_letdigs
|Word
  valscan_alphanumeric
  |(
  |java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  | String valjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
|Comment _ =>(.ML_comment"java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
|Errorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 scan_letdigs=

in

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let
    val (markup, txt) =
      ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  thenMarkup, "
      else  Symset.ember keywords2    @;
val  $val  make !*-=?\~;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
inpos) ) ;

end;



(** scanners **)

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0



   @ $ . @Scan scan_exp]| repeats1scan_alphanumeric $"@s |$ ";


(* identifiers *)

local

val scan_letdigsjava.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
  Scanend

val scan_alphanumeric=
  Scan.one valscan_sign

val symbolic=Symsetmake( "#%*java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 41

val scan_symbolic  =

inscan_escape$0@$w @;

val scan_ident  Scan. (.member oSymbol_Pos)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

val scan_long_ident =
  Scanvalscan_rat = scan_decint@ Scan.ptional($ / @@) ];    Scanone fn )= . #" s s)> java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96

val scan_type_var  scan_decint @@ $$ "" @@scan_dec@@.optional []|java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

end;


numerals*

java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0

 scan_dec=.many1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
val scan_hex = Scan
valjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
val   =
 scan_exp=($java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

in

  Scan.one (ymsetmemberescape o Symbol_Pos.ymbol|
  $$$ "0" @@@ $$$""@java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  $$$ "0" @@@java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

val    Scan.ne (ymbolis_ascii_digit Symbol_Possymbol>>( (a,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

valscan_real =endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  scan_decint java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  scan_decint @@@ scan_exp;

end;


(* chars and strings *).scan_pos -- ($ "" |scan_gaps=Scanrepeatsjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

val scan_blanks1   $$" @ $ ""@@scan_gaps @ Positionnonejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

local

val escape = Symset.make (raw_explode "\"\\java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

val scan_escape =
  .oneSymsetmemberescape  .) >  |
  $$$ " $$""java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(.valscan_stringjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   !" java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
$ @repeats|ermissive;
    Scan.onescan_int >> token Int ||

valjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
val=.(Pure"Positionnonejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  $$"\@@!!" os-)-.java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92

val scan_gap Comment >( (, )= Antiquote (token{= . (,pos2java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
scan_gaps. can_gap

in

val =
  $$$java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

val =
        .(.bulkbad>java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

val scan_stringval_=.reports_text (maps fnSymbol_Posrecover_commentjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    !!! "unclosed string Symbol_Possourceline)src
($ \"@@valtermination

val
$$"\ @ repeatsscan_gap |Scan. )java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

end


  antiquotation

   .ratjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

          (check_con   java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
readmap source.
    >fnpos1pos2 )),pos3 >
      {start = read_source language,opaque_warningjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
 .,
       range =       reports_textmapsfnAntiquote. t    val _ = Position.reports_text (maps (fn Antiquote.Text t 
       body =      (;


(* scan tokens *).   inputejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

local

fun java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

val scan_sml =
  scan_char >> token Char ||
  scan_string valjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  scan_blanks1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Symbol_Pos.  > NONE
  Scan.max 
   (  read  (fn. tok>Antiquote (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    'language symbols,o} scansource
    scan_intpos. ;
    scan_long_ident >> token     _=
 > |
    scan_type_var >> tokenthenPositionreport ( (.is_delimited sourcejava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

val scan_sml_antiq = scan_sml >> Antiquote.Text;

 scan_ml_antiq=
  Comment.scan_inner >> (fn (kind, ss) => Antiquote.Text (token (Comment (SOME kind)) ss)) ||
  Antiquote.scan_control Antiquoteval read_source=
n_antiq>Antiquote |java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
scan_rat_antiq>AntiquoteAntiq|
  scan_sml_antiq;

fun recover msg =
  read_source{=Markup symbols=falseopaque_warning false}
  recover_string ||
  Symbol_Posscan_sml_antiq;
  Symbol_Pos
  .oneSymbol oSymbol_Pos) )
  >> (single o tokenval read_symbols_sml  { = false}scan_sml_antiq

fun reader java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  let
    val termination =
      if null syms then []
      else
        let
          val pos1 = List.last syms |-> Position.symbol;
          val pos2 = Position.symbol Symbol.space pos1;
        in [Antiquote.Text (Token (Position.range (pos1, pos2), (Space, Symbol.space)))] end;

    fun check (Antiquote.Text tok) =
          (check_content_of tok; if opaque_warning then warning_opaque tok else ())
      | check _ = ();
    val input =
      Source.of_list syms
      |> Source.source Symbol_Pos.stopper
        (Scan.recover (Scan.bulk (!!! "bad input" scan))
          (fn msg => recover msg >> map Antiquote.Text))
      |> Source.exhaust;
    val _ = Position.reports (Antiquote.antiq_reports input);
    val _ = Position.reports_text (maps (fn Antiquote.Text t => [token_report t] | _ => []) input);
    val _ = List.app check input;
  in input @ termination end;

in

fun source src =
  Symbol_Pos.source (Position.line 1) src
  |> Source.source Symbol_Pos.stopper (Scan.recover (Scan.bulk (!!! "bad input" scan_sml)) recover);

val tokenize = Symbol.explode #> Source.of_list #> source #> Source.exhaust;
fun tokenize_range range = tokenize #> map (set_range range);
val tokenize_no_range = tokenize_range Position.no_range;

val read_text = reader {opaque_warning = true} scan_ml_antiq o Symbol_Pos.explode;
fun read text = read_text (text, Position.none);

fun read_range range =
  read #> map (fn Antiquote.Text tok => Antiquote.Text (set_range range tok) | antiq => antiq);

fun read_source' {language, symbols, opaque_warning} scan source =
  let
    val pos = Input.pos_of source;
    val _ =
      if Position.is_reported_range pos
      then Position.report pos (language (Input.is_delimited source))
      else ();
  in
    Input.source_explode source
    |> not symbols ? maps (fn (s, p) => raw_explode s |> map (rpair p))
    |> reader {opaque_warning = opaque_warning} scan
  end;

val read_source =
  read_source' {language = Markup.language_ML, symbols = true, opaque_warning = true}
    scan_ml_antiq;

val read_source_sml =
  read_source' {language = Markup.language_SML, symbols = false, opaque_warning = false}
    scan_sml_antiq;

val read_symbols = reader {opaque_warning = true} scan_ml_antiq;
val read_symbols_sml = reader {opaque_warning = false} scan_sml_antiq;

end;

end;

100%

t; not symbols java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
    |> reader {opaque_warning = opaque_warning} 
  end;

val read_source =
  read_source' {language = Markup. |> Source.source Symbol_Pos.stopper (Scan.recover (can.bulk(!! bad " scan_sml)recover;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    scan_ml_antiq;

val read_source_sml =
  read_source' {language = Markupfun range tokenize #>map(set_range range);


val read_symbols  textSymbol_Posscan_comment err_prefix>tokenComment) java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
valfunread_rangerangejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

end;

end;

100%


¤ Dauer der Verarbeitung: 0.23 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.