Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArraySubExpr parsing inconvenient #46

Open
kfhoech opened this issue Jan 21, 2021 · 0 comments · May be fixed by #103
Open

ArraySubExpr parsing inconvenient #46

kfhoech opened this issue Jan 21, 2021 · 0 comments · May be fixed by #103
Assignees
Labels
AGREE bug Something isn't working
Milestone

Comments

@kfhoech
Copy link
Contributor

kfhoech commented Jan 21, 2021

In the AGREE grammar the ArraySubExpr allows a full Expr for the index expression but requires only a TagExpr for the array expr. This is inconvenient in that the array expr ought to allow a more general expr. See the following model illustrating the problem.

package Array_Parse
public
	with Base_Types;
	with Data_Model;

	data Alpha
		properties
			Data_Model::Data_Representation => Struct;
	end Alpha;

	data implementation Alpha.impl
		subcomponents
			x : data Base_Types::Integer;
			y : data Base_Types::Integer;
	end Alpha.impl;
	
	data Beta
		properties
			Data_Model::Data_Representation => Struct;
	end Beta;

	data implementation Beta.impl
		subcomponents
			m : data Alpha.impl[2];
	end Beta.impl;
	
	system Epsilon
		features
			inp : in data port Beta.impl;
		annex agree {**
			-- This parses
			assume "Input" : (inp.m[1]).x = 1;
			-- This doesn't parse'
			assume "Input" : inp.m[1].x = 1;
		**};
	end Epsilon;

end Array_Parse;
@kfhoech kfhoech added bug Something isn't working AGREE labels Jan 21, 2021
@kfhoech kfhoech self-assigned this Mar 16, 2022
@kfhoech kfhoech linked a pull request Mar 16, 2022 that will close this issue
@kfhoech kfhoech added this to the v2.10.0 milestone Mar 29, 2022
@kfhoech kfhoech modified the milestones: v2.10.0, v2.11.0 Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AGREE bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant