Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
inserting preprocessor module between the loader a

Inserting preprocessor module between the loader and the lexical analyzer

860 14. BUILDING THE XTREMESCRIPT COMPILER FRAMEWORK

Figure 14.3

Storing source code in

Although virtually every plain text file in the world is stored in the ASCII format, the specific method for denoting line breaks often changes significantly from one platform to the next. To make things easier to manage internally, and to aid in portability, the loader will be responsible for ensuring that the in-memory version of the source code uses a consistent representation for line breaks and newlines.

Team-Fly®

Figure 14.4

The preprocessor

The Lexical Analyzer Module

As you know well by now, the lexer is responsible for converting the raw source code into a more usable format for the parser. This particular module doesn’t do anything on its own, however; although its convention to treat the lexer as its own conceptual step that takes place independ-ently, before the parser, it actually operates in parallel with it. The parser is responsible for invok-ing the lexer on a regular basis to return the next token in the stream, so the lexer doesn’t actual-ly execute until the parser explicitly calls it.

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Catherine Williams

PageId: DOCC198F40