src/Pure/Syntax/syntax.ML
changeset 63345 70b2313f9c52
parent 62897 8093203f0b89
child 64556 851ae0e7b09c
equal deleted inserted replaced
63344:c9910404cc8a 63345:70b2313f9c52
   610 (* reconstructing infixes -- educated guessing *)
   610 (* reconstructing infixes -- educated guessing *)
   611 
   611 
   612 fun guess_infix (Syntax ({gram, ...}, _)) c =
   612 fun guess_infix (Syntax ({gram, ...}, _)) c =
   613   (case Parser.guess_infix_lr (Lazy.force gram) c of
   613   (case Parser.guess_infix_lr (Lazy.force gram) c of
   614     SOME (s, l, r, j) => SOME
   614     SOME (s, l, r, j) => SOME
   615      (if l then Mixfix.Infixl (Input.string s, j, Position.no_range)
   615      (if l then Infixl (Input.string s, j, Position.no_range)
   616       else if r then Mixfix.Infixr (Input.string s, j, Position.no_range)
   616       else if r then Infixr (Input.string s, j, Position.no_range)
   617       else Mixfix.Infix (Input.string s, j, Position.no_range))
   617       else Infix (Input.string s, j, Position.no_range))
   618   | NONE => NONE);
   618   | NONE => NONE);
   619 
   619 
   620 
   620 
   621 
   621 
   622 (** prepare translation rules **)
   622 (** prepare translation rules **)