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

Sugestion for a new grammar for the message specifications #197

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ DateTime0 returns type::DateTime:
//MESSAGE PRIMITIVES DEFINITION
///////////////////
MessagePart returns primitives::MessagePart:
Type = AbstractType
Data =(KEYWORD | MESSAGE_ASIGMENT | EString)
Data =(KEYWORD | MESSAGE_ASIGMENT | EString)':' Type = AbstractType
;

terminal MESSAGE_ASIGMENT:
Expand Down Expand Up @@ -288,66 +287,66 @@ duration returns primitives::duration:

boolArray returns primitives::boolArray:
{primitives::boolArray}
'bool[]'
'[bool]'
;

int8Array returns primitives::int8Array:
{primitives::int8Array}
'int8[]'
'[int8]'
;

uint8Array returns primitives::uint8Array:
{primitives::uint8Array}
'uint8[]'
'[uint8]'
;

int16Array returns primitives::int16Array:
{primitives::int16Array}
'int16[]'
'[int16]'
;

uint16Array returns primitives::uint16Array:
{primitives::uint16Array}
'uint16[]'
'[uint16]'
;

int32Array returns primitives::int32Array:
{primitives::int32Array}
'int32[]'
'[int32]'
;

uint32Array returns primitives::uint32Array:
{primitives::uint32Array}
'uint32[]'
'[uint32]'
;

int64Array returns primitives::int64Array:
{primitives::int64Array}
'int64[]'
'[int64]'
;

uint64Array returns primitives::uint64Array:
{primitives::uint64Array}
'uint64[]'
'[uint64]'
;

float32Array returns primitives::float32Array:
{primitives::float32Array}
'float32[]'
'[float32]'
;

float64Array returns primitives::float64Array:
{primitives::float64Array}
'float64[]'
'[float64]'
;

string0Array returns primitives::stringArray:
{primitives::stringArray}
'string[]'
'[string]'
;
byteArray returns primitives::ByteArray:
{primitives::ByteArray}
'byte[]'
'[byte]'
;

Header returns primitives::Header:
Expand All @@ -360,7 +359,7 @@ TopicSpecRef returns TopicSpecRef:
;

ArrayTopicSpecRef returns ArrayTopicSpecRef:
TopicSpec=[TopicSpec|EString]'[]'
'['TopicSpec=[TopicSpec|EString]']'
;

KEYWORD: 'goal' | 'message' | 'result' | 'feedback' | 'name' | 'value' | 'service' | 'type' | 'action' | 'duration' | 'time' ;
Expand All @@ -384,6 +383,9 @@ RosNames returns ecore::EString:
ROS_CONVENTION_A | ID | 'node'
;

PreListElement hidden(SL_COMMENT):
'-';

terminal ROS_CONVENTION_A:
( ('/' ID ) | ( ID '/' ) )* ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Package_Impl returns Package:
('fromGitRepo:' fromGitRepo=EString)?
('specs:'
BEGIN
spec+=SpecBase*
PreListElement spec+=SpecBase
(PreListElement spec+=SpecBase)*
END
)?
('dependencies:' '[' dependency+=Dependency (',' dependency+=Dependency)* ']' )?
Expand Down Expand Up @@ -72,44 +73,43 @@ Artifact returns Artifact:

Node returns Node:
'node:' name=RosNames
BEGIN
(
('publishers:'
BEGIN
publisher+=Publisher*
END
)|
('subscribers:'
BEGIN
subscriber+=Subscriber*
END
)|
('serviceservers:'
BEGIN
serviceserver+=ServiceServer*
END
)|
('serviceclients:'
BEGIN
serviceclient+=ServiceClient*
END
)|
('actionservers:'
BEGIN
actionserver+=ActionServer*
END
)|
('actionclients:'
BEGIN
actionclient+=ActionClient*
END
)|
('parameters:'
BEGIN
parameter+=Parameter*
END
)
)*END
(
('publishers:'
BEGIN
publisher+=Publisher*
END
)|
('subscribers:'
BEGIN
subscriber+=Subscriber*
END
)|
('serviceServers:'
BEGIN
serviceserver+=ServiceServer*
END
)|
('serviceClients:'
BEGIN
serviceclient+=ServiceClient*
END
)|
('actionServers:'
BEGIN
actionserver+=ActionServer*
END
)|
('actionClients:'
BEGIN
actionclient+=ActionClient*
END
)|
('parameters:'
BEGIN
parameter+=Parameter*
END
)
)*
;

///////////////////
Expand Down Expand Up @@ -146,7 +146,7 @@ ActionSpec returns ActionSpec:

MessageDefinition returns MessageDefinition:
{MessageDefinition}
MessagePart+=MessagePart*;
MessagePart+=MessagePart+;

///////////////////
//INTERFACES
Expand Down