class Syntax::SQLite
def self.add_function(name)
def self.add_function(name) SQLite_PREDEFINED_FUNCTIONS << name end
def step
def step case when scan(/\s+/) start_group :normal, matched when scan(%r{ "(?: \\. | \\" | [^"\n])*" }x) start_group :string, matched when scan(%r{ '(?: \\. | \\' | [^'\n])*' }x ) start_group :string, matched when (scan(/[a-z_][a-z_\d]+/i) or scan(/[<>\|\*%&!=]+/)) m = matched.downcase if SQLite_PREDEFINED_FUNCTIONS.include?( m ) start_group :function, matched elsif SQLite_KEYWORDS.include?( m ) start_group :keyword, matched elsif SQLite_DATATYPES.include?( m ) start_group :datatype, matched elsif SQLite_OPERATORS.include?( m ) start_group :operator, matched else start_group :ident, matched end when scan(/--.*$/) start_group :comment, matched else start_group :other, scan(/./x) end end