|
From: | Per Cederberg |
Subject: | Re: [Grammatica-users] Regex Issue |
Date: | Fri, 24 Apr 2015 09:39:25 +0200 |
Here is a snippet of a grammar I am trying to setup. I am looking to match the following textPROTO 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_TYPECODE_TYPEEVENT_TYPEIDENTIFIER_STRING DEC_NUMBERVERSION_TAG?PAYLOADPAYLOAD_DESCRIPTION_INFOEVENT_DESCRIPTION_INFOCATEGORY_INFOACTIVE_STATE?CODE_DEFINITION?;[ValidateProtocol] {{{[ValidateProtocol] [1328:1] unexpected token "{{{" <CODE_BEGIN>, expected <CODE_TEXT>, on line 1328 column: 1[ValidateProtocol] Error parsing protocol fileAs long as I have the CODE_DEFINITION tag in the definition I have errors. What am I missing,thanks in advance
_______________________________________________
Grammatica-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/grammatica-users
[Prev in Thread] | Current Thread | [Next in Thread] |