Skip to content
Merged
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 @@ -7,7 +7,13 @@ INSTRUCTIONNAME : '<=' | '+AR1' | '+AR2' | '+D' | '-D' | '*D' | '/D' | '==D' | '

LOGICCOMPARISON : '==0' | '<>0' | '>0' | '<0' | '>=0' | '<=0' ;

TITLE : 'TITLE' [ \t]* '=' ~[\r\n]* ;
TITLE : 'TITLE' Whitespace? '=' ~[\r\n]* LineTerm? ;
FUNCTION_BLOCK : ID Whitespace StringConstant (Whitespace? ':' Whitespace? ID)? LineTerm? ;
fragment BRACED_BLOCK: '{' ~[\r\n]+ '}' LineTerm? ;
FAMILY_FIELD: 'FAMILY' Whitespace? ':' Whitespace? (REAL | INT | StringConstant | ID)+ LineTerm? ;
VERSION_FIELD: 'VERSION' Whitespace? ':' Whitespace? (REAL | INT | StringConstant | ID)+ LineTerm? ;

HEADER: FUNCTION_BLOCK TITLE BRACED_BLOCK* FAMILY_FIELD? VERSION_FIELD -> channel(HIDDEN) ;

POINTER_OP : 'P#' 'DBX'? ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ void examples() {
doTest("awl_examples");
}

@Test
void headers() {
doTest("headers");
}

}
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
[Image] or [Truncated image[ Bcol Ecol
L5
[FUNCTION_BLOCK] 1 15
["fb1"] 16 21
L6
[TITLE = %version: 1 % Title inform[ 1 64
L7
[{] 1 2
[this_is_false] 3 16
[:=] 17 19
['FALSE'] 20 27
[}] 28 29
L8
[FAMILY] 1 7
[:] 8 9
[Fam1] 10 14
L9
[VERSION] 1 8
[:] 9 10
[0.0] 11 14
L12
[VAR_INPUT] 4 13
L13
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FUNCTION_BLOCK "fb1"
TITLE = %version: 1 % Title information is present here % $ ^ \
{ this_is_false := 'FALSE' }
FAMILY : Fam1
VERSION : 0.0

FUNCTION_BLOCK "fb2" : Void
TITLE = %version: 2 % Title information is present here % $ ^ \
{ this_is_false := 'TRUE' }
FAMILY : Fam2
VERSION : 0.2


NETWORK
TITLE = GC: Start transfers SWS07/TRS08
NOP 0;

NETWORK
TITLE = HA: Transfer data from TRS03 to TRS01
NOP 0;

FUNCTION "F1" : Void
TITLE = %version: 42% %Commit: badbed1%
{ this_is_false_again := 'FALSE' }
FAMILY : Brouwers
VERSION : 0.2

ORGANIZATION_BLOCK "YOU_ARE_BLOCKED"
TITLE = The Memoirs of an Organization Block
{ this_is_false_is_false := 'TRUE' }
VERSION : 9000.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Image] or [Truncated image[ Bcol Ecol
L14
[NETWORK] 1 8
L15
[TITLE = GC: Start transfers SWS07/[ 1 41
L16
[NOP] 7 10
[0] 11 12
[;] 12 13
L18
[NETWORK] 1 8
L19
[TITLE = HA: Transfer data from TRS[ 1 47
L20
[NOP] 7 10
[0] 11 12
[;] 12 13
EOF
Loading