如何申报XTEXT数组 [英] how to declare an array in xtext

查看:126
本文介绍了如何申报XTEXT数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用XTEXT声明的领域特定语言的整数数组。

I need to declare an integer array in a domain specific language using xtext.

PolyLine:
'polyline' color = Color '{'                    Line1
'points number' n = INT                         Line2
'x points'                                      Line3
'y ponts'                                       Line4
'}';

在上面的规则的声明,我需要得到一些x和y点,这表明一些协调(他们的数量等于在2号线ñ属性)。但我找不到帮我回答我的问题:我怎么能在XTEXT声明一个数组的任何文件?
有人可以帮吗?

In above rule declaration, I need to get several x and y points which indicate some coordination (theirs number is equal to n property in line2). But I can't find any document that help me to answer my question "How I can declare a array in xtext"? Can somebody help please?

推荐答案

我不太清楚,你可以有你的问题的目标,但基本上都是使用 + = 运营商

I am not quite sure what your questions targets but you can have lists of things basically using the += operator

点+ = INT +

(点+ = INT(,点+ = INT)*)

这篇关于如何申报XTEXT数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆