! Syntax Highlighting Patterns for MAST ! Contributed by David La Rosa (c22dal@ic.delcoelect.com) ! ! in 'MAST conditions2' most of the if logical operations are highlighted ! a few will not be if the variable is paked closly like: ! ! if(temp ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! ! In version 5.0, without -import, you must edit your .nedit file by hand and ! add the contents of each resource below to the corresponding list in your ! .nedit file. Be sure to separate new entries with \n, and continue resource ! strings by escaping all newlines within a resource value with \ (backslash), ! leaving only the last line of the resource value not ending in \. ! ! MAST conditions3:\"[\\t ]+([=][=]|[|]|[&]|[a][n][d]|[o][r]|[>][=]|[<][=]|[>]|[<]|[~][=]|[~][>]|[~][<]|[~])[\\t $]?\":::MAST Conds::D\n\ ! MAST units:\"[\\t ]+<(a|accl_cps2|accl_fps2|accl_ips2|accl_mps2|ang_deg|ang_rad|asi|b|bg|bsi|c|cd|cm|cth|deg|dufs|dw_rpmps|dw_rpmps2|f|fr|frc_d|frc_N|frc_o|frc_p|freq|g|h|hg|hm|hp|hsi|i|j|joule|jsi|l|lb|li|lm|logic_3|logic_4|lps|lx|m|meter|mm|mmf|msi|mu|n|ni|nu|nv|omega|p|pa|pcm3|pm|pos_c|pos_f|pos_i|pos_m|prsr|q|r|rad|rm|rth|s|ssi|t|tauth|tc|tf|time|tk|tq_dc|tq_fp|tq_io|tq_Nm|tsi|v|vel_cps|vel_fps|vel_ips|vel_mps|vps|w|w_radps|w_rpm|wsi)>[\\t ]+[a-zA-Z0-9_]+[,\\t ]?\":::Preprocessor::D\n\ nedit.highlightPatterns: \ MAST:1:0 {\n\ comments:\"#\":\"$\"::MAST Comment::\n\ section header:\"<((control_section|equations|parameters|values)[\\t ]?{)>\":::Flag::\n\ encrypted header:\"<(encrypted)>[\\t a-zA-Z0-9=_,$]*\":::Flag::\n\ double quote strings:\"\"\"\":\"\"\"\"::String::\n\ dq string esc chars:\"\\\\(.|\\n)\":::String2:double quote strings:\n\ single quote strings:\"'\":\"'\"::MAST String::\n\ sq string esc chars:\"\\\\(.|\\n)\":::MAST String1:single quote strings:\n\ simvars:\"<(dc_domain|dc_done|dc_init|dc_start|freq|freq_domain|freq_mag|freq_phase|next_time|statistical|step_size|time|time_domain|time_init|time_step_done|tr_done|tr_start)>\":::Text Arg::D\n\ functions:\"<(abs|acos|acosh|asin|asinh|atan|atanh|cos|cosh|d_by_dt|delay|deschedule|driven|error|event|event_on|exp|instance|len|limexp|ln|log|message|random|schedule_event|schedule_next_time|sin|sinh|sqrt|tan|tanh|threshold|union_type|warning|int)>\":::Storage Type::D\n\ keyword:\"<(branch|component|control_section|element|else|encrypted|enum|equations|export|external|foreign|function|group|if|inf|input|make|number|output|parameters|pin|ref|simvar|state|states|string|struc|template|undef|union|unit|val|values|var|when)>\":::Keyword::D\n\ MAST numeric constants:\"[,\-\\t ]?<([0-9]+[\.0-9]?[eE]?[\-\+]?[0-9]?(a|f|p|n|u|mu|m|k|meg|me|g|t)?)>[,]?\":::Numeric Const::D\n\ MAST numeric constants:\"[,\-\\t ]?<([\.0-9]+[eE]+[\-\+]?[0-9]+)>[,]?\":::Numeric Const::D\n\ MAST logical constants:\"<([=]?[(]?(l4_0|l4_1|l4_x|l4_z|l3_0|l3_1|l3_x)+[\\t ]?[)]?)>\":::Numeric Const::D\n\ MAST conditions1:\"[\\t ]+([=][=]|[>][=]|[<][=]|[~][=]|[~][>]|[~][<]|[|]|[\&]|[a][n][d]|[o][r]|[>]|[<]|[~])\":::MAST Conds::D\n\ MAST conditions2:\"([=][=]|[>][=]|[<][=]|[~][=]|[~][>]|[~][<])\":::MAST Conds::D\n\ MAST conditions3:\"([|]|[\&])+[\\t ]+\":::MAST Conds::D\n\ MAST units:\"[\\t ]+<(a|accl_cps2|accl_fps2|accl_ips2|accl_mps2|ang_deg|ang_rad|asi|b|bg|bsi|c|cd|cm|cth|deg|dufs|dw_rpmps|dw_rpmps2|f|fr|frc_d|frc_N|frc_o|frc_p|freq|g|h|hg|hm|hp|hsi|i|j|joule|jsi|l|lb|li|lm|logic_3|logic_4|lps|lx|m|meter|mm|mmf|msi|mu|n|ni|nu|nv|omega|p|pa|pcm3|pm|pos_c|pos_f|pos_i|pos_m|prsr|q|r|rad|rm|rth|s|ssi|t|tauth|tc|tf|time|tk|tq_dc|tq_fp|tq_io|tq_Nm|tsi|v|vel_cps|vel_fps|vel_ips|vel_mps|vps|w|w_radps|w_rpm|wsi)>[\\t ]+[a-zA-Z0-9_]+[[,\\t a-zA-Z0-9_]*]?\":::Preprocessor::D\n\ fix up math:\"[\.]+<(abs|acos|acosh|asin|asinh|atan|atanh|cos|cosh|d_by_dt|delay|deschedule|driven|error|event|event_on|exp|instance|len|limexp|ln|log|message|random|schedule_event|schedule_next_time|sin|sinh|sqrt|tan|tanh|threshold|union_type|warning|int)\":::Plain::D\n\ MAST crypt:\"(!crypt_start)[\\t\\n a-zA-Z0-9]*\":::MAST Encrypt::\n\ braces and parens:\"[\\[\\]{}\\(\\)]\":::Keyword::} nedit.languageModes:\ MAST:.sin:::::: ! above blank line is critical !nedit.styles:\ ! MAST keyword:blue:Bold nedit.styles:\ MAST Comment:darkgreen:Italic\n\ MAST Conds:blue:Bold\n\ MAST String:green:Plain\n\ MAST String1:green:Bold\n\ MAST Encrypt:yellow:Italic\n\