Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

T1={supper,abcd1e}T2={abd} SUPPERID = strings that are ID (see below) and that have supper as prefix. For example, supper123, supper, supperabc are SUPPERID, but supper_ is

image text in transcribedimage text in transcribed

T1={"supper","abcd1e"}T2={"abd"} SUPPERID = strings that are ID (see below) and that have "supper" as prefix. For example, "supper123", "supper", "supperabc" are SUPPERID, but "supper_" is not SUPPERID because "supper_" is not an ID ID = Set of strings that consist of a letter or underscore that is followed by zero or more letters and/or digits. For example, ",",_11", "_1alb" are IDs, but "_" and "a_" are not IDs according to this definition CRAZYID = Set of strings that consist of an ID followed by "_crazy". For example, "a_crazy" is a CRAZYID, but "a_CRAZY", "acrazy" and "a_crazy" (two underscores) are not a CRAZYID NUM = Set of strings that consist of a non-zero digit that is followed by 1 or more digits or the string "0". For this problem, when identifying tokens in the input, we treat \& and ! as separators. This means that getToken() should stop when it reaches \& or ! and returns the longest matching prefix up to but not including the separator. The separator itself (\& or !) cannot be part of a token, so the next token starts after the separators. \& and ! are the only separator. Space characters are not separators for this problem. Consider the input: supper22_crazyabc!!\&d1_11\&_supper_11\&123abcd1e and the following sequence of calls: t1=lexer.GetToken(;t2=lexer.GetToken(;t3=lexer.peek(1);t4=lexer.peek(3);t5=lexerpeek(5);t6=lexer.peek(7); t7=lexer.GetToken0;t8=lexer.GetToken0; What are the values of t1,t2,t3,t4,t5,t6,t7 and ts? You are only asked to give the values and not to explain how you obtained them

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

Students also viewed these Databases questions

Question

Given X ~ N(X,2X), prove that ~ N(X, 2X / n).

Answered: 1 week ago

Question

Draw the design process and explain the major stages of it.

Answered: 1 week ago

Question

Proficiency with Microsoft Word, Excel, PowerPoint

Answered: 1 week ago

Question

Experience with SharePoint and/or Microsoft Project desirable

Answered: 1 week ago