Download PCLEX Manual - Abraxas Software
Transcript
Page 2 5. Regular Grammar and Regular Language ...................................................18 6. Regular Expressions....................................................................................19 7. PCLEX Terminology -- A Short Review .....................................................21 V. Getting Started -- OUR FIRST Example.................................................................23 1. Scanner Description File for Word Count Program.....................................23 2. Building the Executable File ........................................................................25 3. Sample Session.............................................................................................25 VI. Integrating PCYACC and PCLEX .........................................................................26 1. PCYACC -- A Parser Generator ..................................................................26 2. Parser and Scanner .......................................................................................26 3. C Header File Generated by PCYACC ........................................................27 4. "yylval" and "YYSTYPE"............................................................................27 VII. Dates -- A Second Example..................................................................................29 1. Problem Statement .......................................................................................29 2. Developing the Source Language.................................................................29 3. Separate the Lexical and Syntactic Parts......................................................30 4. Write the PCLEX Scanner Description........................................................30 5. Write the PCYACC Parser Description .......................................................32 6. Write the Auxiliary C Code .........................................................................35 7. Build the Program ........................................................................................37 8. Build the Program with MAKE ...................................................................38 VIII. ANSI C SYNTAX Analyzer--A Third Example .................................................40 1. Problem Statement .......................................................................................40 2. Developing the Source Language.................................................................40 3. Separate the Lexical and Syntactic Parts......................................................41 4. Write the PCLEX Scanner Description........................................................41 5. Write the PCYACC Parser Description .......................................................52 Copyright (c) 1986-2000 Abraxas Software, Inc.