Skip to content

Instantly share code, notes, and snippets.

@ne1uno
Created November 12, 2019 16:48
Show Gist options
  • Save ne1uno/f05c72c8649e1225fea28e2ac9e60aa1 to your computer and use it in GitHub Desktop.
Save ne1uno/f05c72c8649e1225fea28e2ac9e60aa1 to your computer and use it in GitHub Desktop.
generate red language syntax file for geany editor/ide two of two files
may be auto generated
diff of keywords difference in cli or gui console and color names
Red [
Title: "red-diffwords.red"
Author: ""
Date: ""
rights: "MITTENS"
;Needs: 'View ;can't have view cli
]
red-colors: [
black blue navy orange gold ;tan not red? tanned?
coal green leaf forest brown coffee
gray cyan teal aqua water sky
pewter red maroon brick crimson pink
silver magenta purple violet papaya sienna wheat
snow yellow olive oldrab khaki mint
white ivory linen beige transparent
reblue rebolor ; base-color from rebol not red?
;; LavenderBlush FFF0F5 SeaShell FFF5EE Linen FAF0E6 MistyRose FFE4E1 PeachPuff FFDAB9
;; RosyBrown BC8F8F Pink FFC0CB LightPink FFB6C1 PaleVioletRed D87093 DarkSalmon E9967A
;; Sienna A0522D HotPink FF69B4 LightSalmon FFA07A SaddleBrown 8B4513 LightCoral F08080
;; Peru CD853F SandyBrown F4A460 IndianRed CD5C5C Salmon FA8072 Brown A52A2A Maroon
;; 800000 Chocolate D2691E Coral FF7F50 FireBrick B22222 Red FF0000 DarkRed 8B0000
;; Tomato FF6347 Crimson DC143C OrangeRed FF4500 MintCream F5FFFA HoneyDew F0FFF0
;; DarkSeaGreen 8FBC8F SeaGreen 2E8B57 LightGreen 90EE90 PaleGreen 98FB98 MediumSeaGreen
;; 3CB371 ForestGreen 228B22 DarkGreen 006400 Lime 008000 LimeGreen 32CD32 SpringGreen
;; 00FF7F LawnGreen 7CFC00 Chartreuse 7FFF00 Green 00FF00 Lavender E6E6FA LightSteelBlue
;; B0C4DE LightSlateGray 778899 SlateGray 708090 DarkSlateBlue 483D8B MediumPurple
;; 9370D8 MidnightBlue 191970 CornflowerBlue 6495ED SlateBlue 6A5ACD MediumSlateBlue
;; 7B68EE RoyalBlue 4169E1 Navy 000080 DarkBlue 00008B MediumBlue 0000CD Blue 0000FF
;; AliceBlue F0F8FF Azure F0FFFF LightCyan E0FFFF LightBlue ADD8E6 PowderBlue B0E0E6
;; PaleTurquoise AFEEEE DarkSlateGray 2F4F4F CadetBlue 5F9EA0 SkyBlue 87CEEB
;; LightSkyBlue 87CEFA MediumAquaMarine 66CDAA SteelBlue 4682B4 Aquamarine 7FFFD4
;; MediumTurquoise 48D1CC Teal 008080 LightSeaGreen 20B2AA Turquoise 40E0D0 DarkCyan
;; 008B8B DodgerBlue 1E90FF MediumSpringGreen 00FA9A DarkTurquoise 00CED1 DeepSkyBlue
;; 00BFFF Aqua 00FFFF Cyan 00FFFF Thistle D8BFD8 Plum DDA0DD Violet EE82EE Orchid DA70D6
;; MediumOrchid BA55D3 Indigo 4B0082 DarkOrchid 9932CC BlueViolet 8A2BE2 Purple 800080
;; DarkMagenta 8B008B MediumVioletRed C71585 DarkViolet 9400D3 DeepPink FF1493 Fuchsia
;; FF00FF Magenta FF00FF FloralWhite FFFAF0 Ivory FFFFF0 OldLace FDF5E6 Beige F5F5DC
;; AntiqueWhite FAEBD7 LightYellow FFFFE0 Cornsilk FFF8DC PapayaWhip FFEFD5
;; LightGoldenRodYellow FAFAD2 BlanchedAlmond FFEBCD LemonChiffon FFFACD Bisque FFE4C4
;; Wheat F5DEB3 Moccasin FFE4B5 Tan D2B48C PaleGoldenRod EEE8AA NavajoWhite FFDEAD
;; DarkOliveGreen 556B2F BurlyWood DEB887 DarkKhaki BDB76B Khaki F0E68C OliveDrab 6B8E23
;; YellowGreen 9ACD32 Olive 808000 DarkGoldenRod B8860B GreenYellow ADFF2F GoldenRod
;; DAA520 DarkOrange FF8C00 Orange FFA500 Gold FFD700 Yellow FFFF00 White FFFFFF
;; WhiteSmoke F5F5F5 Snow FFFAFA Gainsboro DCDCDC GhostWhite F8F8FF White FFFFFF
;; LightGray D3D3D3 Silver C0C0C0 DarkGray A9A9A9 Gray 808080 DimGray 696969 Black
;; 000000 -Sol-Base03 002b36 -Sol-Base02 073642 -Sol-Base01 586e75 -Sol-Base00 657b83
;; -Sol-Base0 839496 -Sol-Base1 93a1a1 -Sol-Base2 eee8d5 -Sol-Base3 fdf6e3 -Sol-Yellow
;; b58900 -Sol-Orange cb4b16 -Sol-Red dc322f -Sol-Magenta d33682 -Sol-Violet 6c71c4
;; -Sol-Blue 268bd2 -Sol-Cyan 2aa198 -Sol-Green 859900
;; need to quote or # hex maybe undefined names too
;colors will be combined with view/vid and parse words later
]
;to get list of x11 colors from named-colors, add unique to red-colors
;remove any words defined in rest of lib
;#include %../../../libs/inclib.rd ;use of colors
;not all of these are words? could add parse words, could quote words not declarrd yet
;make theme color for user keywords different enough to stand out
; you may wan't return copy others not declared here
; Red by Example has decent list of words
red-diffwords: [
view return across at pos below pad
button box group-box loose check radio text-list drop-list
event
on-alt-down on-alt-up on-aux-down on-aux-up on-change on-change* on-change-facet
on-click on-close on-create on-created on-dbl-click on-deep-change* on-detect on-drag
on-drag-start on-drawing on-drop on-enter on-face-deep-change* on-focus on-ime
on-key on-key-down on-key-up on-menu on-mid-down on-mid-up on-move on-moving on-pan
on-parse-event on-press-tap on-resize on-resizing on-rotate on-scroll on-select
on-time on-two-tap on-unfocus on-up on-wheel on-zoom
across all-over aqua area
at backdrop base beige
below black blue bold
bottom box brick brown
button camera center center-face
check check-all-reactions check-reactions coal
coffee crimson cyan data
default disabled do draw
drop-down drop-list dump-face event?
extra facet field find-flag?
focus font font-color font-name
font-size forest glass gold
gray green group-box h1
h2 h3 h4 h5
hidden hint image insert-event-func
italic ivory khaki leaf
left linen link-sub-to-parent link-tabs-to-parent
loose magenta maroon middle
mint navy needs no-wrap
offset? oldrab olive on-alt-down
on-alt-up on-aux-down on-aux-up on-change
on-click on-close on-create on-dbl-click
on-detect on-down on-drag on-drag-start
on-drop on-enter on-face-deep-change* on-focus
on-key on-key-down on-key-up on-menu
on-mid-down on-mid-up on-move on-moving
on-over on-pan on-parse-event on-press-tap
on-resize on-resizing on-rotate on-select
on-time on-two-tap on-unfocus on-up
on-zoom orange origin overlap?
pad panel papaya para
pewter pink progress purple
radio rate react reblue
rebolor red remove-event-func remove-reactor
return rich-text right screen
select set-flag show sienna
silver size-text sky slider
snow space style tab-panel
tanned teal text text-list
title top transparent underline
update-font-faces violet water wheat
white window with wrap
yellow ; yello?
copy some skip thru opt | ;different or undefined outside parse? gray area
date time ; date time words? date? time?
year month day hour minute second zone yearday week weekday days hours
date-rule date-sep day-year-rule ;some may be read-only?
]
foreach i red-colors [remove-each x red-diffwords [x = i]]
red-diffwords: unique red-diffwords ; sort not sure unique preserves order
;probe red-diffwords
;; from geany filedefs sql html
;; sql=a abort abs absolute access action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array as asc asensitive assertion assignment asymmetric at atomic attribute attributes audit authorization auto_increment avg avg_row_length backup backward before begin bernoulli between bigint binary bit bit_length bitvar blob bool boolean both breadth break browse bulk by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain change char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checked checkpoint checksum class class_origin clob close cluster clustered coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment commit committed completion compress compute condition condition_number connect connection connection_name constraint constraint_catalog constraint_name constraint_schema constraints constructor contains containstable continue conversion convert copy corr corresponding count covar_pop covar_samp create createdb createrole createuser cross csv cube cume_dist current current_date current_default_transform_group current_path current_role current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database databases date datetime datetime_interval_code datetime_interval_precision day day_hour day_microsecond day_minute day_second dayofmonth dayofweek dayofyear dbcc deallocate dec decimal declare default defaults deferrable deferred defined definer degree delay_key_write delayed delete delimiter delimiters dense_rank deny depth deref derived desc describe descriptor destroy destructor deterministic diagnostics dictionary disable disconnect disk dispatch distinct distinctrow distributed div do domain double drop dual dummy dump dynamic dynamic_function dynamic_function_code each element else elseif enable enclosed encoding encrypted end end-exec enum equals errlvl escape escaped every except exception exclude excluding exclusive exec execute existing exists exit exp explain external extract false fetch fields file fillfactor filter final first float float4 float8 floor flush following for force foreign fortran forward found free freetext freetexttable freeze from full fulltext function fusion g general generated get global go goto grant granted grants greatest group grouping handler having header heap hierarchy high_priority hold holdlock host hosts hour hour_microsecond hour_minute hour_second identified identity identity_insert identitycol if ignore ilike immediate immutable implementation implicit in include including increment index indicator infile infix inherit inherits initial initialize initially inner inout input insensitive insert insert_id instance instantiable instead int int1 int2 int3 int4 int8 integer intersect intersection interval into invoker is isam isnull isolation iterate join k key key_member key_type keys kill lancompiler language large last last_insert_id lateral leading least leave left length less level like limit lineno lines listen ln load local localtime localtimestamp location locator lock login logs long longblob longtext loop low_priority lower m map match matched max max_rows maxextents maxvalue mediumblob mediumint mediumtext member merge message_length message_octet_length message_text method middleint min min_rows minus minute minute_microsecond minute_second minvalue mlslabel mod mode modifies modify module month monthname more move multiset mumps myisam name names national natural nchar nclob nesting new next no no_write_to_binlog noaudit nocheck nocompress nocreatedb nocreaterole nocreateuser noinherit nologin nonclustered none normalize normalized nosuperuser not nothing notify notnull nowait null nullable nullif nulls number numeric object octet_length octets of off offline offset offsets oids old on online only open opendatasource openquery openrowset openxml operation operator optimize option optionally options or order ordering ordinality others out outer outfile output over overlaps overlay overriding owner pack_keys pad parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parameters partial partition pascal password path pctfree percent percent_rank percentile_cont percentile_disc placing plan pli position postfix power preceding precision prefix preorder prepare prepared preserve primary print prior privileges proc procedural procedure process processlist public purge quote raid0 raiserror range rank raw read reads readtext real recheck reconfigure recursive ref references referencing regexp regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release reload rename repeat repeatable replace replication require reset resignal resource restart restore restrict result return returned_cardinality returned_length returned_octet_length returned_sqlstate returns revoke right rlike role rollback rollup routine routine_catalog routine_name routine_schema row row_count row_number rowcount rowguidcol rowid rownum rows rule save savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second second_microsecond section security select self sensitive separator sequence serializable server_name session session_user set setof sets setuser share show shutdown signal similar simple size smallint some soname source space spatial specific specific_name specifictype sql sql_big_result sql_big_selects sql_big_tables sql_calc_found_rows sql_log_off sql_log_update sql_low_priority_updates sql_select_limit sql_small_result sql_warnings sqlca sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt ssl stable start starting state statement static statistics status stddev_pop stddev_samp stdin stdout storage straight_join strict string structure style subclass_origin sublist submultiset substring successful sum superuser symmetric synonym sysdate sysid system system_user table table_name tables tablesample tablespace temp template temporary terminate terminated text textsize than then ties time timestamp timezone_hour timezone_minute tinyblob tinyint tinytext to toast top top_level_count trailing tran transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translation treat trigger trigger_catalog trigger_name trigger_schema trim true truncate trusted tsequal type uescape uid unbounded uncommitted under undo unencrypted union unique unknown unlisten unlock unnamed unnest unsigned until update updatetext upper usage use user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using utc_date utc_time utc_timestamp vacuum valid validate validator value values var_pop var_samp varbinary varchar varchar2 varcharacter variable variables varying verbose view volatile waitfor when whenever where while width_bucket window with within without work write writetext x509 xor year year_month zerofill zone
;; would want to decide if these should override red words or only keep the difference
;; html=^aria- ^data- a abbr accept accept-charset accesskey acronym action address align alink allowfullscreen allowpaymentrequest allowusermedia alt applet archive area article as aside async audio autocomplete autofocus autoplay axis b background base basefont bdi bdo bgcolor big blockquote body border br button canvas caption cellpadding cellspacing center challenge char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan command compact content contenteditable contextmenu controls coords crossorigin data datafld dataformatas datalist datapagesize datasrc datetime dd declare default defer del details dfn dialog dir dirname disabled div dl doctype download draggable dropzone dt em embed enctype face fieldset figcaption figure file font footer for form formaction formenctype formmethod formnovalidate formtarget frame frameborder frameset framespacing h1 h2 h3 h4 h5 h6 head header headers height hgroup hidden high hr href hreflang hspace html http-equiv i icon id iframe image img input inputmode ins integrity is isindex ismap itemid itemprop itemref itemscope itemtype kbd keygen keytype kind label lang language leftmargin legend li link list longdesc loop low main manifest map marginheight marginwidth mark math max maxlength media menu menuitem meta meter method min minlength multiple muted name nav noframes nohref nomodule nonce noresize noscript noshade novalidate nowrap object ol onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseout onmouseover onmouseup onreset onselect onsubmit onunload open optgroup optimum option output p param password pattern picture ping placeholder playsinline pluginspage poster pre preload profile progress prompt public q quality radio radiogroup rb readonly referrerpolicy rel required reset rev reversed role rows rowspan rp rt rtc ruby rules s samp sandbox scheme scope scoped script scrolling seamless section select selected shape size sizes slot small source span spellcheck src srcdoc srclang srcset standby start step strike strong style sub submit summary sup svg tabindex table target tbody td template text textarea tfoot th thead time title topmargin tr track translate tt type typemustmatch u ul updateviacache usemap valign value valuetype var version video vlink vspace wbr width workertype wrap xml xml:lang xmlns
;; javascript=abs abstract acos anchor asin atan atan2 big bold boolean break byte case catch ceil char charAt charCodeAt class concat const continue cos Date debugger default delete do double else enum escape eval exp export extends false final finally fixed float floor fontcolor fontsize for fromCharCode function goto if implements import in indexOf Infinity instanceof int interface isFinite isNaN italics join lastIndexOf length link log long Math max MAX_VALUE min MIN_VALUE NaN native NEGATIVE_INFINITY new null Number package parseFloat parseInt pop POSITIVE_INFINITY pow private protected public push random return reverse round shift short sin slice small sort splice split sqrt static strike string String sub substr substring sup super switch synchronized tan this throw throws toLowerCase toString toUpperCase transient true try typeof undefined unescape unshift valueOf var void volatile while with
;; vbscript=and as boolean byref byte byval call case class const continue currency date dim do double each else elseif empty end error exit false for function get global goto if in integer long loop me new next not nothing object on optional or private property public put redim rem resume select set single string sub then to true type until variant wend while with
;; python=and assert break class continue complex def del elif else except exec finally for from global if import in inherit is int lambda not or pass print raise return tuple try unicode while yield long float str list True False None
;; php=abstract and argumentcounterror arithmeticerror array arrayaccess as assert assertionerror bool boolean break __call __callstatic callable case catch cfunction __class__ class clone __clone closure const __construct continue countable __debuginfo declare default __destruct die __dir__ directory divisionbyzeroerror do double echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile error errorexception eval exception exit extends false __file__ final finally float for foreach __function__ function generator __get goto global __halt_compiler if implements include include_once instanceof insteadof int integer interface __invoke isset __isset iterable iterator iteratoraggregate __line__ list __method__ namespace __namespace__ new null object old_function or parent parseerror php_user_filter print private protected public real require require_once resource return self serializable __set __set_state __sleep static stdclass stderr stdin stdout string switch __tostring this throw throwable trait __trait__ traversable true try typeerror unset __unset use var void __wakeup while xor yield
;; sgml=ELEMENT DOCTYPE ATTLIST ENTITY NOTATION
;;
user3: copy [] user4: copy []
;end up with blocks user3 user4 that will be added, not all lexers may recognixe those names
;user2 free to edit in place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment