Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1913 - First implementation of Scilab language parser. #1916

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
- Sass (`sass`)
- Scala (`scala`)
- Scheme (`scheme`)
- Scilab (`scilab`)
- SCSS (`scss`)
- sed (`sed`)
- shell (`shell`)
Expand Down
7 changes: 7 additions & 0 deletions lib/rouge/demos/scilab
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
A = [1 2 3; 4 5 6]

// Display each row of A
for i = 1:size(A, "r")
disp("Row " + string(i))
disp(A(i, :))
end
121 changes: 121 additions & 0 deletions lib/rouge/lexers/scilab.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# -*- coding: utf-8 -*- #
# frozen_string_literal: true

module Rouge
module Lexers
class Scilab < RegexLexer
title "Scilab"
desc "Scilab"
tag 'scilab'
aliases 'sci', 'sce', 'tst'
filenames '*.sci', '*.sce','*.tst'
mimetypes 'text/x-scilab', 'application/x-scilab'

# Scilab identifiers
# See SCI/modules/ast/src/cpp/parse/flex/scanscilab.ll
UTF2 = /\b([\\xC2-\\xDF][\\x80-\\xBF])\b/
UTF31 = /\b([\\xE0][\\xA0-\\xBF][\\x80-\\xBF])\b/
UTF32 = /\b([\\xE1-\\xEC][\\x80-\\xBF][\\x80-\\xBF])\b/
UTF33 = /\b([\\xED][\\x80-\\x9F][\\x80-\\xBF])\b/
UTF34 = /\b([\\xEE-\\xEF][\\x80-\\xBF][\\x80-\\xBF])\b/
UTF41 = /\b([\\xF0][\\x90-\\xBF][\\x80-\\xBF][\\x80-\\xBF])\b/
UTF42 = /\b([\\xF1-\\xF3][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF])\b/
UTF43 = /\b([\\xF4][\\x80-\\x8F][\\x80-\\xBF][\\x80-\\xBF])\b/

UTF3 = /(#{UTF31}|#{UTF32}|#{UTF33}|#{UTF34})/
UTF4 = /(#{UTF41}|#{UTF42}|#{UTF43})/

UTF = /(#{UTF2}|#{UTF3}|#{UTF4})/

SCILAB_IDENTIFIER = /((([a-zA-Z_%!#?]|#{UTF})([a-zA-Z_0-9!#?$]|#{UTF})*)|([$]([a-zA-Z_0-9!#?$]|#{UTF})+))/
SCILAB_CONJUGATE_TRANSPOSE = /((([a-zA-Z_%!#?]|#{UTF})([a-zA-Z_0-9!#?$]|#{UTF})*)|([$]([a-zA-Z_0-9!#?$]|#{UTF})+))\K'/

# self-modifying method that loads the keywords file
def self.keywords
Kernel::load File.join(Lexers::BASE_DIR, 'scilab/keywords.rb')
keywords
end

# self-modifying method that loads the builtins file
def self.builtins
Kernel::load File.join(Lexers::BASE_DIR, 'scilab/builtins.rb')
builtins
end

# self-modifying method that loads the predefs file
def self.predefs
Kernel::load File.join(Lexers::BASE_DIR, 'scilab/predefs.rb')
predefs
end

# self-modifying method that loads the functions file
def self.functions
Kernel::load File.join(Lexers::BASE_DIR, 'scilab/functions.rb')
functions
end

state :root do
# Whitespace
rule %r/\s+/m, Text

# Comments
rule %r(//.*?$), Comment::Single
rule %r(/\*.*?\*/)m, Comment::Multiline

# Punctuation
rule %r{[(){};:,\/\\\]\[]}, Punctuation

# Operators (without ' (conjugate transpose) with is managed in a specific case)
rule %r/~=|==|\.'|[-~+\/*=<>&^|.@]/, Operator

# Special case for .' operator' (needed to avoid ' * b' to be considered as a single_string in c = a' * b')
rule %r/#{SCILAB_CONJUGATE_TRANSPOSE}/ do |m|
token Name::Variable, m[1]
token Operator, m[0]
end

# Numbers
rule %r/(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?/i, Num::Float
rule %r/\d+e[+-]?[0-9]+/i, Num::Float
rule %r/\d+L/, Num::Integer::Long
rule %r/\d+/, Num::Integer

# Builtins, Keyworks, ...
rule %r(#{SCILAB_IDENTIFIER})m do |m|
match = m[0]
if self.class.keywords.include? match
token Keyword
elsif self.class.builtins.include? match
token Name::Builtin
elsif self.class.predefs.include? match
token Keyword::Variable
elsif self.class.functions.include? match
token Name::Function
else
token Name::Variable
end
end

# Strings: "abc" or 'abc'
rule %r/'(?=(.*'))/, Str::Single, :single_string
rule %r/"(?=(.*"))/, Str::Double, :double_string

end

# String: 'abc'
state :single_string do
rule %r/[^'"]+/, Str::Single
rule %r/(''|"")/, Str::Escape
rule %r/'/, Str::Single, :pop!
end

# String: "abc"
state :double_string do
rule %r/[^"']+/, Str::Double
rule %r/(""|'')/, Str::Escape
rule %r/"/, Str::Double, :pop!
end

end
end
end
15 changes: 15 additions & 0 deletions lib/rouge/lexers/scilab/builtins.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*- #
# frozen_string_literal: true

# DO NOT EDIT

# This file is automatically generated by `rake builtins:scilab`.
# See tasks/builtins/scilab.rake for more info.

module Rouge
module Lexers
def Scilab.builtins
@builtins ||= Set.new ["!!_invoke_", "%H5Object_e", "%H5Object_fieldnames", "%H5Object_p", "%XMLAttr_6", "%XMLAttr_e", "%XMLAttr_i_XMLElem", "%XMLAttr_length", "%XMLAttr_p", "%XMLAttr_size", "%XMLDoc_6", "%XMLDoc_e", "%XMLDoc_i_XMLList", "%XMLDoc_p", "%XMLElem_6", "%XMLElem_e", "%XMLElem_i_XMLDoc", "%XMLElem_i_XMLElem", "%XMLElem_i_XMLList", "%XMLElem_p", "%XMLList_6", "%XMLList_e", "%XMLList_i_XMLElem", "%XMLList_i_XMLList", "%XMLList_length", "%XMLList_p", "%XMLList_size", "%XMLNs_6", "%XMLNs_e", "%XMLNs_i_XMLElem", "%XMLNs_p", "%XMLSet_6", "%XMLSet_e", "%XMLSet_length", "%XMLSet_p", "%XMLSet_size", "%XMLValid_p", "%_EClass_6", "%_EClass_e", "%_EClass_p", "%_EObj_0", "%_EObj_1__EObj", "%_EObj_1_b", "%_EObj_1_c", "%_EObj_1_i", "%_EObj_1_s", "%_EObj_2__EObj", "%_EObj_2_b", "%_EObj_2_c", "%_EObj_2_i", "%_EObj_2_s", "%_EObj_3__EObj", "%_EObj_3_b", "%_EObj_3_c", "%_EObj_3_i", "%_EObj_3_s", "%_EObj_4__EObj", "%_EObj_4_b", "%_EObj_4_c", "%_EObj_4_i", "%_EObj_4_s", "%_EObj_5", "%_EObj_6", "%_EObj_a__EObj", "%_EObj_a_b", "%_EObj_a_c", "%_EObj_a_i", "%_EObj_a_s", "%_EObj_clear", "%_EObj_d__EObj", "%_EObj_d_b", "%_EObj_d_c", "%_EObj_d_i", "%_EObj_d_s", "%_EObj_disp", "%_EObj_e", "%_EObj_g__EObj", "%_EObj_g_b", "%_EObj_g_c", "%_EObj_g_i", "%_EObj_g_s", "%_EObj_h__EObj", "%_EObj_h_b", "%_EObj_h_c", "%_EObj_h_i", "%_EObj_h_s", "%_EObj_i__EObj", "%_EObj_j__EObj", "%_EObj_j_b", "%_EObj_j_c", "%_EObj_j_i", "%_EObj_j_s", "%_EObj_k__EObj", "%_EObj_k_b", "%_EObj_k_c", "%_EObj_k_i", "%_EObj_k_s", "%_EObj_l__EObj", "%_EObj_l_b", "%_EObj_l_c", "%_EObj_l_i", "%_EObj_l_s", "%_EObj_m__EObj", "%_EObj_m_b", "%_EObj_m_c", "%_EObj_m_i", "%_EObj_m_s", "%_EObj_n__EObj", "%_EObj_n_b", "%_EObj_n_c", "%_EObj_n_i", "%_EObj_n_s", "%_EObj_o__EObj", "%_EObj_o_b", "%_EObj_o_c", "%_EObj_o_i", "%_EObj_o_s", "%_EObj_p", "%_EObj_p__EObj", "%_EObj_p_b", "%_EObj_p_c", "%_EObj_p_i", "%_EObj_p_s", "%_EObj_q__EObj", "%_EObj_q_b", "%_EObj_q_c", "%_EObj_q_i", "%_EObj_q_s", "%_EObj_r__EObj", "%_EObj_r_b", "%_EObj_r_c", "%_EObj_r_i", "%_EObj_r_s", "%_EObj_s__EObj", "%_EObj_s_b", "%_EObj_s_c", "%_EObj_s_i", "%_EObj_s_s", "%_EObj_t", "%_EObj_x__EObj", "%_EObj_x_b", "%_EObj_x_c", "%_EObj_x_i", "%_EObj_x_s", "%_EObj_y__EObj", "%_EObj_y_b", "%_EObj_y_c", "%_EObj_y_i", "%_EObj_y_s", "%_EObj_z__EObj", "%_EObj_z_b", "%_EObj_z_c", "%_EObj_z_i", "%_EObj_z_s", "%_cov", "%_eigs", "%b_1__EObj", "%b_2__EObj", "%b_3__EObj", "%b_4__EObj", "%b_a__EObj", "%b_d__EObj", "%b_g__EObj", "%b_h__EObj", "%b_i_XMLList", "%b_i__EObj", "%b_j__EObj", "%b_k__EObj", "%b_l__EObj", "%b_m__EObj", "%b_n__EObj", "%b_o__EObj", "%b_p__EObj", "%b_q__EObj", "%b_r__EObj", "%b_s__EObj", "%b_x__EObj", "%b_y__EObj", "%b_z__EObj", "%c_1__EObj", "%c_2__EObj", "%c_3__EObj", "%c_4__EObj", "%c_a__EObj", "%c_d__EObj", "%c_g__EObj", "%c_h__EObj", "%c_i_XMLAttr", "%c_i_XMLDoc", "%c_i_XMLElem", "%c_i_XMLList", "%c_i__EObj", "%c_j__EObj", "%c_k__EObj", "%c_l__EObj", "%c_m__EObj", "%c_n__EObj", "%c_o__EObj", "%c_p__EObj", "%c_q__EObj", "%c_r__EObj", "%c_s__EObj", "%c_x__EObj", "%c_y__EObj", "%c_z__EObj", "%ce_i_XMLList", "%fptr_i_XMLList", "%function_i_XMLList", "%h_i_XMLList", "%hm_i_XMLList", "%i_1__EObj", "%i_2__EObj", "%i_3__EObj", "%i_4__EObj", "%i_a__EObj", "%i_d__EObj", "%i_g__EObj", "%i_h__EObj", "%i_i_XMLList", "%i_i__EObj", "%i_j__EObj", "%i_k__EObj", "%i_l__EObj", "%i_m__EObj", "%i_n__EObj", "%i_o__EObj", "%i_p__EObj", "%i_q__EObj", "%i_r__EObj", "%i_s__EObj", "%i_x__EObj", "%i_y__EObj", "%i_z__EObj", "%ip_i_XMLList", "%l_i_XMLList", "%l_i__EObj", "%lss_i_XMLList", "%msp_i_XMLList", "%p_i_XMLList", "%ptr_i_XMLList", "%r_i_XMLList", "%s_1__EObj", "%s_2__EObj", "%s_3__EObj", "%s_4__EObj", "%s_a__EObj", "%s_d__EObj", "%s_g__EObj", "%s_h__EObj", "%s_i_XMLList", "%s_i__EObj", "%s_j__EObj", "%s_k__EObj", "%s_l__EObj", "%s_m__EObj", "%s_n__EObj", "%s_o__EObj", "%s_p__EObj", "%s_q__EObj", "%s_r__EObj", "%s_s__EObj", "%s_x__EObj", "%s_y__EObj", "%s_z__EObj", "%sp_i_XMLList", "%spb_i_XMLList", "%st_i_XMLList", "Calendar", "ClipBoard", "MPI_Bcast", "MPI_Comm_rank", "MPI_Comm_size", "MPI_Create_comm", "MPI_Finalize", "MPI_Get_processor_name", "MPI_Init", "MPI_Irecv", "MPI_Isend", "MPI_Recv", "MPI_Send", "MPI_Wait", "Matplot", "Matplot1", "PlaySound", "TCL_DeleteInterp", "TCL_DoOneEvent", "TCL_EvalFile", "TCL_EvalStr", "TCL_ExistArray", "TCL_ExistInterp", "TCL_ExistVar", "TCL_GetVar", "TCL_GetVersion", "TCL_SetVar", "TCL_UnsetVar", "TCL_UpVar", "_", "_d", "abort", "about", "abs", "acos", "acosh", "addModulePreferences", "addcolor", "addhistory", "addinter", "addlocalizationdomain", "adj2sp", "amell", "analyzerOptions", "and", "argn", "arl2_ius", "ascii", "asin", "asinh", "atan", "atanh", "balanc", "banner", "base2dec", "basename", "bdiag", "beep", "besselh", "besseli", "besselj", "besselk", "bessely", "beta", "bezout", "bfinit", "bitstring", "blkfc1i", "blkslvi", "bool2s", "browsehistory", "browsevar", "bsplin3val", "buildDoc", "buildouttb", "bvode", "c_link", "call", "callblk", "captions", "cd", "cdfbet", "cdfbin", "cdfchi", "cdfchn", "cdff", "cdffnc", "cdfgam", "cdfnbn", "cdfnor", "cdfpoi", "cdft", "ceil", "cell", "champ", "champ1", "chdir", "checkNamedArguments", "chol", "clc", "clean", "clear", "clearfun", "clearglobal", "closeEditor", "closeEditvar", "closeXcos", "coeff", "color", "completion", "conj", "consolebox", "contour2di", "contour2dm", "contr", "conv2", "convstr", "copy", "copyfile", "corr", "cos", "coserror", "cosh", "covMerge", "covStart", "covStop", "covWrite", "createGUID", "createdir", "cshep2d", "csvDefault", "csvIsnum", "csvRead", "csvStringToDouble", "csvTextScan", "csvWrite", "ctree2", "ctree3", "ctree4", "cumprod", "cumsum", "curblock", "daskr", "dasrt", "dassl", "data2sig", "datatipCreate", "datatipManagerMode", "datatipMove", "datatipRemove", "datatipSetDisplay", "datatipSetInterp", "datatipSetOrient", "datatipSetStyle", "datatipToggle", "dawson", "dct", "debug", "dec2base", "definedfields", "degree", "delete", "deletefile", "delip", "delmenu", "det", "dgettext", "dhinf", "diag", "diary", "diffobjs", "disp", "displayhistory", "disposefftwlibrary", "dlgamma", "dnaupd", "dneupd", "dos", "double", "drawaxis", "drawlater", "drawnow", "driver", "dsaupd", "dsearch", "dseupd", "dst", "duplicate", "editvar", "emptystr", "end_scicosim", "ereduc", "erf", "erfc", "erfcx", "erfi", "errclear", "error", "eval_cshep2d", "exec", "execstr", "exists", "exit", "exp", "expm", "exportUI", "eye", "fec", "feval", "fft", "fftw", "fftw_flags", "fftw_forget_wisdom", "fftwlibraryisloaded", "fieldnames", "figure", "file", "filebrowser", "fileext", "fileinfo", "fileparts", "filesep", "filter", "find", "findBD", "findfileassociation", "findfiles", "fire_closing_finished", "floor", "format", "fprintfMat", "freq", "frexp", "fromJSON", "fromc", "fromjava", "fscanfMat", "fsolve", "fstair", "full", "fullpath", "funclist", "funcprot", "funptr", "gamma", "gammaln", "genlib", "geom3d", "get", "getURL", "get_absolute_file_path", "get_fftw_wisdom", "getblocklabel", "getcallbackobject", "getdate", "getdebuginfo", "getdefaultlanguage", "getdrives", "getdynlibext", "getenv", "getfield", "gethistory", "gethistoryfile", "getinstalledlookandfeels", "getio", "getlanguage", "getlongpathname", "getlookandfeel", "getmd5", "getmemory", "getmodules", "getos", "getpid", "getrelativefilename", "getscicosvars", "getscilabmode", "getshortpathname", "getsystemmetrics", "gettext", "getversion", "global", "glue", "grand", "grayplot", "grep", "gsort", "h5attr", "h5close", "h5cp", "h5dataset", "h5dump", "h5exists", "h5flush", "h5get", "h5group", "h5isArray", "h5isAttr", "h5isCompound", "h5isFile", "h5isGroup", "h5isList", "h5isRef", "h5isSet", "h5isSpace", "h5isType", "h5isVlen", "h5label", "h5ln", "h5ls", "h5mount", "h5mv", "h5open", "h5read", "h5readattr", "h5rm", "h5umount", "h5write", "h5writeattr", "hash", "hdf5_file_version", "hdf5_is_file", "hdf5_listvar", "hdf5_listvar_v2", "hdf5_listvar_v3", "hdf5_load", "hdf5_load_v1", "hdf5_load_v2", "hdf5_load_v3", "hdf5_save", "helpbrowser", "hess", "hinf", "historymanager", "historysize", "host", "htmlDump", "htmlRead", "htmlReadStr", "htmlWrite", "http_delete", "http_get", "http_patch", "http_post", "http_put", "http_upload", "iconvert", "ieee", "ilib_verbose", "imag", "impl", "imult", "inpnvi", "insert", "int", "int16", "int2d", "int32", "int3d", "int64", "int8", "interp", "interp2d", "interp3d", "intg", "intppty", "inttype", "inv", "invoke_lu", "is_handle_valid", "isalphanum", "isascii", "isdef", "isdigit", "isdir", "isequal", "isfield", "isfile", "isglobal", "isletter", "isnum", "isreal", "issquare", "istssession", "isvector", "iswaitingforinput", "jallowClassReloading", "jarray", "jautoTranspose", "jautoUnwrap", "javaclasspath", "javalibrarypath", "jcast", "jcompile", "jcreatejar", "jdeff", "jdisableTrace", "jenableTrace", "jexists", "jgetclassname", "jgetfield", "jgetfields", "jgetinfo", "jgetmethods", "jimport", "jinvoke", "jinvoke_db", "jnewInstance", "jremove", "jsetfield", "junwrap", "junwraprem", "jwrap", "jwrapinfloat", "kron", "lasterror", "ldiv", "legendre", "length", "lib", "librarieslist", "libraryinfo", "light", "linear_interpn", "lines", "link", "linmeq", "linspace", "list", "listvarinfile", "load", "loadGui", "loadScicos", "loadXcos", "loadfftwlibrary", "loadhistory", "log", "log10", "log1p", "lsq", "lsq_splin", "lsqrsolve", "ltitr", "lu", "ludel", "lufact", "luget", "lusolve", "macr2tree", "macrovar", "makecell", "matfile_close", "matfile_listvar", "matfile_open", "matfile_varreadnext", "matfile_varwrite", "matrix", "max", "mcisendstring", "mclearerr", "mclose", "meof", "merror", "mesh2di", "messagebox", "mfprintf", "mfscanf", "mget", "mgeti", "mgetl", "mgetstr", "min", "mlist", "mode", "model2blk", "mopen", "move", "movefile", "mprintf", "mput", "mputl", "mputstr", "mscanf", "mseek", "msprintf", "msscanf", "mtell", "mucomp", "name2rgb", "nearfloat", "newaxes", "newest", "newfun", "nnz", "norm", "notify", "null", "number_properties", "ode", "odedc", "oldEmptyBehaviour", "ones", "openged", "opentk", "optim", "or", "ordmmd", "param3d", "param3d1", "part", "pathconvert", "pathsep", "pause", "permute", "phase_simulation", "plot2d", "plot2d2", "plot2d3", "plot2d4", "plot3d", "plot3d1", "plotbrowser", "pointer_xproperty", "poly", "ppol", "pppdiv", "predef", "preferences", "print", "printf", "printfigure", "printsetupbox", "prod", "profileDisable", "profileEnable", "profileGetInfo", "progressionbar", "prompt", "pwd", "qld", "qp_solve", "qr", "quit", "raise_window", "rand", "rankqr", "rat", "rcond", "read", "read_csv", "readmps", "real", "realtime", "realtimeinit", "recursionlimit", "regexp", "remez", "removeModulePreferences", "removedir", "removelinehistory", "res_with_prec", "resethistory", "residu", "ricc", "rlist", "roots", "rotate_axes", "round", "rpem", "rtitr", "rubberbox", "save", "saveGui", "saveafterncommands", "saveconsecutivecommands", "savehistory", "schur", "sci_tree2", "sci_tree3", "sci_tree4", "sciargs", "scicosDiagramToScilab", "scicos_debug", "scicos_debug_count", "scicos_log", "scicos_new", "scicos_setfield", "scicos_time", "scicosim", "scinotes", "sctree", "semidef", "set", "set_blockerror", "set_fftw_wisdom", "set_xproperty", "setdefaultlanguage", "setenv", "setfield", "sethistoryfile", "setlanguage", "setlookandfeel", "setmenu", "sfact", "sfinit", "show_window", "sident", "sig2data", "sign", "simp", "simp_mode", "sin", "sinh", "size", "sleep", "slint", "sorder", "sp2adj", "sparse", "spchol", "spcompack", "spec", "spget", "splin", "splin2d", "splin3d", "splitURL", "spones", "sprintf", "spzeros", "sqrt", "strcat", "strchr", "strcmp", "strcspn", "strindex", "string", "stringbox", "stripblanks", "strncpy", "strrchr", "strrev", "strsplit", "strspn", "strstr", "strsubst", "strtod", "strtok", "struct", "sum", "svd", "swap_handles", "symfcti", "syredi", "system_getproperty", "system_setproperty", "tan", "tanh", "taucs_chdel", "taucs_chfact", "taucs_chget", "taucs_chinfo", "taucs_chsolve", "tempname", "testAnalysis", "testGVN", "testmatrix", "tic", "timer", "tlist", "toJSON", "toc", "tohome", "tokens", "toolbar", "toprint", "tr_zer", "tril", "triu", "type", "typename", "typeof", "uiDisplayTree", "uicontextmenu", "uicontrol", "uigetcolor", "uigetdir", "uigetfile", "uigetfont", "uimenu", "uint16", "uint32", "uint64", "uint8", "uipopup", "uiputfile", "uiwait", "ulink", "umf_ludel", "umf_lufact", "umf_luget", "umf_luinfo", "umf_lusolve", "umfpack", "unglue", "unix", "unsetmenu", "unzoom", "updatebrowsevar", "usecanvas", "useeditor", "validvar", "var2vec", "varn", "vec2var", "waitbar", "warnBlockByUID", "warning", "what", "where", "whereis", "who", "win64", "winopen", "winqueryreg", "winsid", "with_module", "write", "write_csv", "x_choose", "x_choose_modeless", "x_dialog", "x_mdialog", "xarc", "xarcs", "xarrows", "xchange", "xchoicesi", "xclick", "xcos", "xcosAddToolsMenu", "xcosCellCreated", "xcosConfigureXmlFile", "xcosDiagramToScilab", "xcosPalCategoryAdd", "xcosPalDelete", "xcosPalDisable", "xcosPalEnable", "xcosPalGenerateIcon", "xcosPalGet", "xcosPalLoad", "xcosPalMove", "xcosSimulationStarted", "xcosUpdateBlock", "xdel", "xend", "xfarc", "xfarcs", "xfpoly", "xfpolys", "xfrect", "xget", "xgetmouse", "xgraduate", "xgrid", "xinit", "xlfont", "xls_open", "xls_read", "xmlAddNs", "xmlAppend", "xmlAsNumber", "xmlAsText", "xmlDTD", "xmlDelete", "xmlDocument", "xmlDump", "xmlElement", "xmlFormat", "xmlGetNsByHref", "xmlGetNsByPrefix", "xmlGetOpenDocs", "xmlIsValidObject", "xmlName", "xmlNs", "xmlRead", "xmlReadStr", "xmlRelaxNG", "xmlRemove", "xmlSchema", "xmlSetAttributes", "xmlValidate", "xmlWrite", "xmlXPath", "xname", "xpoly", "xpolys", "xrect", "xrects", "xs2bmp", "xs2emf", "xs2eps", "xs2gif", "xs2jpg", "xs2pdf", "xs2png", "xs2ppm", "xs2ps", "xs2svg", "xsegs", "xset", "xstring", "xstringb", "xtitle", "zeros", "znaupd", "zneupd", "zoom_rect"]
end
end
end
15 changes: 15 additions & 0 deletions lib/rouge/lexers/scilab/functions.rb

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions lib/rouge/lexers/scilab/keywords.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*- #
# frozen_string_literal: true

# DO NOT EDIT

# This file is automatically generated by `rake keywords:scilab`.
# See tasks/builtins/scilab.rake for more info.

module Rouge
module Lexers
def Scilab.keywords
@keywords ||= Set.new ["abort", "apropos", "break", "case", "catch", "clc", "clear", "continue", "do", "else", "elseif", "end", "endfunction", "exit", "for", "function", "help", "if", "pause", "pwd", "quit", "resume", "return", "select", "then", "try", "what", "while", "who"]
end
end
end