summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--combined.js32
-rw-r--r--js/Misc/PAL_f.js31
-rw-r--r--js/Sources/GEN_SQR.js2
-rw-r--r--js/Sources/PULSE_SC.js2
-rwxr-xr-xsci2jslex.py18
-rwxr-xr-xsci2jsyacc.py25
6 files changed, 79 insertions, 31 deletions
diff --git a/combined.js b/combined.js
index c0930a89..851ab9b0 100644
--- a/combined.js
+++ b/combined.js
@@ -12693,6 +12693,36 @@ x=arg1;
typ=newpar;
}
}
+/* autogenerated from "macros/Misc/PAL_f.sci" */
+function PAL_f() {
+PAL_f.prototype.define = function PAL_f() {
+scs=scicos_diagram();
+scs.props.title="Palette";
+model=scicos_model();
+model.sim="palette";
+model.in1=[];
+model.out=[];
+model.rpar=scs;
+model.blocktype="h";
+model.dep_ut=[false,false];
+gr_i=[];
+x=standard_define([2,2],model,[],gr_i);
+x.graphics.id=scs.props.title(1);
+}
+PAL_f.prototype.details = function PAL_f() {
+}
+PAL_f.prototype.get = function PAL_f() {
+}
+PAL_f.prototype.set = function PAL_f() {
+[x,newparameters,needcompile,edited]=scicos(arg1.model.rpar);
+arg1.graphics.id=x.props.title(1);
+arg1.model.rpar=x;
+x=arg1;
+y=[];
+typ=[];
+%exit=resume(false)
+}
+}
/* autogenerated from "macros/Misc/RATELIMITER.sci" */
function RATELIMITER() {
RATELIMITER.prototype.define = function RATELIMITER() {
@@ -16689,4 +16719,4 @@ x=arg1;
}
}
-/* made from 255/274 files */
+/* made from 256/274 files */
diff --git a/js/Misc/PAL_f.js b/js/Misc/PAL_f.js
index 21ebba14..f27f6e8d 100644
--- a/js/Misc/PAL_f.js
+++ b/js/Misc/PAL_f.js
@@ -1,3 +1,30 @@
-Syntax error in input LexToken(SCICOS,'scicos',1,1009)
/* autogenerated from "macros/Misc/PAL_f.sci" */
-None
+function PAL_f() {
+PAL_f.prototype.define = function PAL_f() {
+scs=scicos_diagram();
+scs.props.title="Palette";
+model=scicos_model();
+model.sim="palette";
+model.in1=[];
+model.out=[];
+model.rpar=scs;
+model.blocktype="h";
+model.dep_ut=[false,false];
+gr_i=[];
+x=standard_define([2,2],model,[],gr_i);
+x.graphics.id=scs.props.title(1);
+}
+PAL_f.prototype.details = function PAL_f() {
+}
+PAL_f.prototype.get = function PAL_f() {
+}
+PAL_f.prototype.set = function PAL_f() {
+[x,newparameters,needcompile,edited]=scicos(arg1.model.rpar);
+arg1.graphics.id=x.props.title(1);
+arg1.model.rpar=x;
+x=arg1;
+y=[];
+typ=[];
+%exit=resume(false)
+}
+}
diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js
index eea33f2a..6a5213d4 100644
--- a/js/Sources/GEN_SQR.js
+++ b/js/Sources/GEN_SQR.js
@@ -1,3 +1,3 @@
-Syntax error in input LexToken(SCICOS_CONTEXT,'scicos_context',1,1457)
+Syntax error in input LexToken(DOT,'.',1,1561)
/* autogenerated from "macros/Sources/GEN_SQR.sci" */
None
diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js
index bc19ab77..0d7ab77a 100644
--- a/js/Sources/PULSE_SC.js
+++ b/js/Sources/PULSE_SC.js
@@ -1,3 +1,3 @@
-Syntax error in input LexToken(SCICOS_CONTEXT,'scicos_context',1,1406)
+Syntax error in input LexToken(DOT,'.',1,1511)
/* autogenerated from "macros/Sources/PULSE_SC.sci" */
None
diff --git a/sci2jslex.py b/sci2jslex.py
index 17651d0a..44427247 100755
--- a/sci2jslex.py
+++ b/sci2jslex.py
@@ -39,16 +39,7 @@ syntaxtokens = {
'part': 'PART',
'resume': 'RESUME',
'return': 'RETURN',
- 'scicos': 'SCICOS',
- 'scicos_block': 'SCICOS_BLOCK',
- 'scicos_context': 'SCICOS_CONTEXT',
- 'scicos_debug': 'SCICOS_DEBUG',
- 'scicos_diagram': 'SCICOS_DIAGRAM',
'scicos_getvalue': 'SCICOS_GETVALUE',
- 'scicos_graphics': 'SCICOS_GRAPHICS',
- 'scicos_link': 'SCICOS_LINK',
- 'scicos_model': 'SCICOS_MODEL',
- 'scicos_params': 'SCICOS_PARAMS',
'select': 'SELECT',
'then': 'THEN',
'where': 'WHERE',
@@ -83,6 +74,14 @@ functioncalls = {
'ones',
'or',
'sci2exp',
+ 'scicos',
+ 'scicos_block',
+ 'scicos_debug'
+ 'scicos_diagram',
+ 'scicos_graphics',
+ 'scicos_link',
+ 'scicos_model',
+ 'scicos_params',
'set_io',
'size',
'standard_define',
@@ -93,6 +92,7 @@ functioncalls = {
objects = {
'arg1',
+ 'scicos_context',
}
tokens = [
diff --git a/sci2jsyacc.py b/sci2jsyacc.py
index 42e01654..364c4ef2 100755
--- a/sci2jsyacc.py
+++ b/sci2jsyacc.py
@@ -423,8 +423,7 @@ def p_expression_term(p):
# C('function parameter')
def p_function_function_parameter(p):
- '''function : ltermvar OPENBRACKET expression CLOSEBRACKET
- | SCICOS_DEBUG OPENBRACKET expression CLOSEBRACKET'''
+ 'function : ltermvar OPENBRACKET expression CLOSEBRACKET'
p[0] = '%s(%s)' % (p[1], p[3])
# A(2,3)
@@ -618,25 +617,17 @@ def p_term_part_parameter_parameter(p):
# A(2,3)
def p_term_function_parameters(p):
- '''term : termvar OPENBRACKET list CLOSEBRACKET
- | SCICOS_BLOCK OPENBRACKET list CLOSEBRACKET
- | SCICOS_DIAGRAM OPENBRACKET list CLOSEBRACKET
- | SCICOS_GETVALUE OPENBRACKET list CLOSEBRACKET
- | SCICOS_GRAPHICS OPENBRACKET list CLOSEBRACKET
- | SCICOS_LINK OPENBRACKET list CLOSEBRACKET
- | SCICOS_MODEL OPENBRACKET list CLOSEBRACKET
- | SCICOS_PARAMS OPENBRACKET list CLOSEBRACKET'''
+ 'term : termvar OPENBRACKET list CLOSEBRACKET'
+ p[0] = '%s(%s)' % (p[1], p[3])
+
+# scicos_getvalue(2,3)
+def p_term_scicos_getvalue_parameters(p):
+ 'term : SCICOS_GETVALUE OPENBRACKET list CLOSEBRACKET'
p[0] = '%s(%s)' % (p[1], p[3])
# A()
def p_term_function(p):
- '''term : termvar OPENBRACKET CLOSEBRACKET
- | SCICOS_BLOCK OPENBRACKET CLOSEBRACKET
- | SCICOS_DEBUG OPENBRACKET CLOSEBRACKET
- | SCICOS_DIAGRAM OPENBRACKET CLOSEBRACKET
- | SCICOS_GRAPHICS OPENBRACKET CLOSEBRACKET
- | SCICOS_LINK OPENBRACKET CLOSEBRACKET
- | SCICOS_MODEL OPENBRACKET CLOSEBRACKET'''
+ 'term : termvar OPENBRACKET CLOSEBRACKET'
p[0] = '%s()' % (p[1])
# $