Opened 16 years ago

Closed 16 years ago

#137 closed defect (fixed)

pointer addition not in grammar

Reported by: Stephen Siegel Owned by: ywei
Priority: major Milestone:
Component: front Version: 1.0
Keywords: pointer arithmetic addition Cc:

Description

Parsing

  for (i=0; i<count; i++) tempBuffer[i] = *(buffer + i);

yields:

Syntax error in diffusion1_par.mmp 25.44--25.50: "buffer":
buffer
Addition requires numeric type

An addition expression may involve one pointer expression and one integer expression.

Change History (3)

comment:1 by ywei, 16 years ago

Status: newaccepted

I fixed the front-end to let the additive operations allow pointer type operands. But I think the place that throws this exception is in the model module.

comment:2 by Stephen Siegel, 16 years ago

The problem is the wrong method is getting called in ModelFactoryIF. The method that should be called is pointerAddExpression. Instead the method being called is addExpression, which is only for numerical addition.

comment:3 by ywei, 16 years ago

Resolution: fixed
Status: acceptedclosed

Fixed the ModelBuilder to use the correct method in model factory.

Note: See TracTickets for help on using tickets.