doc-src/IsarRef/Thy/Outer_Syntax.thy
changeset 40296 ac4d75f86d97
parent 40291 012ed4426fda
child 42596 6c621a9d612a
equal deleted inserted replaced
40295:d4923a7f42c1 40296:ac4d75f86d97
   195   out by outer syntax keywords (e.g.\ quoted @{verbatim "\"let\""}).
   195   out by outer syntax keywords (e.g.\ quoted @{verbatim "\"let\""}).
   196   Already existing objects are usually referenced by
   196   Already existing objects are usually referenced by
   197   \railqtok{nameref}.
   197   \railqtok{nameref}.
   198 
   198 
   199   \indexoutertoken{name}\indexoutertoken{parname}\indexoutertoken{nameref}
   199   \indexoutertoken{name}\indexoutertoken{parname}\indexoutertoken{nameref}
   200   \indexoutertoken{int}
       
   201   \begin{rail}
   200   \begin{rail}
   202     name: ident | symident | string | nat
   201     name: ident | symident | string | nat
   203     ;
   202     ;
   204     parname: '(' name ')'
   203     parname: '(' name ')'
   205     ;
   204     ;
   206     nameref: name | longident
   205     nameref: name | longident
   207     ;
   206     ;
       
   207   \end{rail}
       
   208 *}
       
   209 
       
   210 
       
   211 subsection {* Numbers *}
       
   212 
       
   213 text {* The outer lexical syntax (\secref{sec:outer-lex}) admits
       
   214   natural numbers and floating point numbers.  These are combined as
       
   215   @{syntax int} and @{syntax real} as follows.
       
   216 
       
   217   \indexoutertoken{int}\indexoutertoken{real}
       
   218   \begin{rail}
   208     int: nat | '-' nat
   219     int: nat | '-' nat
   209     ;
   220     ;
   210   \end{rail}
   221     real: float | int
       
   222     ;
       
   223   \end{rail}
       
   224 
       
   225   Note that there is an overlap with the category \railqtok{name},
       
   226   which also includes @{syntax nat}.
   211 *}
   227 *}
   212 
   228 
   213 
   229 
   214 subsection {* Comments \label{sec:comments} *}
   230 subsection {* Comments \label{sec:comments} *}
   215 
   231