Commit 36d32dc2 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix minor bugs

parent 54c5842b
......@@ -103,6 +103,7 @@ def generate(*args, **kwargs):
@generate.register(ogAST.Process)
def _process(process, simu=False, **kwargs):
''' Generate the code for a complete process (AST Top level) '''
print "SIMU=", simu
process_name = process.processName
global TYPES
TYPES = process.dataview
......
......@@ -2,7 +2,7 @@
 
# Resource object code
#
# Created: Sat Dec 13 17:01:44 2014
# Created: Wed Jan 21 14:27:19 2015
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
......@@ -597,7 +597,7 @@ def check_range(typeref, type_to_check):
if float(type_to_check.Min) < float(typeref.Min) \
or float(type_to_check.Max) > float(typeref.Max):
raise Warning('Expression evaluation in range [{}..{}], '
'outside expected range [{}..{}]'
'could be outside expected range [{}..{}]'
.format(type_to_check.Min, type_to_check.Max,
typeref.Min, typeref.Max))
except (AttributeError, ValueError):
......@@ -1506,9 +1506,10 @@ def primary_index(root, context):
if float(idx_bty.Max) >= float(r_max):
errors.append(error(root,
'Index range [{id1} .. {id2}] '
'outside of range [0 .. <{r2}]'
'outside of range [{r1} .. {r2}]'
.format(id1=idx_bty.Min, id2=idx_bty.Max,
r2=r_max)))
r1=int(r_min) - 1,
r2=int(r_max) - 1)))
elif float(idx_bty.Min) > float(r_min):
warnings.append(warning(root,
'Index higher than range min value'))
......
......@@ -2051,7 +2051,7 @@ def generate(process, options):
if options.toAda or options.shared or options.dll:
LOG.info('Generating Ada code')
try:
AdaGenerator.generate(process, simu=options.dll)
AdaGenerator.generate(process, simu=options.shared)
except (TypeError, ValueError, NameError) as err:
LOG.error(str(err))
LOG.debug(str(traceback.format_exc()))
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-12-13 17:01:47
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2015-01-21 14:27:21
import sys
from antlr3 import *
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment