Commit 824a7f5e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Regression fixes

parent 4e4a7b13
...@@ -929,12 +929,13 @@ def _equality(expr): ...@@ -929,12 +929,13 @@ def _equality(expr):
actual_type = getattr(expr.left.exprType, actual_type = getattr(expr.left.exprType,
'ReferencedTypeName', 'ReferencedTypeName',
None) or expr.left.exprType.kind None) or expr.left.exprType.kind
basic = find_basic_type(expr.left.exprType) in ('IntegerType', actual_type = actual_type.replace('-', '_')
'Integer32Type', basic = find_basic_type(expr.left.exprType).kind in ('IntegerType',
'BooleanType', 'Integer32Type',
'RealType', 'BooleanType',
'EnumeratedType', 'RealType',
'ChoiceEnumeratedType') 'EnumeratedType',
'ChoiceEnumeratedType')
if basic: if basic:
ada_string = u'({left} {op} {right})'.format( ada_string = u'({left} {op} {right})'.format(
left=left_str, op=expr.operand, right=right_str) left=left_str, op=expr.operand, right=right_str)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
   
# Resource object code # Resource object code
# #
# Created: Tue Jul 22 16:47:55 2014 # Created: Wed Aug 6 23:54:13 2014
# by: The Resource Compiler for PySide (Qt v4.8.6) # by: The Resource Compiler for PySide (Qt v4.8.4)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
   
...@@ -1954,6 +1954,7 @@ def floating_label(root, parent, context): ...@@ -1954,6 +1954,7 @@ def floating_label(root, parent, context):
errors = [] errors = []
warnings = [] warnings = []
lab = ogAST.Floating_label() lab = ogAST.Floating_label()
lab_x, lab_y = 0, 0
# Keep track of the number of terminator statements following the label # Keep track of the number of terminator statements following the label
# useful if we want to render graphs from the SDL model # useful if we want to render graphs from the SDL model
terminators = len(context.terminators) terminators = len(context.terminators)
...@@ -1965,6 +1966,7 @@ def floating_label(root, parent, context): ...@@ -1965,6 +1966,7 @@ def floating_label(root, parent, context):
elif child.type == lexer.CIF: elif child.type == lexer.CIF:
# Get symbol coordinates # Get symbol coordinates
lab.pos_x, lab.pos_y, lab.width, lab.height = cif(child) lab.pos_x, lab.pos_y, lab.width, lab.height = cif(child)
lab_x, lab_y = lab.pos_x, lab.pos_y
elif child.type == lexer.HYPERLINK: elif child.type == lexer.HYPERLINK:
lab.hyperlink = child.getChild(0).text[1:-1] lab.hyperlink = child.getChild(0).text[1:-1]
elif child.type == lexer.TRANSITION: elif child.type == lexer.TRANSITION:
...@@ -1975,11 +1977,11 @@ def floating_label(root, parent, context): ...@@ -1975,11 +1977,11 @@ def floating_label(root, parent, context):
lab.transition = trans lab.transition = trans
else: else:
warnings.append( warnings.append(
'Unsupported construct in floating label: ' + ['Unsupported construct in floating label: ' +
str(child.type)) str(child.type), [lab_x, lab_y], []])
if not lab.transition: if not lab.transition:
warnings.append('Floating labels not followed by a transition: ' + warnings.append(['Floating labels not followed by a transition: ' +
str(lab.inputString)) str(lab.inputString), [lab_x, lab_y], []])
# At the end of the label parsing, get the the list of terminators that # At the end of the label parsing, get the the list of terminators that
# the transition contains by making a diff with the list at context # the transition contains by making a diff with the list at context
# level (we counted the number of terminators before parsing the item) # level (we counted the number of terminators before parsing the item)
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-07-29 14:08:49 # $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-08-06 23:54:18
import sys import sys
from antlr3 import * from antlr3 import *
......
This diff is collapsed.
Supports Markdown
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