Skip to Main Content (Press Enter)

Logo CNR
  • ×
  • Home
  • People
  • Outputs
  • Organizations
  • Expertise & Skills

UNI-FIND
Logo CNR

|

UNI-FIND

cnr.it
  • ×
  • Home
  • People
  • Outputs
  • Organizations
  • Expertise & Skills
  1. Outputs

Techniques for Searching, Parsing, and Matching

Book
Publication Date:
2013
abstract:
In this book we present some techniques for exploring trees and graphs. We illustrate the linear search technique and the backtracking technique, and as instances of tree exploration methods, we present various algorithms for parsing subclasses of context- free languages. They include: (i) the chop-and-expand parsers for LL(k) languages, (ii) the shift-and-reduce parsers for LR(k) languages and, among them, the LR(0), the SLR(1), the LR(1), and the LALR(1), and (iii) the operator-precedence parsers. We illustrate the use of the parser generators Bison and Yacc, and the lexical analyzer generator Flex. We also illustrate some tree exploration and manipulation methods by presenting algorithms for visiting trees, evaluating boolean expressions, proving propositional formulas, and encoding trees. We consider the minimal spanning tree problem in undirected graphs and the shortest path problem in directed graphs. For the latter problem we present the solutions based on boolean matrix multiplication, semirings, and dynamic programming. Finally, we consider the pattern-matching problem and we analyze the Knuth- Morris-Pratt algorithm. In the appendices we present some parsing programs writ- ten in Prolog, and we briefly recall some decidability results concerning the LL(k) languages and the LR(k) languages.
Iris type:
03.09 Manuale/libro di testo
Keywords:
Searching; Context-free Parsing; Matching
List of contributors:
Pettorossi, Alberto
Handle:
https://iris.cnr.it/handle/20.500.14243/335373
  • Use of cookies

Powered by VIVO | Designed by Cineca | 26.5.0.0 | Sorgente dati: PREPROD (Ribaltamento disabilitato)