Question

1B. Explain the pointers used in the buffer pairs. Also explain how these pointers in the 2M buffer pair overcome the drawbac

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Two pointers are used in buffer pairs:

lexemeBegin Pointer:

It marks the beginning of the current lexeme, whose extent you are attempting to determine.

forward Pointer:

Scans until a pattern match is identified(found).

Once the next lexeme is determined, forward is set to the character at its right end.

After the lexeme is recorded as an attribute value a token returned to the parser, lexemeBegin is set to the character immediately after the lexeme that is identified.

A buffer is divided into two N-character halves

Each buffer is of the same size N. N is the number of characters on one block(1024 or 4096 bytes).

Using one system read command we can read N characters into a buffer.

If fewer than N characters remain in the input file, then a special character, represented by eof, marks the end of the source.

Because the amount of time taken to process characters and the larger no. of. characters that are done during the compilation of a large source program, specialized buffering techniques have been developed to reduce the amount of overhead required to process a single input character.

The unary, postfix operator + represents the positive closure of a regular expression and its language.

If r is a regular expression, then ( r ) + denotes the language (L(r)) + .

The operator + has the same precedence and associativity as the operator *.

Two useful algebraic laws, r* = r+1e and r+ = rr* = r*r relate the Kleene closure and positive closure.

You can do by quoting the character within a string of length one or more than that.

For example,the regular expression "**" matches the string **.

We can also get the meaning of an operator character by preceding it by a /.

So, the regular expression 1 * 1 * also matches the string **

Add a comment
Know the answer?
Add Answer to:
1B. Explain the pointers used in the buffer pairs. Also explain how these pointers in the 2M buffer pair overcome the d...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1a. Explain how bacteria can have poly cistronic mRNAs. 1b. Explain why eukaryotes don't have poly...

    1a. Explain how bacteria can have poly cistronic mRNAs. 1b. Explain why eukaryotes don't have poly cistronic mRNAs. 2. Draw all the parts of a typical sliced out mRNA lariat, showing the donor (gu) and acceptor (ag) nucleotides, and the conserved branch point A. Indicate any unusual base pair linkages and explain where and what they are (arrows and a few words!). 3. Give the levels of B-galactosidase activity (+ or -) expected for the following partial diploids for the...

  • I am currently stuck with this portion of my assignment: Pointers review: to help determine how...

    I am currently stuck with this portion of my assignment: Pointers review: to help determine how many fields are presented from the form at run time, the program will count the '=' signs from the QUERY_STRING and dynamically create a name_value_pairs array of cnt elements to be used by parse() and param(). Here is what to do, in order: As directed above, make a back up of the work so far and work with the new version named retrieve_form_OOP_2.cpp. These...

  • Note 1: Write on both sides of the paper to save some trees and also stationery for the departmen...

    help please Note 1: Write on both sides of the paper to save some trees and also stationery for the department Note 2: In the answers, you need to show the work out: jotting down the answers simply will not do Note 3: Don't scribble answers on this sheet Note 4: This page should be submitted along with your answers; don 'Y take it away Q.1. Find the minimum POS form of the following switching function using Karnaugh map: f(lr....

  • Can you explain how and why? cular Models Pre-Lab Questions ) Lewis Structures are used to...

    Can you explain how and why? cular Models Pre-Lab Questions ) Lewis Structures are used to represent covalently bonded molecules and polyatomic ions. a. Answer the following to draw the Lewis Structure of the molecule of OF i. How many valence electrons (total) are you working with? ii. Which atom is the central atom? What criteria must you use to decide this? Do the atoms in the molecule all obey the octet rule? Are there any lone pairs on the...

  • Please explain how you got the answers to A-D, I have to show work. Also, please...

    Please explain how you got the answers to A-D, I have to show work. Also, please do not forget (d) all the way on the bottom. It all didn't fit in the snapshot but you can still see the equation. Thank you! 3. [-/1 Points] DETAILS 0/1 Submissions Used Complete and balance the following acid-base and acid-carbonate reactions. (Use the lowest possible coefficients.) (a) HNO3 + KOH → Help chemPad x.x = Greek (b) HC2H302 + K2CO3 → chemPad Help...

  • question 7, can you also explain it very thoroughly how you got the answer and the...

    question 7, can you also explain it very thoroughly how you got the answer and the steps to get the answer such as step 1, 2, 3 that would be much appreicated thank you very much. new house duction in n the new equipment - between national income will fall and they will end up saving no more than they were initially. Use the model and diagrams of this chapter to show how an (autono- mous) increase in desired saving...

  • checksum value. Find the checksum value for the following 32 bits of data. Assume Checksum uses only the data portion. Also explain how is UDP Pseudo-Header is used, Data 1100 1010 1110 0101 1000 000...

    checksum value. Find the checksum value for the following 32 bits of data. Assume Checksum uses only the data portion. Also explain how is UDP Pseudo-Header is used, Data 1100 1010 1110 0101 1000 0001 0011 0011 checksum value. Find the checksum value for the following 32 bits of data. Assume Checksum uses only the data portion. Also explain how is UDP Pseudo-Header is used, Data 1100 1010 1110 0101 1000 0001 0011 0011

  • Please help! Comments added in would be a great help. Thank you! Input file T-Mobile Wi-Fi...

    Please help! Comments added in would be a great help. Thank you! Input file T-Mobile Wi-Fi 10:33 AM * 85% Objectives: The main objectives of this project are to test your ability to create and use dynamic memory, and to review your knowledge to manipulate classes, pointers and iostream to all extents For this project you will create your own String class. You may use square bracket-indexing pointers, references, all operators, as well as the <string.h> or <estring library functions...

  • mheristic can be (d) Define and draw a directional mho characteristic typically used in distance protection. Explain how this characteristic can bee implemented using an amplitude comparator by addre...

    mheristic can be (d) Define and draw a directional mho characteristic typically used in distance protection. Explain how this characteristic can bee implemented using an amplitude comparator by addressing briefly the following points: (i) indicate which signals are used as operating and restraining quantities of the comparator (ii) define the operating condition of this protection; and (ili) illustrate the zone of operation on the impedance complex plane. mheristic can be (d) Define and draw a directional mho characteristic typically used...

  • please solve and and explain how it was done thank you C D E F G...

    please solve and and explain how it was done thank you C D E F G H I J K L Acme Shoe Company makes special-style shoes. It has a fixed cost of $1000 for production setup. The variable cost is $30 per pair and each pair sells for $40. 5 Known parameters: 6 Selling price per unit Fixed cost Variable cost per unit What is the breakeven revenue? 10 Input Data Number of units Is it possible to achieve...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT