ITWissen.info - Tech know how online

software scanner

Software scanners are programs that analyze input characters or are used for security-related tasks that increase cyber security and detect and eliminate vulnerabilities in networks. As a security tool for system administration, software scanners can provide important information about the services operated, user IDs, access authorizations and authentications. Virus scanners, on the other hand, scan files for viruses.

Scanner in context with compilers

The scanner forms the first phase of the compiler. Its main task is to read input characters and produce a sequence of symbols as output, which the following parser analyzes syntactically.

Interaction of the scanner with the parser

Interaction of the scanner with the parser

This reciprocal relationship is usually implemented in such a way that the scanner acts as a sub- or coroutine of the parser. Upon receiving a "pass next symbol" command given by the parser, the scanner reads input characters until it recognizes the next symbol.

The scanner is the part of the compiler that reads the source code. It is therefore obvious to assign further tasks to it with regard to the user interface. One of these tasks is to clean the source program from comments and spaces, tabs and line breaks. Another task is to assign the corresponding positions in the source program to the error messages of the compiler. For example, the scanner might remember the number of previous line breaks to assign an error message to a line number. In some compilers, the scanner must make a copy of the source program with error messages interspersed. If the source language provides functions of a macro processor, these functions may also be implemented as part of the lexical analysis.

Sometimes scanners are divided into two successive phases. The first phase does the pure reading of the input stream, the second does the actual lexical analysis. The tasks of the first phase are quite simple, while the more complex tasks are part of the second phase. One can imagine, for example, that in a compiler spaces in the input are removed by the read phase.

Informations:
Englisch: software scanner
Updated at: 09.04.2012
#Words: 334
Links: security, cyber security (CS), arsenic (As), tool, system
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024