Table of Contents - oedipus_lex-2.6.1 Documentation
Pages
- History
- Manifest
-
README
- Oedipus Lex - This is not your father’s lexer
- DESCRIPTION
- Syntax:
- Basic Example
- Header
- Class Line
- Options
- Inner
- Macros
- Start
- Rules
- States and Predicates
- End & Footer
- Suggested Structure
- Rakefile
- lib/mylexer.rex
- lib/mylexer.rb
- lib/myparser.rb
- Differences with Rexical
- Additions or Changes
- A generic rake rule is defined for rex files.
- All regular expressions must be slash delimited.
- Regular expressions now use ruby interpolation.
- Macros define class constants.
- Rules can be activated by predicate methods.
- Rule actions are only a single-line.
- Rules can invoke methods.
- Rules can define state.
- Use a ‘start` section to define pre-lex code.
- Rule state can be inclusive or exclusive.
- Default ‘do_parse` will dispatch to lex_xxx automatically.
- ‘text` is passed in, or use `match` or `matches`
- You can override the scanner class by defining ‘scanner_class`.
- Removals
- There is no command-line tool.
- There are only two options: debug and stub.
- Probably others…
- Requirements:
- Install
- License
- oedipus_lex.rex
- error1
Classes and Modules
Methods
- ::[] — OedipusLex::Rule
- ::[] — OedipusLex
- ::[] — OedipusLex::Group
- #<< — OedipusLex::Group
- #action — OedipusLex
- #column — OedipusLex
- #do_parse — OedipusLex
- #end_group — OedipusLex
- #generate — OedipusLex
- #lex_class — OedipusLex
- #lex_comment — OedipusLex
- #lex_end — OedipusLex
- #lex_group — OedipusLex
- #lex_groupend — OedipusLex
- #lex_grouphead — OedipusLex
- #lex_inner — OedipusLex
- #lex_macro — OedipusLex
- #lex_option — OedipusLex
- #lex_rule — OedipusLex
- #lex_start — OedipusLex
- #lex_state — OedipusLex
- #location — OedipusLex
- #matches — OedipusLex
- #next_token — OedipusLex
- #parse — OedipusLex
- #parse_file — OedipusLex
- #scanner_class — OedipusLex
- #to_ruby — OedipusLex::Rule