Here is a snippet of a grammar I am trying to setup. I am looking to match the following text
PROTO CLIENT EVENT ActiveConversationsList 32 PAYLOAD[JSON(conversations):data] PAYLOAD_DESCRIPTION ""
EVENT_DESCRIPTION "List of ActiveConversations, each ActiveConversation contains conv_id, conv_name, group_id, start_indx, last_indx, uids_involved"
CATEGORY "" CODE (java)
{{{
java example
aaa
aaa
aa
}}}
Here is portion of the grammar I have come up with.
%tokens%
IDENTIFIER_STRING = <<[a-zA-Z][a-zA-Z0-9-_]*>>
PAREN_OPEN = "("
PAREN_CLOSE = ")"
CODE = "CODE"
CODE_TEXT = <<(^\{\{\{\n).*(^\}\}\}\n)>>
%productions%
CODE_LANG = "(" IDENTIFIER_STRING ")";
CODE_DEFINITION = CODE (CODE_LANG)? CODE_TEXT;
EventDefinition = SERVER_TYPE
CODE_TYPE
EVENT_TYPE
IDENTIFIER_STRING DEC_NUMBER
VERSION_TAG?
PAYLOAD
PAYLOAD_DESCRIPTION_INFO
EVENT_DESCRIPTION_INFO
CATEGORY_INFO
ACTIVE_STATE?
CODE_DEFINITION?
;
[ValidateProtocol] {{{
[ValidateProtocol] [1328:1] unexpected token "{{{" <CODE_BEGIN>, expected <CODE_TEXT>, on line 1328 column: 1
[ValidateProtocol] Error parsing protocol file
As long as I have the CODE_DEFINITION tag in the definition I have errors. What am I missing,
thanks in advance