class Rouge::Lexers::XPath

Public Class Methods

axes() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 65
def self.axes
  @axes ||= Regexp.union %w(
    child descendant attribute self descendant-or-self
    following-sibling following namespace
    parent ancestor preceding-sibling preceding ancestor-or-self
  )
end
commentStart() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 44
def self.commentStart
  @commentStart ||= %r/\(:/
end
constructorTypes() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 90
def self.constructorTypes
  @constructorTypes ||= Regexp.union %w(function array map empty-sequence)
end
decimalLiteral() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 16
def self.decimalLiteral
  @decimalLiteral ||= %r/\.#{digits}|#{digits}\.[0-9]*/
end
digits() click to toggle source

Terminal literals: www.w3.org/TR/xpath-31/#terminal-symbols

# File lib/rouge/lexers/xpath.rb, line 12
def self.digits
  @digits ||= %r/[0-9]+/
end
doubleLiteral() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 20
def self.doubleLiteral
  @doubleLiteral ||= %r/(\.#{digits})|#{digits}(\.[0-9]*)?[eE][+-]?#{digits}/
end
eqName() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 40
def self.eqName
  @eqName ||= %r/(?:#{uriQName}|#{qName})/
end
keywords() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 77
def self.keywords
  @keywords ||= Regexp.union %w(let for some every if then else return in satisfies)
end
kindTest() click to toggle source

Terminal symbols: www.w3.org/TR/xpath-30/#id-terminal-delimitation

# File lib/rouge/lexers/xpath.rb, line 54
def self.kindTest
  @kindTest ||= Regexp.union %w(
    element attribute schema-element schema-attribute
    comment text node document-node namespace-node
  )
end
kindTestForPI() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 61
def self.kindTestForPI
  @kindTestForPI ||= Regexp.union %w(processing-instruction)
end
ncName() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 28
def self.ncName
  @ncName ||= %r/[a-z_][a-z_\-.0-9]*/i
end
openParen() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 48
def self.openParen
  @openParen ||= %r/\((?!:)/
end
operators() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 73
def self.operators
  @operators ||= Regexp.union %w(, => = := : >= >> > <= << < - * != + // / || |)
end
qName() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 32
def self.qName
  @qName ||= %r/(?:#{ncName})(?::#{ncName})?/
end
stringLiteral() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 24
def self.stringLiteral
  @stringLiteral ||= %r/("(("")|[^"])*")|('(('')|[^'])*')/
end
uriQName() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 36
def self.uriQName
  @uriQName ||= %r/Q\{[^{}]*\}#{ncName}/
end
word_operators() click to toggle source
# File lib/rouge/lexers/xpath.rb, line 81
def self.word_operators
  @word_operators ||= Regexp.union %w(
    and or eq ge gt le lt ne is
    div mod idiv
    intersect except union
    to
  )
end