subject

The process of converting an input file (stream of characters) into an understandable format is called syntax analysis. It is usually divided into two parts.
The first, lexical analysis, tokenizes the input via a lexical scanner.
The second, parsing, generates an abstract model of the tokens and then generates useful content from that model.

You are to write a syntax analyzer using the flex tool for lexical analysis and the bison tool for parsing. The goal of the program is to parse an input file that contains postal addresses and then to output a representation of those addresses in XML.
Usage: scanner . (lexical Scanning only )

parser (Lexical Scanning and Parsing)

Your program may be called with one of two different names (use UNIX symbolic links to create these names).

If your program is called with the name "scanner", then it should only provide lexical analysis of the file. In this case, the output should be a list of tokens along with any meta-information about the tokens that may be needed. This should be sent to stdout.

If your program is called with the name "parser", then it should provide both lexical analysis and parsing of the file. In this case, output will be sent to both stdout and stderr:

stdout - should be a set of statements indicating whether the file was successfully processed and should include information about bad addresses.

stderr - should be an XML representation of the addresses read from the file. If errors are encountered during the parsing of an address, you should output the best XML possible and ignore the bad information. In parse mode, all work should be performed by the parser.

Your C program should only call yyparse() and provide feedback on its return value.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, Trumpman137
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
image
Computers and Technology, 22.06.2019 16:30, aryal191
Primary tech skills are skills that are necessary for success in online education
Answers: 3
image
Computers and Technology, 23.06.2019 06:30, wwesuplexcity28
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, schvox
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
You know the right answer?
The process of converting an input file (stream of characters) into an understandable format is call...

Questions in other subjects:

Konu
World Languages, 22.10.2019 05:00