Updated documentation for pending out actions: noted the EOF action embedding
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Mon, 22 Oct 2007 02:19:20 +0000 (02:19 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Mon, 22 Oct 2007 02:19:20 +0000 (02:19 +0000)
into a final state that remains final when compilation is complete. Regenerated
the exaction example because it uses entering actions and the start state is
final.

git-svn-id: http://svn.complang.org/ragel/trunk@310 052ea7fc-9027-0410-9066-f65837a77df0

doc/exaction.fig
doc/ragel-guide.tex

index 2c9af07..0bd45de 100644 (file)
@@ -1,62 +1,73 @@
 #FIG 3.2
+# Generated by Graphviz version 2.12 (Tue Sep  4 16:56:48 UTC 2007)
+# For: (thurston) Adrian Thurston,,,
+# Title: exaction
+# Pages: 1
 Portrait
 Center
-Metric
-A4
+Inches
+Letter
 100.00
 Single
 -2
-# Generated by dot version 2.2.1 (Fri Sep 30 13:22:44 UTC 2005)
-# For: (age) Adrian Thurston
-# Title: exaction
-# Pages: 1
 1200 2
-0 32 #d2d2d2
+0 32 #d3d3d3
+2 3 0 1 7 7 2 0 20 0.0 0 0 0 0 0 5
+ 0 2780 0 0 9080 0 9080 2780 0 2780
 # ENTRY
-1 1 0 1 0 0 0 0 20 0.000 0 0.0000 33 4183 33 33 33 4183 66 4216
-# 0
-1 1 0 1 0 32 0 0 -1 0.000 0 0.0000 1333 4183 383 383 1333 4183 1716 4566
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 1333 4266 0\001
-# ENTRY -> 0
+1 1 0 1 0 0 1 0 20 0.000 0 0.0000 120 360 40 -40 120 360 160 320
+# 1
+1 1 0 1 0 7 1 0 -1 0.000 0 0.0000 1920 800 460 -470 1920 800 2380 330
+4 1 0 1 0 0 14.0 0.0000 4 0.0 0.0 1920 880 1\001
+# ENTRY->1
 3 4 0 1 0 0 0 0 -1 0.0 0 0 0 7
-  66 4183 139 4183 237 4183 354 4183 485 4183 624 4183 766 4183
+  160 380 266 406 419 443 605 488 815 537 1037 589 1260 640
  0 1 1 1 1 1 0
 2 3 0 1 0 0 0 0 20 0.0 0 0 0 0 0 4
- 766 4116 933 4183 766 4233 766 4116
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 500 4133 IN\001
-# 1
-1 1 0 1 0 0 0 0 -1 0.000 0 0.0000 6300 4183 383 383 6300 4183 6683 4566
-1 1 0 1 0 0 0 0 -1 0.000 0 0.0000 6300 4183 450 450 6300 4183 6750 4633
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 6300 4266 1\001
-# 0 -> 1
-3 4 0 1 0 0 0 0 -1 0.0 0 0 0 19
-  1733 4166 1783 4165 1833 4162 1883 4158 1933 4154 1983 4151 2033 4150 2498 4134 2875 4122 3206 4114 3535 4110 3907 4111 4366 4116 4587 4125 4814 4133 5041 4141 5262 4150 5473 4158 5666 4166
- 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
+ 1278 572 1460 680 1250 709 1278 572
+4 1 0 0 0 0 14.0 0.0000 4 0.0 0.0 800 360 IN\001
+# en_1
+1 1 0 1 0 0 1 0 20 0.000 0 0.0000 120 1220 40 -40 120 1220 160 1180
+# en_1->1
+3 4 0 1 0 0 0 0 -1 0.0 0 0 0 13
+  160 1220 253 1230 385 1237 545 1240 721 1236 904 1224 1080 1200 1121 1190 1165 1180 1210 1170 1255 1160 1299 1150 1340 1140
+ 0 1 1 1 1 1 1 1 1 1 1 1 0
+2 3 0 1 0 0 0 0 20 0.0 0 0 0 0 0 4
+ 1311 1076 1520 1040 1379 1198 1311 1076
+4 1 0 0 0 0 14.0 0.0000 4 0.0 0.0 800 1080 main\001
+# 3
+1 1 0 1 0 7 1 0 -1 0.000 0 0.0000 8440 960 461 -470 8440 960 8901 490
+1 1 0 1 0 7 1 0 -1 0.000 0 0.0000 8440 960 540 -550 8440 960 8980 410
+4 1 0 1 0 0 14.0 0.0000 4 0.0 0.0 8440 1040 3\001
+# 1->3
+3 4 0 1 0 0 0 0 -1 0.0 0 0 0 13
+  2380 720 2448 718 2514 714 2578 708 2639 699 2700 690 2760 680 3668 645 4587 652 5485 690 6326 748 7076 815 7700 880
+ 0 1 1 1 1 1 1 1 1 1 1 1 0
 2 3 0 1 0 0 0 0 20 0.0 0 0 0 0 0 4
5666 4100 5833 4166 5666 4216 5666 4100
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 3933 4066 10 / C, N\001
7708 810 7900 900 7694 950 7708 810
+4 1 0 0 0 0 14.0 0.0000 4 0.0 0.0 5300 560 '\\n' / A, C, N\001
 # 2
-1 1 0 1 0 0 0 0 -1 0.000 0 0.0000 3933 5216 383 383 3933 5216 4316 5599
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 3933 5300 2\001
-# 0 -> 2
+1 1 0 1 0 7 1 0 -1 0.000 0 0.0000 5300 2240 460 -470 5300 2240 5760 1770
+4 1 0 1 0 0 14.0 0.0000 4 0.0 0.0 5300 2320 2\001
+# 1->2
 3 4 0 1 0 0 0 0 -1 0.0 0 0 0 7
-  1700 4333 1947 4433 2230 4547 2533 4668 2841 4791 3141 4909 3416 5016
+  2360 980 2686 1124 3068 1288 3483 1465 3905 1645 4312 1820 4680 1980
  0 1 1 1 1 1 0
 2 3 0 1 0 0 0 0 20 0.0 0 0 0 0 0 4
- 3433 4966 3566 5066 3383 5066 3433 4966
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 2616 4433 'a'..'z' / A, B\001
-# 2 -> 1
+ 4706 1915 4860 2060 4649 2043 4706 1915
+4 1 0 0 0 0 14.0 0.0000 4 0.0 0.0 3480 1040 'a'..'z' / A, B\001
+# 2->3
 3 4 0 1 0 0 0 0 -1 0.0 0 0 0 7
-  4300 5066 4502 4969 4734 4865 4985 4756 5243 4645 5496 4536 5733 4433
+  5740 2060 6026 1948 6352 1817 6703 1675 7061 1530 7413 1389 7740 1260
  0 1 1 1 1 1 0
 2 3 0 1 0 0 0 0 20 0.0 0 0 0 0 0 4
- 5700 4383 5883 4366 5750 4483 5700 4383
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 5100 4500 10 / C, N\001
-# 2 -> 2
+ 7709 1197 7920 1180 7766 1325 7709 1197
+4 1 0 0 0 0 14.0 0.0000 4 0.0 0.0 6960 1260 '\\n' / C, N\001
+# 2->2
 3 4 0 1 0 0 0 0 -1 0.0 0 0 0 13
-  4200 4933 4220 4834 4216 4740 4185 4658 4128 4592 4044 4549 3933 4533 3849 4541 3782 4564 3729 4600 3690 4646 3664 4703 3650 4766
+  4880 2040 4742 1897 4687 1755 4715 1625 4827 1519 5022 1446 5300 1420 5533 1439 5712 1491 5835 1570 5901 1669 5910 1781 5860 1900
  0 1 1 1 1 1 1 1 1 1 1 1 0
 2 3 0 1 0 0 0 0 20 0.0 0 0 0 0 0 4
- 3700 4766 3666 4933 3600 4766 3700 4766
-4 1 0 0 0 0 14.0 0.0000 2 0.0 0.0 3933 4483 'a'..'z' / B\001
+ 5911 1948 5720 2040 5812 1849 5911 1948
+4 1 0 0 0 0 14.0 0.0000 4 0.0 0.0 5300 1300 'a'..'z' / B\001
 # end of FIG file
index bda8f11..aca7bca 100644 (file)
@@ -1521,14 +1521,19 @@ main := ( 'm1' | 'm2' ) $A;
 \verb|expr % action|
 \verbspace
 
-The pending out action operator embeds an action into the pending out
-transitions of a machine. The action is first embedded into the final states of
-the machine and later transferred to any transitions made going out of the
-machine. The transfer can be caused either by a concatenation or kleene star
-operation.  This mechanism allows one to associate an action with the
-termination of a sequence, without being concerned about what particular
-character terminates the sequence.  In the following example, A is executed
-when leaving the alpha machine by the newline character.
+The pending out action operator queues an action for embedding into the
+transitions that leave a machine. The action is first stored in the final
+states of the machine and is later transferred to any transitions that are made
+going out of the machine. The transfer can be caused either by a concatenation
+or kleene star operation. If a final state is still final when compilation is
+complete then the pending out action is also embedded as an EOF action into the
+final state. Therefore, leaving the machine is defined as either leaving on a
+character or as state machine acceptance.
+
+This operator allows one to associate an action with the termination of a
+sequence, without being concerned about what particular character terminates
+the sequence. In the following example, A is executed when leaving the alpha
+machine on the newline character.
 
 % GENERATE: exoutact1
 % OPT: -p
@@ -1578,9 +1583,8 @@ main := word ( ' ' @space word )* '\n' @newline;
 \end{center}
 \graphspace
 
-
-In this final example of the action embedding operators, A is executed upon the
-first character of the alpha machine, B is executed on all transitions of the
+In this final example of the action embedding operators, A is executed upon entering
+the alpha machine, B is executed on all transitions of the
 alpha machine, C is executed when the alpha machine is exited by moving into the
 newline machine and N is executed when the newline machine moves into a final
 state.