Skip to content

Introducing Teuchos Parser

James Willenbring requested to merge ibaned:teuchos-parser into develop

Created by: ibaned

This PR introduces the Teuchos Parser subpackage as proposed by #1371 (closed). The subpackage includes the following:

  • table generators for regular expressions and LALR(1) parsers
  • a Language class to define a language format
  • a Reader base class that users subclass to build their parsers
  • Languages for subsets of regular expressions, XML, and YAML
  • Documentation for Language, Reader, and other important user-level classes
  • Unit tests, including for the built-in Languages
  • An example "Calc" program that evaluates scalar math expressions
  • Compiles under C++98

A few additions were made to Teuchos::any and Teuchos_Assert.hpp to support Teuchos Parser. No existing behavior was altered.

As of this PR, Teuchos Parser is not yet required by anything else in Trilinos (or Teuchos). I believe it makes sense to first introduce the code and let it go through a few cycles of CI testing before starting to use it in other parts of Trilinos.

@trilinos/teuchos @bartlettroscoe

Merge request reports