Manual Lex

Páginas: 78 (19406 palabras) Publicado: 3 de abril de 2012
24/03/12

pcle _man

Generating Lexical Scanners with PCLEX
PCLEX® is a software product of ABRAXAS SOFTWARE®, Inc. For more information, contact: ABRAXAS SOFTWARE, INC. Post Office Box 19586 Portland, Oregon 97280, USA Phone: 503-232-0540 Fax: 206.309.0304 Email: support@abxsoft.com URL: http://www.abxsoft.com Copyright PCLEX 1986-1997 Abraxas Software, Inc.
Table of Contents * PREFACE *I. INTRODUCTION * 1. Typographic Conventions * 2. Examples * II. Overview of PCLEX * 1. History * 2. What PCLEX Does * III. Command Line and Options * 1. Command Line Format * 1.1 File Name Conventions * 1.2 Command Line Options * 2. Using Command Line Options *
.ab soft.com/pcle _man.html 1/82

24/03/12

pcle _man

2.1 Override Output C File Conventions (-c and -C) * 2.2 Ask PCLEX forHelp (-h or -H) * 2.3 Generate Case-insensitive Scanner (-i or -I) * 2.4 Suppress #line Directives in Scanner (-n or -N) * 2.5 Override Default Scanner Skeleton (-p or -P) * 2.6 Suppress Default Action (-s or -S) * 2.7 Foreign Support for the 8-bit ASCII Character Set (-8) * IV. Basic Concepts Revisited * 1. What is a Programming Language * 2. What is a Programming Language Translator * 3. What areCompilers and Interpreters * 4. Grammar of a Language * 5. Regular Grammar and Regular Language * 6. Regular Expressions * 7. PCLEX Terminology -- A Short Review * V. Getting Started -- OUR FIRST Example * 1. Scanner Description File for Word Count Program * 2. Building the Executable File * 3. Sample Session * VI. Integrating PCYACC and PCLEX * 1. PCYACC -- A Parser Generator * 2. Parser andScanner * 3. C Header File Generated by PCYACC * 4. "yylval" and "YYSTYPE" * VII. Dates -- A Second Example * 1. Problem Statement * 2. Developing the Source Language *
.ab soft.com/pcle _man.html 2/82

24/03/12

pcle _man

3. Separate the Lexical and Syntactic Parts * 4. Write the PCLEX Scanner Description * 5. Write the PCYACC Parser Description * 6. Write the Auxiliary C Code * 7. Buildthe Program * 8. Build the Program with MAKE * VIII. ANSI C SYNTAX Analyzer--A Third Example * 1. Problem Statement * 2. Developing the Source Language * 3. Separate the Lexical and Syntactic Parts * 4. Write the PCLEX Scanner Description * 5. Write the PCYACC Parser Description * 6. Write the Auxiliary C Code * 7. Build the Program * IX. Principles Behind PCLEX * 1. Introduction to FormalLanguages * 2. Regular Expressions * 3. Regular Languages * 4. Non deterministic Finite State Machines (NDFSM) * 5. Deterministic Finite State Machines (DFSM) * 6. PCLEX -- From Regular Expressions to DFSM * X. Writing PCLEX Syntax Descriptions * 1. Regular Expressions * 1.1 Operators * 1.2 Character Classes * 1.3 Repetition * 1.4 Arbitrary Character *
.ab soft.com/pcle _man.html 3/82

24/03/12pcle _man

1.5 Alternation and Grouping * 1.6 Optional Expressions * 1.7 Context Sensitivity * 2. Actions * 3. Ambiguous Rules * 4. Definitions * 5. Context Sensitivity * 5.1 Actions and User Subroutines * 5.2 Start Conditions * 5.3 Exclusive Start Conditions * 5.4 Special Position Anchors * Appendix A. Installation * 1. System Requirements * 2. Making Working Copies * 3. Installing PCLEX *Appendix B. Error Messages * Appendix C. Extending and Customizing Scanners * 1. Macros * 2. Variables * 3. Functions * 4. Scanner Skeleton Format * Appendix D. Bibliography * Appendix E. Glossary * Appendix F. Differences between LEX and PCLEX * Appendix G. Differences between FLEX and PCLEX * Index *

PREFACE
.ab soft.com/pcle _man.html 4/82

24/03/12

pcle _man

ABRAXAS PCLEX is aprogram generator for writing lexical scanners. Lexical scanners read a stream of characters and divide it into identifiers, keywords, and other symbols of the target language. PCLEX translates a scanner written in the Scanner Description Language (SDL) into the host language C. SDL is a high level language oriented towards string matching. It is a special purpose language; where the generality of a...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Manual de lex
  • lexo
  • Lexar
  • lexa
  • Lex
  • Lex
  • Lexo
  • Dura lex, sed lex

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS