subject

Exercise. (a tokenizer for a small imperative language) a program that accepts a sequence of characters and returns a sequence of tokens is called a tokenizer or lexical analyzer. a compiler is a program that translates a sequence of characters, which represents a program, into a sequence of lowlevel instructions that can be executed on a machine. in its most basic form, a compiler consists of three parts: 1. tokenizer: reads a sequence of characters and outputs a sequence of tokens.2. parser: reads a sequence of tokens and outputs an abstract syntax tree (parse tree)3. code generator: traverses the syntax tree and generates low-level instructions for a real machine or an abstract machine. the proposed imperative language which should be tokenized has the following list of tokens: keywords, operators, atoms, integers, floats, and separators. the keywords are: program, void, bool, int, float, true, false, if, then, else, local, in, end, assign, call. the operators are: ‘=’, ‘+’, ‘-‘, ‘*’, ‘/’, ‘==’, ‘! =’, ‘> ’, ‘=’. an atom starts with a lowercase character, followed by any number of alphanumeric characters, but it cannot be a keyword

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:30
Gerard is currently working as an entry-level customer support technician, but he would like to someday become a software developer. what is the best first step to understand what he should do? ask his manager for a new job or at least a job recommendation study graphic design in order to obtain the necessary skills use career resources to investigate what skills and education are required work part-time as an entry-level web developer question 13 (true/false worth 6 points) (08.03 lc) career resources are used to explore career options and find career information. true false question 14(multiple choice worth 6 points) (08.01 mc) classify the following skills: writing html code, evaluating color theory, using design principles. hard skills interpersonal skills people skills soft skills question 15 (true/false worth 6 points) (08.03 lc) a mentor is a person who is advised, trained, or counseled by a trusted mentee. true false
Answers: 2
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
You know the right answer?
Exercise. (a tokenizer for a small imperative language) a program that accepts a sequence of charact...
Questions
question
Mathematics, 02.02.2021 18:50
question
English, 02.02.2021 18:50
question
Mathematics, 02.02.2021 18:50
question
Social Studies, 02.02.2021 18:50
question
Mathematics, 02.02.2021 18:50
Questions on the website: 13722360