Unclear rule in BEL 1.0 Specification: "Line Continuation Operator" inside strings like URLs

8 views
Skip to first unread message

Christian Ebeling

unread,
Jan 22, 2018, 6:21:18 AM1/22/18
to openbel-discuss
Dear all,

can you please clarify following vagueness:

In BEL 1.0 Specification you can find the following rule

5.3.8. Line Continuation Operator

Statements in a BEL Script are processed one line at a time. Multiple lines can be grouped together by using the line continuation operator \. In this case, the lines are processed as a single statement. For example, the following two statements have the same meaning:

Statement Example

# without line continuator

kinase(p(HGNC:IGFI1R)) -| (p(HGNC:BNIP3) -> bp(GO:apoptosis))

# with line continuator

kinase(p(HGNC:IGFI1R)) -| \ 
 (p(HGNC:BNIP3) -> bp(GO:apoptosis))

In another example in the same specification you can find "Line Continuation Operators" inside URLs with additional whitespaces:

DEFINE DEFAULT NAMESPACE HGNC AS URL \
 "http://resource.belframework.org/belframework/1.0/ns/hgnc-approved-\
 symbols.belns"
 
Questions:

1. Are "Line Continuation Operators" inside strings (here an URL surround by ") allowed.
2. If TRUE for 1.: Additional whitespaces in URLs are allowed

Please extend (or correct) the specification.

Many thanks in advance
Christian Ebeling

William Hayes

unread,
Jan 22, 2018, 5:13:19 PM1/22/18
to openbel-discuss
Hi Christian,

I would absolutely not call this best practice, but I strongly suspect the BEL Script parser in OpenBEL handles this. Tony Bargnesi would know for sure - testing is easiest way to figure out if it's handled.  I would expect that if you left any whitespaces at the beginning of the line:  symbols.belns" they would be added into the URL which would break it (or any spaces before the continuation char \).

Personally, I'm doing my best to get rid of this format.  Will have some announcements by end of Jan.

Best,

Wm
Reply all
Reply to author
Forward
0 new messages