Skip to content

Commit

Permalink
Change 'literal constant' -> 'literal'
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Nov 7, 2023
1 parent 7028255 commit dfb1864
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chapters/lexicalstructure.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ \chapter{Lexical Structure}\label{lexical-structure}
Without question, the smallest building blocks in Modelica are single characters belonging to a character set.
Characters are combined to form lexical units, also called tokens.
These tokens are detected by the lexical analysis part of the Modelica translator.
Examples of tokens are literal constants, identifiers, and operators.
Examples of tokens are literals, identifiers, and operators.
Comments are not really lexical units since they are eventually discarded.
On the other hand, comments are detected by the lexical analyzer before being thrown away.

Expand Down Expand Up @@ -147,9 +147,9 @@ \subsection{Modelica Keywords}\label{modelica-keywords}
\end{example}


\section{Literal Constants}\label{literal-constants}
\section{Literals}\label{literals}

\firstuse[literal (constant)]{Literals} (or \firstuse[---]{literal constants}) are unnamed constants used to build expressions, and have different forms depending on their type.
\firstuse[literal]{Literals} are unnamed constants used to build expressions, and have different forms depending on their type.
Each of the predefined types in Modelica has a way of expressing unnamed constants of the corresponding type, which is presented in the ensuing subsections.
Additionally, array literals and record literals can be expressed.

Expand All @@ -159,7 +159,7 @@ \subsection{Floating Point Numbers}\label{floating-point-numbers}
A floating point number is expressed as a decimal number in the form of a sequence of decimal digits followed by a decimal point, followed by decimal digits, followed by an exponent indicated by \lstinline!E! or \lstinline!e! followed by a sign and one or more decimal digits.
The various parts can be omitted, see \lstinline[language=grammar]!UNSIGNED-REAL! in~\cref{lexical-conventions} for details and also the examples below.
The minimal recommended range is that of IEEE double precision floating point numbers, for which the largest representable positive number is $1.7976931348623157\times10^{308}$ and the smallest positive number is $2.2250738585072014\times 10^{-308}$.
For example, the following are floating point number literal constants:
For example, the following are floating point number literals:
\begin{lstlisting}[language=modelica]
22.5, 3.141592653589793, 1.2E-35
\end{lstlisting}
Expand Down

0 comments on commit dfb1864

Please sign in to comment.