Flexc++ (Version 0.98.00) User Guide

Frank B. Brokken, Jean-Paul van Oosten, and (until 0.5.3) Richard Berendsen

University of Groningen

2008-2012

Table of Contents

Chapter 1: Introduction

1.1: Running Flexc++

1.1.1: Flexc++ options

1.2: Some simple examples

1.2.1: A simple lexer file and main function
1.2.2: An interactive scanner supporting command-line editing

Chapter 2: Differences between flex and flexc++

2.1: Format of the input file

2.1.1: Definition section
2.1.2: Rules section
2.1.3: User code section

2.2: Patterns

2.3: Generated files

2.4: Comment

2.5: Members and macros

2.6: Multiple input streams

Chapter 3: Format of the input file

3.1: Definitions section

3.1.1: Directives

3.2: Rules section

3.3: Comment

3.4: Patterns

3.5: Actions

3.6: Startconditions (Miniscanners)

3.6.1: Notation details

3.7: Members

3.8: Handling input your own way

Chapter 4: Generated files

4.1: Multiple input streams

Chapter 5: Technical documentation (Wed, 06 Jun 2012 11:28:50 +0000 )

5.1: Notation, Terminology

5.1.0.1: Notations
5.1.0.2: Example patterns with an LA operator

5.2: The parser

5.3: Semantic Data, struct DataType and the class SemUnion

5.3.1: The class Pattern
5.3.2: The class CharClass
5.3.3: The class Interval

5.4: Start Conditions and the class StartConditions

5.5: Code (action) blocks

5.6: The class State

5.7: States

5.8: Rules and the class Rule

5.9: Patterns

5.10: Ranges

5.11: The class TailCount

5.12: The class DFAs

5.13: The DFA

5.13.1: The logic used in 'setTailCount'

5.14: The rows of the DFA: DFAROW

5.15: Patterns using the lookahead operator (LOP)

5.15.1: The LOP handling algorithm
5.15.2: LOP handling: a more extensive example
5.15.3: LOP handling: a problem case
5.15.4: The steps of the LOP handling algorithm

5.16: Final states and ^xyz vs. xyz patterns

5.17: Generating Code

5.17.1: The range-table
5.17.2: The DFAs
5.17.3: The Final-Accept info array

5.18: Run-time operations

5.19: Generating code

5.20: Reflex: refreshing flexc++