summaryrefslogtreecommitdiff
path: root/doc/2_03_def.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/2_03_def.adoc')
-rw-r--r--doc/2_03_def.adoc22
1 files changed, 1 insertions, 21 deletions
diff --git a/doc/2_03_def.adoc b/doc/2_03_def.adoc
index bd3b87aa..0ef66ae8 100644
--- a/doc/2_03_def.adoc
+++ b/doc/2_03_def.adoc
@@ -8,27 +8,7 @@ Again one example is much more clearer.
[source,chapel]
.assign.lm
----
-lex start
- token id / ('a' .. 'z' | 'A' .. 'Z' ) + /
- token value / ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )+ /
- literal `= `;
- ignore / [ \t\n] /
-end
-
-def assignment
- [ id `= value `;]
-
-
-def assignment_list
- [assignment assignment_list]
-| [assignment]
-| []
-
-parse Simple: assignment_list[ stdin ]
-
-for I:assignment in Simple {
- print( I.id, "->", I.value, "\n" )
-}
+include::code/assign.lm[]
----
After the compilation we can pipe some input to it's stdin.