Skip to content

Instantly share code, notes, and snippets.

@jolts
Created February 24, 2009 05:17
Show Gist options
  • Save jolts/69432 to your computer and use it in GitHub Desktop.
Save jolts/69432 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
$rules = {
## Identifiers
[:variable] => /^\w+(\s+)\=(\s+)(\")?\w+(\")?/,
## Board
[:board_start] => /^Board.start\(\d+\,\d+,\d+,\d+\)/,
[:board_xy] => /^Board\[\d+\,\d+\]/,
[:board_allcells] => /^Board\.all\_cells\(\)/,
[:board_getcells] => /^Board\.get\_cells\(\)/,
[:board_color] => /^Board\.color\(\)/,
[:board_image] => /^Board\.image\(\)/,
[:board_getmouseclick] => /^Board\.get\_\mouse\_click\(\)/,
[:board_getkeypress] => /^Board\.get\_\key\_press\(\)/ ,
## Text
[:text] => /^text\(\"[\w+\s+]+\"\)/,
[:text_setsize] => /^text\.set\_size\(\d+\)/,
[:text_settext] => /^text\.set\_\text\(\"\w+\"\)/,
[:text_position] => /^text\.position\(\d+\,\d+\)/,
[:text_color] => /^text\.color\(\d+\,\d+\,\d+\)/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment