Previous
ToC
Up
Next
Contents
0. Preface
0.1. Acknowledgments
1. Command Line Arguments
1.1. A New Approach
1.2. Flexibility
1.3. Various Options
1.4. A Critical Attitude
1.5. An Overview
1.6. A Beautiful Violation
1.7. Arguments about Arguments
2. Encapsulating Information
2.1. A Soft Violation
2.2. Four Occurrences
2.3. Danger
2.4. A Matter of Principle
2.5. An Option Block
2.6. Growing a Manual
2.7. An Full Option List
3. Implementation:
Clop
Entry Points
3.1. A New Driver
3.2. Invoking the Parser
3.3. The Clop Class
3.4. Creating a
Clop
Instance
3.5. Parsing Option Definitions: the Idea
3.6. Parsing Option Definitions: the Method
3.7. Parsing Command Line Options: the Idea
3.8. Parsing Command Line Options: the Method
3.9. Printing Values
4. The First Journey:
Clop
, the Non-help Part
4.1. Three Journeys
4.2. Inspecting
find_option
4.3. The Last Cryptic Bit
4.4. Inspecting
parse_option
4.5. Extracting the Value: Normal Case
4.6. Extracting the Value: Compact Case
4.7. Interesting or Confusing?
4.8. Extracting the Value: Vector Case
4.9. Inspecting
initialize_global_variables
5. The Second Journey:
Clop_option
5.1. Code Listing
5.2. Parsing An Option Definition
5.3. Are we Done Yet?
5.4. A Non-Greedy Wild Card
5.5. Extracting the Name from a Definition
5.6. Extracting the Content from a Definition
5.7. Two Types of Mistakes
6. More Parsing of Single Lines
6.1. Recognizing the Type
6.2. Default Values
6.3. A Matter of Principles
6.4. Descriptions
6.5. Reflections on Ruby
6.6. A Comic Book Code Line
6.7. Evaluating Values
7. Initial State Output
7.1. The
to_s
Method
7.2. The Header Option
7.3. A Boolean Option
7.4. A Hack
7.5. A Vector Option
7.6. A Pyramid of Evaluations
8. The Third Journey:
Clop
, the Help Part
8.1. Two forms of Help
8.2. Help for Selected Options
8.3. Parsing Help
8.4. Printing Help: the Idea
8.5. Printing Help: the Method
8.6. What is Needed When
8.7. The Finishing Touch
9. A Built-In Test Facility
9.1. Testing Without a Driver
9.2. Required Options
9.3. A Boolean Option
9.4. A Vector Option
9.5. A Star Type Option
9.6. No Comment
9.7. The Answer
10. The
Clop
Code
10.1. Test Drivers
10.2. Code Listing
11. Literature References
Previous
ToC
Up
Next