diff --git a/doc/userdoc.org b/doc/userdoc.org index b26146ffb1ba626e89217dc6d4319714fe936cc9..af2326604a86cbbea2fbf7903fab802659a8bbff 100644 --- a/doc/userdoc.org +++ b/doc/userdoc.org @@ -101,7 +101,7 @@ The example is quite easy to read. variable ~m~, the old one was not modified in the process. It is important to already have in mind that the ~pugs~ language *does not allow* the modifications of values of *non-basic* types. This is - discussed in the section [[variable-types]]. + discussed in the section [[high-level-types]]. - Finally, the last block consists in saving the obtained mesh in a ~gnuplot~ file. The result is shown on Figure [[fig:intro-example]]. @@ -132,7 +132,7 @@ already be discussed. and variable of high-level types. This two kinds of variable behave almost the same but one must know their differences to understand better the underlying mechanisms and choices that we made. See - [[variable-types]] for details. + section [[basic-types]] and [[high-level-types]] for details. - Also, there are two types of function: *user-defined* functions and *builtin* functions. In this example, ~theta~, ~M~ and ~T~ are user-defined functions. All other functions (~cos~, ~cartesian2dMesh~,...) are @@ -326,7 +326,7 @@ writing of new methods. As it was already pointed out above, general purpose languages offer to much freedom: it is not easy to protect data. For instance in the ~pugs~ DSL, non basic variables are constant (see paragraph -[[variable-types]]). It is important since its prevent the user to modify +[[high-level-types]]). It is important since its prevent the user to modify data in an inconsistent way. Also, one must keep in mind that constraining the expressiveness is actually a strength. As said before, one can warranty coherence of the data, perform calculations @@ -393,23 +393,41 @@ Another benefit of not providing low-level instructions is that the scripts are more easy to write and read, and it is more difficult to write errors. -* TODO Language +* Language + +In this part we describe the grammar and data types that are ** Variables -*** Types<<variable-types>> +*** TODO Declaration + +*** TODO Affectation + +*** TODO Basic types<<basic-types>> + +*** TODO High-level types<<high-level-types>> + +*** TODO Lists + +*** TODO Tuples types + +*** TODO blocks and variables lifetime + +** TODO modules + +** TODO Statements -**** Basic types +*** if/else -**** High-level types +*** for loops -**** Tuples +*** do while loops -*** Lifetime +*** while loops -** Statements +*** break/continue -** Functions<<functions>> +** TODO Functions<<functions>> *** User-defined functions