IBM SC34-4499-03 manual Working with parsers, Creating a parser, 175

Models: SC34-4499-03

1 356
Download 356 pages 55.74 Kb
Page 195
Image 195

Chapter 14. Working with parsers

This chapter describes how to create a parser. It assumes that you have read ªChapter 10. Basic build conceptsº on page 129.

Consider the task of de®ning and maintaining a build tree. One of the more time-consuming, and error-prone, portions of this task is de®ning the dependencies that one TeamConnection part has on others.

For example, if hello.c includes hello.h, you need to de®ne hello.h as a dependency of hello.c in the build tree. That sounds simple enough, but imagine a real application in which there are hundreds of dependencies and the dependencies have dependencies. De®ning such a tree becomes very difficult; maintaining it, even more so.

To solve this problem and automate some of the work of de®ning and maintaining a build tree, you can instead use a parser object. The task of a parser is to inspect source code to determine dependencies. TeamConnection veri®es all parser dependencies when the user creates or checks in the part and again during build. TeamConnection will add all parser dependencies that it can ®nd and, for build, update them as needed. In the previous example, a parser can inspect hello.c, recognize that it has a dependency on hello.h, and create that dependency in the TeamConnection build tree.

Because parsers are language-dependent, you probably need a different parser for each language you use in a particular release. For example, you might have both a COBOL parser and a C parser in a release. Many parts in the release can use the same parser.

Usually a TeamConnection administrator de®nes parsers, but anyone with the proper authority can do so. For more information about the required authority, see Appendix I. Authority and noti®cation for TeamConnection actions.

Creating a parser

As with most other TeamConnection operations, there are two ways you can create a parser: using the graphical user interface (GUI) or the command line interface.

To create a parser using the GUI:

1.From the Actions pull-down menu on the Tasks window, select Parsers Create.

2.On the Create Parser window, type the requested information.

© Copyright IBM Corp. 1992, 1995, 1996, 1997, 1998

175

Page 195
Image 195
IBM SC34-4499-03 manual Working with parsers, Creating a parser, 175