summaryrefslogtreecommitdiff
path: root/sci2jslex.py
diff options
context:
space:
mode:
Diffstat (limited to 'sci2jslex.py')
-rwxr-xr-xsci2jslex.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/sci2jslex.py b/sci2jslex.py
index 5c8cdb3b..db76abe9 100755
--- a/sci2jslex.py
+++ b/sci2jslex.py
@@ -59,6 +59,7 @@ PREDEFINED_VARIABLES = {
FUNCTION_CALLS = {
'ANDLOG_f',
+ 'AutoScale',
'CFORTR',
'CLKIN_f',
'CLKINV_f',
@@ -78,18 +79,26 @@ FUNCTION_CALLS = {
'Modulo_Count',
'OUT_f',
'REGISTER_f',
+ 'ReadExcel',
+ 'ReadFromFile',
'SWITCH_f',
+ 'SaveToFile',
'abs',
+ 'addmenu',
'and',
+ 'atan',
'block_parameter_error',
'check_io',
'cleandata',
'compile_expr',
'compiler_expression',
'deff',
+ 'delmenu',
'diffobjs',
'do_eval',
'drawSplin',
+ 'drawlater',
+ 'drawnow',
'edit_curv',
'emptystr',
'eval',
@@ -98,20 +107,28 @@ FUNCTION_CALLS = {
'fileinfo',
'fileparts',
'find',
+ 'findrect',
'gca',
'gcf',
'genfunc1',
'genfunc2',
+ 'get_click',
'getmethod',
+ 'getos',
'gettext',
'getvalue',
+ 'gsort',
+ 'hidetoolbar',
'ieee',
'imag',
'int',
+ 'interp',
'is_modelica_block',
'isequal',
'lasterror',
'length',
+ 'lines',
+ 'linspace',
'list',
'matrix',
'max',
@@ -148,7 +165,10 @@ FUNCTION_CALLS = {
'script2var',
'set_io',
'setvalue_IHM_EDP',
+ 'sin',
'size',
+ 'splin',
+ 'sqrt',
'standard_define',
'strcat',
'strindex',
@@ -156,6 +176,7 @@ FUNCTION_CALLS = {
'strsubst',
'struct',
'sum',
+ 'tan',
'tlist',
'translate',
'typeof',
@@ -171,9 +192,11 @@ FUNCTION_CALLS = {
'xget',
'xinfo',
'xpoly',
+ 'xpolys',
'xset',
'xstringb',
'xstringl',
+ 'xtitle',
'zeros',
}
@@ -290,7 +313,7 @@ def t_LASTINDEX(t):
return t
def t_EOL(t):
- r'[ \t]*\n([ \t]*(//.*)?\n?)*'
+ r'[ \t]*(//.*)?\n([ \t]*(//.*)?\n?)*'
lastbracket = BRACKET_STACK[-1]
if lastbracket == ' ':
t.lexer.afterarray = False