Class Index

Quicksearch

Arrow::Template::Parser::Patterns

Regexp constants for parsing

Constants

TAGOPEN
The Regexp that is used to match directive tag openings. Must be at least 2 characters wide.
TAGMIDDLE
The Hash that maps tag-closings to tag-middle patterns.
TAGCLOSE
The Hash that maps tag openings to matching tag closings with flipped braces.
CAPTURE
Paren-group map
ALTERNATION
(Not documented)
DOT
Constant patterns for parsing
COMMA
(Not documented)
WHITESPACE
(Not documented)
EQUALS
(Not documented)
INFIX
(Not documented)
IDENTIFIER
(Not documented)
LBRACKET
(Not documented)
RBRACKET
(Not documented)
NUMBER
(Not documented)
TICKQSTRING
:FIXME: I would do this with something like /(["’/])((?:[^\1]|\\.)*)\1/, but Ruby apparently doesn‘t grok backreferences inside character classes: (ruby 1.8.1 (2003-10-25) [i686-linux]) irb(main):001:0> /(["’])((?:[^\1]|\\.)*)\1/.match( # %{foo "and \"bar\" and baz" and some "other stuff"} )[0]
  ==> "\"and \"bar\" and baz\" and some \"other stuff\""
DBLQSTRING
(Not documented)
SLASHQSTRING
(Not documented)
QUOTEDSTRING
(Not documented)
SYMBOL
(Not documented)
VARIABLE
(Not documented)
REGEXP
(Not documented)
REBINDOP
(Not documented)
PATHNAME
(Not documented)
ARGUMENT
(Not documented)
ARGDEFAULT
(Not documented)

secsequence

--- SEC00161

seccomment

--- ""

sectitle

--- 

constants

--- 
- name: TAGOPEN
  desc: |+
    
    The Regexp that is used to match directive tag openings. Must be at least 2
    characters wide.
    
  value: "%r{([<|\\[])\\?}"
- name: TAGMIDDLE
  desc: |+
    
    The Hash that maps tag-closings to tag-middle patterns.
    
  value: "Hash.new {|hsh, key|             # Extract the first and second characters from the tag-closing             # pattern to build the tag-middle pattern.             src = key.is_a?( Regexp ) ? key.source : key.to_s"
- name: TAGCLOSE
  desc: |+
    
    The Hash that maps tag openings to matching tag closings with flipped
    braces.
    
  value: Hash.new {|hsh, key|              compliment = key.reverse.tr('<{([', '>})]')
- name: CAPTURE
  desc: |+
    
    Paren-group map
    
  value: Hash.new {|hsh, key|             Regexp.new( '(' + key.to_s + ')' )
- name: ALTERNATION
  value: Hash.new {|hsh, *keys|             Regexp.new( '(?:' + keys.join('|') + ')' )
- name: DOT
  desc: |+
    
    Constant patterns for parsing
    
  value: /\./
- name: COMMA
  value: /,/
- name: WHITESPACE
  value: /\s*/
- name: EQUALS
  value: /=/
- name: INFIX
  value: /\.|::|(?>\[)/
- name: IDENTIFIER
  value: /[a-z]\w*/i
- name: LBRACKET
  value: /[\[(]/
- name: RBRACKET
  value: Hash.new {|hsh, key|             compliment = key.tr( '<{([', '>})]' )
- name: NUMBER
  value: /[-+]?\d+(?:\.\d+)?(?:e-?\d+)?/
- name: TICKQSTRING
  desc: |
    
    :FIXME: I would do this with something like
    /(["’/])((?:[^\1]|\\.)*)\1/, but Ruby apparently doesn‘t
    grok backreferences inside character classes: (ruby 1.8.1 (2003-10-25)
    [i686-linux]) irb(main):001:0>
    /(["’])((?:[^\1]|\\.)*)\1/.match( # %{foo "and
    \"bar\" and baz" and some "other stuff"} )[0]
    
    <pre>
      ==&gt; &quot;\&quot;and \&quot;bar\&quot; and baz\&quot; and some \&quot;other stuff\&quot;&quot;
    </pre>

  value: /'((?:[^']|\\')*)'/
- name: DBLQSTRING
  value: /&quot;((?:[^&quot;]|\\&quot;)*)&quot;/
- name: SLASHQSTRING
  value: "%r{/((?:[^/]|\\\\/)*)/}"
- name: QUOTEDSTRING
  value: ALTERNATION[[ TICKQSTRING, DBLQSTRING, SLASHQSTRING ]]
- name: SYMBOL
  value: /:[@$]?[a-z]\w+/ | /:/ +             ALTERNATION[[ DBLQSTRING, TICKQSTRING ]]
- name: VARIABLE
  value: /(?:\$|@@?)?_?/ + IDENTIFIER
- name: REGEXP
  value: "%r{/((?:[^/]|\\\\.)+)/}"
- name: REBINDOP
  value: /\s*(?:=~|matches)(?=\s)/
- name: PATHNAME
  value: "%r{((?:[-\\w.,:+@#$\\%\\(\\)/]|\\\\ |\\?(?!&gt;))+)}"
- name: ARGUMENT
  value: /[*&amp;]?/ + IDENTIFIER
- name: ARGDEFAULT
  value: EQUALS + WHITESPACE +             ALTERNATION[[ IDENTIFIER, NUMBER, QUOTEDSTRING, SYMBOL, VARIABLE ]]

[Validate]

Generated with the Darkfish Rdoc Generator.