Class: Rouge::Lexers::MiniZinc
- Inherits:
-
RegexLexer
- Object
- Rouge::Lexer
- RegexLexer
- Rouge::Lexers::MiniZinc
- Defined in:
- lib/rouge/lexers/minizinc.rb
Constant Summary
Constants inherited from RegexLexer
Constants included from Token::Tokens
Token::Tokens::Num, Token::Tokens::Str
Instance Attribute Summary
Attributes inherited from Rouge::Lexer
Class Method Summary collapse
Methods inherited from RegexLexer
append, #delegate, get_state, #get_state, #goto, #group, #groups, #in_state?, #pop!, prepend, #push, #recurse, replace_state, #reset!, #reset_stack, #stack, start, start_procs, #state, state, #state?, state_definitions, states, #step, #stream_tokens, #token
Methods inherited from Rouge::Lexer
aliases, all, #as_bool, #as_lexer, #as_list, #as_string, #as_token, assert_utf8!, #bool_option, #continue_lex, continue_lex, debug_enabled?, demo, demo_file, desc, detect?, detectable?, disable_debug!, enable_debug!, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #hash_option, #initialize, lex, #lex, #lexer_option, #list_option, lookup_fancy, mimetypes, option, option_docs, #reset!, #stream_tokens, #string_option, tag, #tag, title, #token_option, #with
Methods included from Token::Tokens
Constructor Details
This class inherits a constructor from Rouge::Lexer
Class Method Details
.builtins ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rouge/lexers/minizinc.rb', line 16 def self.builtins @builtins = Set.new %w[ abort abs acosh array_intersect array_union array1d array2d array3d array4d array5d array6d asin assert atan bool2int card ceil concat cos cosh dom dom_array dom_size fix exp floor index_set index_set_1of2 index_set_2of2 index_set_1of3 index_set_2of3 index_set_3of3 int2float is_fixed join lb lb_array length ln log log2 log10 min max pow product round set2array show show_int show_float sin sinh sqrt sum tan tanh trace ub ub_array ] end |
.keywords ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/rouge/lexers/minizinc.rb', line 28 def self.keywords @keywords = Set.new %w[ ann annotation any constraint else endif function for forall if include list of op output minimize maximize par predicate record satisfy solve test then type var where ] end |
.keywords_type ⇒ Object
36 37 38 39 40 |
# File 'lib/rouge/lexers/minizinc.rb', line 36 def self.keywords_type @keywords_type ||= Set.new %w( array set bool enum float int string tuple ) end |
.operators ⇒ Object
42 43 44 45 46 |
# File 'lib/rouge/lexers/minizinc.rb', line 42 def self.operators @operators ||= Set.new %w( in subset superset union diff symdiff intersect ) end |