Commit 41548a94b9e3625c2b9ec5d3de438c27d6fb13f9
1 parent
a6a93be8
*** empty log message ***
Showing
1 changed file
with
25 additions
and
16 deletions
Show diff stats
anubis_dev/compiler/src/description.text
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | |
| 21 | 21 | *** (2) Tools. |
| 22 | 22 | *** (2.1) Lisp-like representation. |
| 23 | - *** (2.2) Exceptions to the Lisp-like 'Expr' representation: | |
| 23 | + *** (2.2) Exceptions to the Lisp-like 'Expr' representation. | |
| 24 | 24 | *** (2.3) Catalog of all internal data representations. |
| 25 | 25 | *** (2.3.1) Internal representation of types. |
| 26 | 26 | *** (2.3.2) Internal representation of terms. |
| ... | ... | @@ -279,7 +279,7 @@ |
| 279 | 279 | |
| 280 | 280 | |
| 281 | 281 | |
| 282 | - *** (2.2) Exceptions to the Lisp-like 'Expr' representation: | |
| 282 | + *** (2.2) Exceptions to the Lisp-like 'Expr' representation. | |
| 283 | 283 | |
| 284 | 284 | Actually, this system has exceptions. Normally, all tokens returned by the lexer have a |
| 285 | 285 | value of type 'Expr', i.e. a datum containing its own (dynamic) type. Examining such a |
| ... | ... | @@ -340,7 +340,9 @@ |
| 340 | 340 | - 'interpretations' (as produced by 'term_interpretations' and related functions) |
| 341 | 341 | - 'implementations' (as produced by 'type_implementation' and related functions) |
| 342 | 342 | - 'instructions' (as produced by 'compile_term' and related functions) |
| 343 | - | |
| 343 | + | |
| 344 | + Note: All data are represented either by Lisp-like atoms (string, tags, ...), or by | |
| 345 | + lists. In the case of a list, the head of list is always a tag. | |
| 344 | 346 | |
| 345 | 347 | |
| 346 | 348 | *** (2.3.1) Internal representation of types. |
| ... | ... | @@ -350,7 +352,7 @@ |
| 350 | 352 | yy__Symbol just a type name in the form of a Lisp-like string |
| 351 | 353 | |
| 352 | 354 | For example, the types 'One', 'Bool' etc ... are in this category. The file |
| 353 | - 'compil.h' contains the definitions of a lot 'predefined strings'. Within the C | |
| 355 | + 'compil.h' contains the definitions of a lot of 'predefined strings'. Within the C | |
| 354 | 356 | source, such symbols may be represented by the C symbols 'pdstr_One', 'pdstr_Bool' |
| 355 | 357 | etc... ('pdstr_' for 'predefined strings'). |
| 356 | 358 | |
| ... | ... | @@ -370,7 +372,7 @@ |
| 370 | 372 | The above being more 'primitive', they are represented by Lisp-like tags, instead of |
| 371 | 373 | Lisp-like strings (maybe a bad idea). |
| 372 | 374 | |
| 373 | - (type_RAddr . <type>) represents 'RAddr(T)'; type_RAddr is a Lips-like tag | |
| 375 | + (type_RAddr . <type>) represents 'RAddr(T)'; type_RAddr is a Lisp-like tag | |
| 374 | 376 | (type_WAddr . <type>) idem |
| 375 | 377 | (type_RWAddr . <type>) idem |
| 376 | 378 | (type_GAddr . <type>) idem (obsolete: global variable) |
| ... | ... | @@ -432,20 +434,20 @@ |
| 432 | 434 | (protect <lc> . <term>) |
| 433 | 435 | (lock <lc> <term> . <term>) |
| 434 | 436 | (debug_avm <lc> . <term>) |
| 435 | - (avm <lc> . AVM) (AVM is defined below) | |
| 437 | + (avm <lc> . AVM) (AVM is explained below) | |
| 436 | 438 | (terminal <lc> . <term>) |
| 437 | 439 | (symbol <lc> . <Lisp-like string>) |
| 438 | 440 | (integer <lc> . <Cint>) |
| 439 | 441 | (fpnum <lc> <mantissa> . <exponent>) (<mantissa> and <exponent> are Lisp-like integers) |
| 440 | - (of_type <lc> <type> . <term>) | |
| 442 | + (of_type <lc> <type> . <term>) (explicit typing) | |
| 441 | 443 | (string <lc> . <string>) (<string> is a Lisp-like string) |
| 442 | 444 | (with <lc> <symbol> <value> . <term>) |
| 443 | 445 | (delegate <lc> <term> . <term>) |
| 444 | - (lambda <lc> <FArgs> . <term>) | |
| 445 | - (rec_lambda <lc> <name> <FArgs> . <term>) | |
| 446 | - (app <lc> <term> . <terms>) | |
| 447 | - (cond <lc> <term> . <cases>) | |
| 448 | - (select_cond <lc> <term> <case> . <term>) | |
| 446 | + (lambda <lc> <FArgs> . <term>) (|->) | |
| 447 | + (rec_lambda <lc> <name> <FArgs> . <term>) (|-f->) | |
| 448 | + (app <lc> <term> . <terms>) (applicative term) | |
| 449 | + (cond <lc> <term> . <cases>) (conditional) | |
| 450 | + (select_cond <lc> <term> <case> . <term>) (selective conditional) | |
| 449 | 451 | (serialize <lc> . <term>) |
| 450 | 452 | (unserialize <lc> . <term>) |
| 451 | 453 | |
| ... | ... | @@ -464,6 +466,13 @@ |
| 464 | 466 | *** (2.3.3) Internal representation of interpretations. |
| 465 | 467 | |
| 466 | 468 | |
| 469 | + *** (2.3.4) Internal representation of type implementations. | |
| 470 | + | |
| 471 | + | |
| 472 | + *** (2.3.5) Internal representation of virtual machine instructions. | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 467 | 476 | |
| 468 | 477 | *** (2.4) Unification. |
| 469 | 478 | |
| ... | ... | @@ -1315,7 +1324,7 @@ |
| 1315 | 1324 | |
| 1316 | 1325 | |
| 1317 | 1326 | |
| 1318 | - *** () Descriptions of small types. | |
| 1327 | + *** (10.2) Descriptions of small types. | |
| 1319 | 1328 | |
| 1320 | 1329 | They are lists on integers defined by the following grammar: |
| 1321 | 1330 | |
| ... | ... | @@ -1343,7 +1352,7 @@ |
| 1343 | 1352 | |
| 1344 | 1353 | |
| 1345 | 1354 | |
| 1346 | - *** (10.1) Pseudo-instructions set. | |
| 1355 | + *** (10.3) Pseudo-instructions set. | |
| 1347 | 1356 | |
| 1348 | 1357 | The official list of pseudo-instructions is defined in 'bytecode.h'. Recall that these |
| 1349 | 1358 | instructions have two meanings: one for serialisation and one for unserialisation. |
| ... | ... | @@ -1392,11 +1401,11 @@ |
| 1392 | 1401 | small_mixed_alt (obsolete; never used) |
| 1393 | 1402 | |
| 1394 | 1403 | |
| 1395 | - *** (10.2) Serialising. | |
| 1404 | + *** (10.4) Serialising. | |
| 1396 | 1405 | |
| 1397 | 1406 | |
| 1398 | 1407 | |
| 1399 | - *** (10.3) Unserialising. | |
| 1408 | + *** (10.5) Unserialising. | |
| 1400 | 1409 | |
| 1401 | 1410 | |
| 1402 | 1411 | ... | ... |