\hypertarget{llex_8c}{
\section{llex.c File Reference}
\label{llex_8c}\index{llex.c@{llex.c}}
}
{\tt \#include $<$ctype.h$>$}\par
{\tt \#include $<$locale.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}lua.h\char`\"{}}\par
{\tt \#include \char`\"{}ldo.h\char`\"{}}\par
{\tt \#include \char`\"{}llex.h\char`\"{}}\par
{\tt \#include \char`\"{}lobject.h\char`\"{}}\par
{\tt \#include \char`\"{}lparser.h\char`\"{}}\par
{\tt \#include \char`\"{}lstate.h\char`\"{}}\par
{\tt \#include \char`\"{}lstring.h\char`\"{}}\par
{\tt \#include \char`\"{}ltable.h\char`\"{}}\par
{\tt \#include \char`\"{}lzio.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{llex_8c_2e2a05c4292ce934408b59470a78472d}{llex\_\-c}
\item 
\#define \hyperlink{llex_8c_bf0b3947b59218777a8e928a10be205b}{LUA\_\-CORE}
\item 
\#define \hyperlink{llex_8c_8ab976102fb046f9974c53caaf5a1995}{next}(ls)~(ls $\rightarrow$ current = zgetc(ls $\rightarrow$ z))
\item 
\#define \hyperlink{llex_8c_ee0dbe3090a8bf4b0ecd633781c5a09a}{currIsNewline}(ls)~(ls $\rightarrow$ current == '$\backslash$n' $|$$|$ ls $\rightarrow$ current == '$\backslash$r')
\item 
\#define \hyperlink{llex_8c_c4c2ebdfa66caf9c1ef124c30e9d68a5}{save\_\-and\_\-next}(ls)~(save(ls, ls $\rightarrow$ current), next(ls))
\item 
\#define \hyperlink{llex_8c_934682caeedb813cc7c92ca84ed6eb04}{MAXSRC}~80
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void \hyperlink{llex_8c_3418da69613c587915ff780b0ec3744b}{save} (\hyperlink{structLexState}{LexState} $\ast$ls, int c)
\item 
void \hyperlink{llex_8c_50834f7eb4b2ac79c8df048988749abe}{luaX\_\-init} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
const char $\ast$ \hyperlink{llex_8c_fbf0654ae651496d0e8dcebeefbefed6}{luaX\_\-token2str} (\hyperlink{structLexState}{LexState} $\ast$ls, int token)
\item 
static const char $\ast$ \hyperlink{llex_8c_b53c17c8b5ca50bcdfbd1cddf7310e83}{txtToken} (\hyperlink{structLexState}{LexState} $\ast$ls, int token)
\item 
void \hyperlink{llex_8c_36bb85db6c63dc629bf20810fc394489}{luaX\_\-lexerror} (\hyperlink{structLexState}{LexState} $\ast$ls, const char $\ast$msg, int token)
\item 
void \hyperlink{llex_8c_1304c5741ab55cca55adb3ea2b3331d8}{luaX\_\-syntaxerror} (\hyperlink{structLexState}{LexState} $\ast$ls, const char $\ast$msg)
\item 
\hyperlink{unionTString}{TString} $\ast$ \hyperlink{llex_8c_83f747518666054180f6a7f8da55ac42}{luaX\_\-newstring} (\hyperlink{structLexState}{LexState} $\ast$ls, const char $\ast$str, size\_\-t l)
\item 
static void \hyperlink{llex_8c_c030febfa2dc867e1b48f3328aec45b3}{inclinenumber} (\hyperlink{structLexState}{LexState} $\ast$ls)
\item 
void \hyperlink{llex_8c_de7ea17ed3ba6a7b7df70824015ce3f7}{luaX\_\-setinput} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, \hyperlink{structLexState}{LexState} $\ast$ls, \hyperlink{structZio}{ZIO} $\ast$z, \hyperlink{unionTString}{TString} $\ast$source)
\item 
static int \hyperlink{llex_8c_621d46292efa3e4ef3baa0328adc27f8}{check\_\-next} (\hyperlink{structLexState}{LexState} $\ast$ls, const char $\ast$set)
\item 
static void \hyperlink{llex_8c_bee5f346149d4ee15dfc76c0f2a0817b}{buffreplace} (\hyperlink{structLexState}{LexState} $\ast$ls, char from, char to)
\item 
static void \hyperlink{llex_8c_3a89ad52b41e79c866d098c24c2a1603}{trydecpoint} (\hyperlink{structLexState}{LexState} $\ast$ls, \hyperlink{unionSemInfo}{SemInfo} $\ast$seminfo)
\item 
static void \hyperlink{llex_8c_34328f855aff70b081c87aeb21739c09}{read\_\-numeral} (\hyperlink{structLexState}{LexState} $\ast$ls, \hyperlink{unionSemInfo}{SemInfo} $\ast$seminfo)
\item 
static int \hyperlink{llex_8c_c847206ac43c94b261205c6b7cef6ee1}{skip\_\-sep} (\hyperlink{structLexState}{LexState} $\ast$ls)
\item 
static void \hyperlink{llex_8c_436a66722128b5e44db3efccaa922aa6}{read\_\-long\_\-string} (\hyperlink{structLexState}{LexState} $\ast$ls, \hyperlink{unionSemInfo}{SemInfo} $\ast$seminfo, int sep)
\item 
static void \hyperlink{llex_8c_5a2d8bb78e2b8e9ee25f901c811b2275}{read\_\-string} (\hyperlink{structLexState}{LexState} $\ast$ls, int del, \hyperlink{unionSemInfo}{SemInfo} $\ast$seminfo)
\item 
static int \hyperlink{llex_8c_83faab0338a28c8b97ff1156725cc61b}{llex} (\hyperlink{structLexState}{LexState} $\ast$ls, \hyperlink{unionSemInfo}{SemInfo} $\ast$seminfo)
\item 
void \hyperlink{llex_8c_8b9f2aa3f74c4e2f814d860dc7f5a6a8}{luaX\_\-next} (\hyperlink{structLexState}{LexState} $\ast$ls)
\item 
void \hyperlink{llex_8c_f0d2cb247a7700145746c0edba60c63e}{luaX\_\-lookahead} (\hyperlink{structLexState}{LexState} $\ast$ls)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
const char $\ast$const \hyperlink{llex_8c_257ea0c8a6651032b46ea8e5d4f8080f}{luaX\_\-tokens} \mbox{[}$\,$\mbox{]}
\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{llex_8c_ee0dbe3090a8bf4b0ecd633781c5a09a}{
\index{llex.c@{llex.c}!currIsNewline@{currIsNewline}}
\index{currIsNewline@{currIsNewline}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define currIsNewline(ls)~(ls $\rightarrow$ current == '$\backslash$n' $|$$|$ ls $\rightarrow$ current == '$\backslash$r')}}
\label{llex_8c_ee0dbe3090a8bf4b0ecd633781c5a09a}


\hypertarget{llex_8c_2e2a05c4292ce934408b59470a78472d}{
\index{llex.c@{llex.c}!llex\_\-c@{llex\_\-c}}
\index{llex\_\-c@{llex\_\-c}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define llex\_\-c}}
\label{llex_8c_2e2a05c4292ce934408b59470a78472d}


\hypertarget{llex_8c_bf0b3947b59218777a8e928a10be205b}{
\index{llex.c@{llex.c}!LUA\_\-CORE@{LUA\_\-CORE}}
\index{LUA\_\-CORE@{LUA\_\-CORE}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LUA\_\-CORE}}
\label{llex_8c_bf0b3947b59218777a8e928a10be205b}


\hypertarget{llex_8c_934682caeedb813cc7c92ca84ed6eb04}{
\index{llex.c@{llex.c}!MAXSRC@{MAXSRC}}
\index{MAXSRC@{MAXSRC}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MAXSRC~80}}
\label{llex_8c_934682caeedb813cc7c92ca84ed6eb04}


\hypertarget{llex_8c_8ab976102fb046f9974c53caaf5a1995}{
\index{llex.c@{llex.c}!next@{next}}
\index{next@{next}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define next(ls)~(ls $\rightarrow$ current = zgetc(ls $\rightarrow$ z))}}
\label{llex_8c_8ab976102fb046f9974c53caaf5a1995}


\hypertarget{llex_8c_c4c2ebdfa66caf9c1ef124c30e9d68a5}{
\index{llex.c@{llex.c}!save\_\-and\_\-next@{save\_\-and\_\-next}}
\index{save\_\-and\_\-next@{save\_\-and\_\-next}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define save\_\-and\_\-next(ls)~(save(ls, ls $\rightarrow$ current), next(ls))}}
\label{llex_8c_c4c2ebdfa66caf9c1ef124c30e9d68a5}




\subsection{Function Documentation}
\hypertarget{llex_8c_bee5f346149d4ee15dfc76c0f2a0817b}{
\index{llex.c@{llex.c}!buffreplace@{buffreplace}}
\index{buffreplace@{buffreplace}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void buffreplace ({\bf LexState} $\ast$ {\em ls}, \/  char {\em from}, \/  char {\em to})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_bee5f346149d4ee15dfc76c0f2a0817b}


\hypertarget{llex_8c_621d46292efa3e4ef3baa0328adc27f8}{
\index{llex.c@{llex.c}!check\_\-next@{check\_\-next}}
\index{check\_\-next@{check\_\-next}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int check\_\-next ({\bf LexState} $\ast$ {\em ls}, \/  const char $\ast$ {\em set})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_621d46292efa3e4ef3baa0328adc27f8}


\hypertarget{llex_8c_c030febfa2dc867e1b48f3328aec45b3}{
\index{llex.c@{llex.c}!inclinenumber@{inclinenumber}}
\index{inclinenumber@{inclinenumber}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void inclinenumber ({\bf LexState} $\ast$ {\em ls})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_c030febfa2dc867e1b48f3328aec45b3}


\hypertarget{llex_8c_83faab0338a28c8b97ff1156725cc61b}{
\index{llex.c@{llex.c}!llex@{llex}}
\index{llex@{llex}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int llex ({\bf LexState} $\ast$ {\em ls}, \/  {\bf SemInfo} $\ast$ {\em seminfo})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_83faab0338a28c8b97ff1156725cc61b}


\hypertarget{llex_8c_50834f7eb4b2ac79c8df048988749abe}{
\index{llex.c@{llex.c}!luaX\_\-init@{luaX\_\-init}}
\index{luaX\_\-init@{luaX\_\-init}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaX\_\-init ({\bf lua\_\-State} $\ast$ {\em L})}}
\label{llex_8c_50834f7eb4b2ac79c8df048988749abe}


\hypertarget{llex_8c_36bb85db6c63dc629bf20810fc394489}{
\index{llex.c@{llex.c}!luaX\_\-lexerror@{luaX\_\-lexerror}}
\index{luaX\_\-lexerror@{luaX\_\-lexerror}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaX\_\-lexerror ({\bf LexState} $\ast$ {\em ls}, \/  const char $\ast$ {\em msg}, \/  int {\em token})}}
\label{llex_8c_36bb85db6c63dc629bf20810fc394489}


\hypertarget{llex_8c_f0d2cb247a7700145746c0edba60c63e}{
\index{llex.c@{llex.c}!luaX\_\-lookahead@{luaX\_\-lookahead}}
\index{luaX\_\-lookahead@{luaX\_\-lookahead}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaX\_\-lookahead ({\bf LexState} $\ast$ {\em ls})}}
\label{llex_8c_f0d2cb247a7700145746c0edba60c63e}


\hypertarget{llex_8c_83f747518666054180f6a7f8da55ac42}{
\index{llex.c@{llex.c}!luaX\_\-newstring@{luaX\_\-newstring}}
\index{luaX\_\-newstring@{luaX\_\-newstring}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf TString}$\ast$ luaX\_\-newstring ({\bf LexState} $\ast$ {\em ls}, \/  const char $\ast$ {\em str}, \/  size\_\-t {\em l})}}
\label{llex_8c_83f747518666054180f6a7f8da55ac42}


\hypertarget{llex_8c_8b9f2aa3f74c4e2f814d860dc7f5a6a8}{
\index{llex.c@{llex.c}!luaX\_\-next@{luaX\_\-next}}
\index{luaX\_\-next@{luaX\_\-next}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaX\_\-next ({\bf LexState} $\ast$ {\em ls})}}
\label{llex_8c_8b9f2aa3f74c4e2f814d860dc7f5a6a8}


\hypertarget{llex_8c_de7ea17ed3ba6a7b7df70824015ce3f7}{
\index{llex.c@{llex.c}!luaX\_\-setinput@{luaX\_\-setinput}}
\index{luaX\_\-setinput@{luaX\_\-setinput}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaX\_\-setinput ({\bf lua\_\-State} $\ast$ {\em L}, \/  {\bf LexState} $\ast$ {\em ls}, \/  {\bf ZIO} $\ast$ {\em z}, \/  {\bf TString} $\ast$ {\em source})}}
\label{llex_8c_de7ea17ed3ba6a7b7df70824015ce3f7}


\hypertarget{llex_8c_1304c5741ab55cca55adb3ea2b3331d8}{
\index{llex.c@{llex.c}!luaX\_\-syntaxerror@{luaX\_\-syntaxerror}}
\index{luaX\_\-syntaxerror@{luaX\_\-syntaxerror}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void luaX\_\-syntaxerror ({\bf LexState} $\ast$ {\em ls}, \/  const char $\ast$ {\em msg})}}
\label{llex_8c_1304c5741ab55cca55adb3ea2b3331d8}


\hypertarget{llex_8c_fbf0654ae651496d0e8dcebeefbefed6}{
\index{llex.c@{llex.c}!luaX\_\-token2str@{luaX\_\-token2str}}
\index{luaX\_\-token2str@{luaX\_\-token2str}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ luaX\_\-token2str ({\bf LexState} $\ast$ {\em ls}, \/  int {\em token})}}
\label{llex_8c_fbf0654ae651496d0e8dcebeefbefed6}


\hypertarget{llex_8c_436a66722128b5e44db3efccaa922aa6}{
\index{llex.c@{llex.c}!read\_\-long\_\-string@{read\_\-long\_\-string}}
\index{read\_\-long\_\-string@{read\_\-long\_\-string}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void read\_\-long\_\-string ({\bf LexState} $\ast$ {\em ls}, \/  {\bf SemInfo} $\ast$ {\em seminfo}, \/  int {\em sep})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_436a66722128b5e44db3efccaa922aa6}


\hypertarget{llex_8c_34328f855aff70b081c87aeb21739c09}{
\index{llex.c@{llex.c}!read\_\-numeral@{read\_\-numeral}}
\index{read\_\-numeral@{read\_\-numeral}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void read\_\-numeral ({\bf LexState} $\ast$ {\em ls}, \/  {\bf SemInfo} $\ast$ {\em seminfo})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_34328f855aff70b081c87aeb21739c09}


\hypertarget{llex_8c_5a2d8bb78e2b8e9ee25f901c811b2275}{
\index{llex.c@{llex.c}!read\_\-string@{read\_\-string}}
\index{read\_\-string@{read\_\-string}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void read\_\-string ({\bf LexState} $\ast$ {\em ls}, \/  int {\em del}, \/  {\bf SemInfo} $\ast$ {\em seminfo})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_5a2d8bb78e2b8e9ee25f901c811b2275}


\hypertarget{llex_8c_3418da69613c587915ff780b0ec3744b}{
\index{llex.c@{llex.c}!save@{save}}
\index{save@{save}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void save ({\bf LexState} $\ast$ {\em ls}, \/  int {\em c})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_3418da69613c587915ff780b0ec3744b}


\hypertarget{llex_8c_c847206ac43c94b261205c6b7cef6ee1}{
\index{llex.c@{llex.c}!skip\_\-sep@{skip\_\-sep}}
\index{skip\_\-sep@{skip\_\-sep}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int skip\_\-sep ({\bf LexState} $\ast$ {\em ls})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_c847206ac43c94b261205c6b7cef6ee1}


\hypertarget{llex_8c_3a89ad52b41e79c866d098c24c2a1603}{
\index{llex.c@{llex.c}!trydecpoint@{trydecpoint}}
\index{trydecpoint@{trydecpoint}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void trydecpoint ({\bf LexState} $\ast$ {\em ls}, \/  {\bf SemInfo} $\ast$ {\em seminfo})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_3a89ad52b41e79c866d098c24c2a1603}


\hypertarget{llex_8c_b53c17c8b5ca50bcdfbd1cddf7310e83}{
\index{llex.c@{llex.c}!txtToken@{txtToken}}
\index{txtToken@{txtToken}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static const char$\ast$ txtToken ({\bf LexState} $\ast$ {\em ls}, \/  int {\em token})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{llex_8c_b53c17c8b5ca50bcdfbd1cddf7310e83}




\subsection{Variable Documentation}
\hypertarget{llex_8c_257ea0c8a6651032b46ea8e5d4f8080f}{
\index{llex.c@{llex.c}!luaX\_\-tokens@{luaX\_\-tokens}}
\index{luaX\_\-tokens@{luaX\_\-tokens}!llex.c@{llex.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ const {\bf luaX\_\-tokens}\mbox{[}$\,$\mbox{]}}}
\label{llex_8c_257ea0c8a6651032b46ea8e5d4f8080f}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
    "and", "break", "do", "else", "elseif",
    "end", "false", "for", "function", "if",
    "in", "local", "nil", "not", "or", "repeat",
    "return", "then", "true", "until", "while",
    "..", "...", "==", ">=", "<=", "~=",
    "<number>", "<name>", "<string>", "<eof>",
    NULL
}
\end{verbatim}
\end{Code}
