9 Tools and Libraries
This chapter discusses tools and libraries bundled with HP aC++. It discusses the following topics:
•“HP Specific Features of lex and yacc” (page 175)
•“Creating and Using Libraries” (page 175)
•“HP aC++ File Locations” (page 186)
HP Specific Features of lex and yacc
lex and yacc are bundled with HP aC++. The following is a list of HP specific features of lex and yacc:
•LC_CTYPE and LC_MESSAGES environment variable support in lex:
Determines the size of the characters and language in which messages are displayed while you use lex.
•
Specifies that multibyte characters may be used anywhere single byte characters are allowed. You can intermix both
•
Includes all features in
•%l <locale> directive for lex:
Specifies the locale at the beginning of the definitions section. Any valid locale recognized by the setlocale function can be used. This directive is similar to using the LC_CTYPE environment variable. To receive wchar_t support with %l, use the
•LC_CTYPE environment variable support in yacc:
Determines the native language set used by yacc and enables multibyte character sets. Multibyte characters can appear in token names, on terminal symbols, strings, comments, or anywhere ASCII characters can appear, except as separators or special characters.
NOTE: When using lex and yacc:
•Programs generated by yacc or lex can have many unreachable break statements, causing multiple aC++ warnings.
•If you want to call the yacc generated routines, yyerror, yylex and yyparse, your program must include the yacc.h header file:
#include<yacc.h>
For more information on these tools, refer to the lex and yacc man pages or the
Creating and Using Libraries
This section gives an overview of libraries provided with HP aC++. It also discusses how you can create and use your own libraries.
This section discusses the following topics:
HP Specific Features of lex and yacc 175