Symbian3/SDK/Source/GUID-FE888721-C479-5D8A-810F-1A79575A1D58.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 15:24:34 +0100
changeset 9 59758314f811
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-FE888721-C479-5D8A-810F-1A79575A1D58" xml:lang="en"><title>Introduction
to Lexical Analysis</title><shortdesc>A <codeph>TLex</codeph> object is used to perform lexical analysis. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The class is used to:</p>
<ul>
<li id="GUID-4D79DE44-4E35-56C3-B6ED-5A82CD015FE9"><p>store a string</p> </li>
<li id="GUID-537012CB-CFCC-55C3-82DE-1D9B18539BEC"><p>maintain an extraction
mark to indicate the current lexical element being analysed</p> </li>
<li id="GUID-7B398A9C-42F1-5ABE-80ED-4237F72806BD"><p>maintain a pointer to
indicate the next character to be examined.</p> </li>
</ul>
<p>Member functions provide facilities to allow analysis and extraction of
lexical elements from a <codeph>TLex</codeph> object, and a variety of string-to-number
conversions.</p>
<p>The <codeph>TLex</codeph> class provides general-purpose lexical analysis
functions, using the locale-dependent functions of <codeph>TChar</codeph> to
identify whether characters are digits, letters etc. The data for these locale-dependent
functions is held in kernel-side locale tables. Thus, <codeph>TLex</codeph> functions
which use them, require an executive call. If an application requires very
fast lexical analysis of a language which is not locale-specific, then there
may be some advantage in designing and implementing a special-purpose lexical
analyzer class.</p>
</conbody></concept>