Opened 16 years ago
Closed 16 years ago
#152 closed defect (fixed)
front end does not parse certain type expressions
| Reported by: | Stephen Siegel | Owned by: | ywei |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | front | Version: | 1.0 |
| Keywords: | front pointer parse | Cc: |
Description
Neither of the following can be parsed:
real*[2] grid_data; real**[2] grid;
In the first case I am trying to make an array of length 2 in which the elements have type real* (pointer to real).
In the second case I am trying to make an array of length 2 in which the elements have type real (pointer to pointer to real).
Change History (8)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Status: | new → accepted |
|---|
comment:3 by , 16 years ago
I modified the grammar to accept array of pointers. But the simplifier complained about pointer type array elements because symbolic universe doesn't have pointer type. Should I add one?
comment:4 by , 16 years ago
The symbolic universe should not have to know anything about pointers. The value package is supposed to translate pointer values into a simple tuple representation, and I believe the symbolic package already supports tuples. I will have to check into this to see what is going on. Is there a simple example checked in?
comment:5 by , 16 years ago
If you look at the simplePointer.mmp in the pointers directory and run the JUnit test, it will fail and report an exception in simplifier.
comment:6 by , 16 years ago
It fails because the "kind" field in SymType is null for a tuple type. It should be set to TUPLE when the tuple type is instantiated. Please fix, debug, and test the tuple functionality of the symbolic package. When you believe it is working, we can resume work on this problem.
comment:7 by , 16 years ago
I added the missing part in SymTuple class to set the type category field. Now the test threw another exception on an unbounded array.
comment:8 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Fixed. Just needed to make null simplify to null. Will create new ticket if problems re-emerge.

Here is another thing that cannot be parsed:
because of the
real*type argument.