Download Tetra En.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
TextTransformer 1.7.5 © 2002-10 Dr. Detlef Meyer-Eltz 2 TextTransformer Table of Contents Part I About this help 16 Part II Registration 18 Part III Most essential operation elements 21 Part IV Most essential syntax elements 23 Part V How to begin with a new project? 25 1 Practice................................................................................................................................... 27 Part VI Introduction 30 1 How................................................................................................................................... does the TextTransformer work? 30 2 Analysis................................................................................................................................... 30 3 Synthesis................................................................................................................................... 31 4 Regular................................................................................................................................... expressions 31 5 Syntax................................................................................................................................... tree 32 6 Productions................................................................................................................................... or non-terminal symbols 33 7 Productions................................................................................................................................... as functions 33 8 Four................................................................................................................................... uses of productions 35 9 Looking-ahead................................................................................................................................... 35 10 Inclusions................................................................................................................................... / comments 37 11 Sub-parser................................................................................................................................... 37 12 Family................................................................................................................................... concept 37 13 Tests................................................................................................................................... 38 Part VII Examples 40 1 Exchange................................................................................................................................... of words 41 Execution .........................................................................................................................................................of a project 41 Production......................................................................................................................................................... 43 Analysis step......................................................................................................................................................... by step 44 Using tokens......................................................................................................................................................... 45 2 Conversion................................................................................................................................... of an Atari text 47 Tokens ......................................................................................................................................................... 47 Productions......................................................................................................................................................... 49 Actions ......................................................................................................................................................... 50 Conversion......................................................................................................................................................... into RTF 51 3 Calculator................................................................................................................................... 54 © 2002-10 Dr. Detlef Meyer-Eltz Contents 3 Tokens ......................................................................................................................................................... 54 Production:......................................................................................................................................................... Calculator1 55 Production:......................................................................................................................................................... Expression 56 Productions:......................................................................................................................................................... Term and Factor 57 Production:......................................................................................................................................................... Number 59 Return values......................................................................................................................................................... 59 4 Text................................................................................................................................... statistics 61 Class members......................................................................................................................................................... 61 Token ......................................................................................................................................................... 62 Productions......................................................................................................................................................... 63 5 GrepUrls................................................................................................................................... 64 Productions......................................................................................................................................................... 64 Member variables......................................................................................................................................................... and methods 65 Put together......................................................................................................................................................... 66 Search in .........................................................................................................................................................whole directory 67 6 BinaryCheck................................................................................................................................... 70 Look-ahead......................................................................................................................................................... 70 Use as preprocessor......................................................................................................................................................... 71 7 E-mail................................................................................................................................... address 72 Syntax specification......................................................................................................................................................... 73 Productions......................................................................................................................................................... and token 74 Detecting .........................................................................................................................................................a conflict 75 Solving the......................................................................................................................................................... conflict 76 8 Guard................................................................................................................................... 78 Startrule: .........................................................................................................................................................guard 79 Copying source......................................................................................................................................................... text 79 Tokens ......................................................................................................................................................... 80 Productions:......................................................................................................................................................... block, outer_block 82 Improvement:......................................................................................................................................................... '{' and '}' in strings 83 9 Bill................................................................................................................................... 84 Production......................................................................................................................................................... 84 Tokens