doc-src/IsarRef/Thy/Inner_Syntax.thy
changeset 46512 4f9f61f9b535
parent 46506 c7faa011bfa7
child 48113 1c4500446ba4
equal deleted inserted replaced
46511:fbb3c68a8d3c 46512:4f9f61f9b535
   978 
   978 
   979 subsection {* Ambiguity of parsed expressions *}
   979 subsection {* Ambiguity of parsed expressions *}
   980 
   980 
   981 text {*
   981 text {*
   982   \begin{tabular}{rcll}
   982   \begin{tabular}{rcll}
   983     @{attribute_def syntax_ambiguity} & : & @{text attribute} & default @{text warning} \\
   983     @{attribute_def syntax_ambiguity_warning} & : & @{text attribute} & default @{text true} \\
   984     @{attribute_def syntax_ambiguity_limit} & : & @{text attribute} & default @{text 10} \\
   984     @{attribute_def syntax_ambiguity_limit} & : & @{text attribute} & default @{text 10} \\
   985   \end{tabular}
   985   \end{tabular}
   986 
   986 
   987   Depending on the grammar and the given input, parsing may be
   987   Depending on the grammar and the given input, parsing may be
   988   ambiguous.  Isabelle lets the Earley parser enumerate all possible
   988   ambiguous.  Isabelle lets the Earley parser enumerate all possible
   998   situation and the given configuration options.  Parsing ultimately
   998   situation and the given configuration options.  Parsing ultimately
   999   fails, if multiple results remain after the filtering phase.
   999   fails, if multiple results remain after the filtering phase.
  1000 
  1000 
  1001   \begin{description}
  1001   \begin{description}
  1002 
  1002 
  1003   \item @{attribute syntax_ambiguity} determines reaction on multiple
  1003   \item @{attribute syntax_ambiguity_warning} controls output of
  1004   results of parsing; this string option can be set to @{text
  1004   explicit warning messages about syntax ambiguity.
  1005   "ignore"}, @{text "warning"}, or @{text "error"}.
       
  1006 
  1005 
  1007   \item @{attribute syntax_ambiguity_limit} determines the number of
  1006   \item @{attribute syntax_ambiguity_limit} determines the number of
  1008   resulting parse trees that are shown as part of the printed message
  1007   resulting parse trees that are shown as part of the printed message
  1009   in case of an ambiguity.
  1008   in case of an ambiguity.
  1010 
  1009