Skip to content

Commit 946a37b

Browse files
committed
extended readme
1 parent b2c0932 commit 946a37b

File tree

1 file changed

+131
-10
lines changed

1 file changed

+131
-10
lines changed

README.rst

Lines changed: 131 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,11 @@ each have :xml:`<header>` and :xml:`<body>`.
266266

267267

268268
If
269-
~~
269+
~~~
270270

271271
In the header of :xml:`<if>`, an expression is present.
272272

273-
Expression might be a single node like:
274-
275-
* :xml:`<name>`
276-
* :xml:`<literal>`
277-
* ...
278-
279-
More complex expressions are built from the :xml:`<operation>` nodes, each of which contains
280-
a collection of :xml:`<operand>` and :xml:`<operator>` nodes. Each operand contains an expression.
273+
See `Expressions`_ for a definition.
281274

282275

283276
Loop
@@ -298,6 +291,12 @@ however they exist only within the body of select statement.
298291
Simple statements
299292
-----------------
300293

294+
.. code:: xml
295+
296+
<statement>
297+
...
298+
</statement>
299+
301300
All simple statements are using :xml:`<statement>` node, which wraps around nodes like:
302301

303302
* :xml:`<assignment>`
@@ -318,6 +317,128 @@ All simple statements are using :xml:`<statement>` node, which wraps around node
318317
* ...
319318

320319

320+
Assignment
321+
~~~~~~~~~~
322+
323+
.. code:: fortran
324+
325+
x = 1
326+
327+
.. code:: xml
328+
329+
<assignment>
330+
<target>
331+
<name id="i" />
332+
</target>
333+
<value>
334+
<literal type="int" value="1" />
335+
</value>
336+
</assignment>
337+
338+
339+
Call
340+
~~~~
341+
342+
.. code:: fortran
343+
344+
call configure
345+
call initialize()
346+
call calculate(1, 2)
347+
call something(thing=my_value)
348+
349+
.. code:: xml
350+
351+
<call>
352+
<name hasSubscripts="false" id="configure" type="procedure" />
353+
</call>
354+
<call>
355+
<name hasSubscripts="true" id="initialize" type="procedure">
356+
<subscripts count="0" />
357+
</name>
358+
</call>
359+
<call>
360+
<name hasSubscripts="true" id="calculate" type="procedure">
361+
<subscripts count="2">
362+
<subscript type="simple">
363+
<literal type="int" value="1" />
364+
</subscript>
365+
<subscript type="simple">
366+
<literal type="int" value="2" />
367+
</subscript>
368+
</subscripts>
369+
</name>
370+
</call>
371+
<call >
372+
<name hasSubscripts="true" id="something" type="procedure">
373+
<subscripts count="1">
374+
<argument name="thing">
375+
<name id="my_value" />
376+
</argument>
377+
</subscripts>
378+
</name>
379+
</call>
380+
381+
382+
Expressions
383+
-----------
384+
385+
Expression might be a single node like:
386+
387+
* :xml:`<name>`
388+
* :xml:`<literal>`
389+
* ...
390+
391+
More complex expressions are built from the :xml:`<operation>` nodes, each of which contains
392+
a collection of :xml:`<operand>` and :xml:`<operator>` nodes. Each operand contains an expression.
393+
394+
395+
Unary operation
396+
~~~~~~~~~~~~~~~
397+
398+
.. code:: fortran
399+
400+
.not. flag
401+
402+
.. code:: xml
403+
404+
<operation type="unary">
405+
<operator operator=".not." />
406+
<operand>
407+
<name id="flag" />
408+
</operand>
409+
</operation>
410+
411+
412+
Multiary operation
413+
~~~~~~~~~~~~~~~~~~
414+
415+
.. code:: fortran
416+
417+
'Hello' // ' world'
418+
5 + x
419+
420+
.. code:: xml
421+
422+
<operation type="multiary">
423+
<operand >
424+
<literal type="char" value="'Hello'" />
425+
</operand>
426+
<operator operator="//" />
427+
<operand>
428+
<literal type="char" value="' world'" />
429+
</operand>
430+
</operation>
431+
<operation type="multiary">
432+
<operand>
433+
<literal type="int" value="5" />
434+
</operand>
435+
<operator operator="+" />
436+
<operand>
437+
<name id="x" />
438+
</operand>
439+
</operation>
440+
441+
321442
Subroutine
322443
----------
323444

@@ -673,4 +794,4 @@ Finally, generate results for Java code:
673794

674795
.. code:: bash
675796
676-
java -jar "lib/org.jacoco.cli-0.8.3-nodeps.jar" report "jacoco.exec" --classfiles "bin/" --sourcefiles "src/" --xml jacoco.xml
797+
java -jar "lib/org.jacoco.cli-0.8.3-nodeps.jar" report "jacoco.exec" --classfiles "bin/" --sourcefiles "src/" --html jacoco

0 commit comments

Comments
 (0)