Skip to content

Commit e5dcaaa

Browse files
committed
Add section on comments
1 parent 1829db2 commit e5dcaaa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ You can load JSON, YAML and FBP that way.
2424
Parser by itself:
2525
```php
2626
$myFbpConfig = <<<EOF
27+
# Read a file and cout its lines
2728
'test.file' -> IN ReadFile(ReadFile)
2829
ReadFile(ReadFile) OUT -> IN SplitbyLines(SplitStr)
2930
ReadFile() ERROR -> IN Display(Output)
@@ -99,6 +100,18 @@ For better understanding, the whole RegEx used for definition examination is:
99100
```
100101
((?P<inport>[a-zA-Z_]+(\[(?P<inport_no>[0-9]+)\])?)\s)?((?P<process>[\w\/]+)(\((?P<component>[\w\/\\\.]+)?\))?)(\s(?P<outport>[a-zA-Z_]+(\[(?P<outport_no>[0-9]+)\])?))?
101102
```
103+
*Comments:*
104+
You can add comments and empty lines for better readability and documentation. If you have a comment in the first line, it will be used as name of the definition.
105+
```
106+
# this definition reads files and counts their lines
107+
ReadFile() OUT -> IN SplitbyLines()
108+
ReadFile() out -> In SplitbyLines()
109+
110+
# some comment
111+
112+
# and for readability :-)
113+
ReadFile(ReadFile) OUT -> IN SplitbyLines(SplitStr)
114+
```
102115

103116
*Initializer:*
104117
You can have initial values for a graph:

0 commit comments

Comments
 (0)