Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Ragel Guide 6.6

Ragel Guide 6.6

Ratings: (0)|Views: 29|Likes:
Published by Señor Smiles
Ragel State Machine Compiler
User Guide

by

Adrian Thurston

License
Ragel version 6.6, Dec 2009 Copyright c 2003-2007 Adrian Thurston This document is part of Ragel, and as such, this document is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ragel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERC
Ragel State Machine Compiler
User Guide

by

Adrian Thurston

License
Ragel version 6.6, Dec 2009 Copyright c 2003-2007 Adrian Thurston This document is part of Ragel, and as such, this document is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ragel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERC

More info:

Published by: Señor Smiles on Jul 18, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/25/2012

pdf

text

original

 
Ragel State Machine Compiler
User Guide
by
Adrian Thurston
 
License
Ragel version 6.6, Dec 2009Copyrightc
2003-2007 Adrian Thurston
This document is part of Ragel, and as such, this document is released under the terms of theGNU General Public License as published by the Free Software Foundation; either version 2 of theLicense, or (at your option) any later version.Ragel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-POSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with Ragel; if not, writeto the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
i
 
Contents
1.1 Abstract. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Motivation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Related Work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.5 Development Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Ragel State Machine Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.1 Naming Ragel Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.2 Machine Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.3 Machine Instantiation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.4 Including Ragel Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.5 Importing Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Lexical Analysis of a Ragel Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3 Basic Machines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4 Operator Precedence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.5 Regular Language Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.5.1 Union. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5.2 Intersection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5.3 Difference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5.4 Strong Difference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5.5 Concatenation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.5.6 Kleene Star. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.5.7 One Or More Repetition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.5.8 Optional. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.5.9 Repetition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.5.10 Negation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.5.11 Character-Level Negation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.6 State Machine Minimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.7 Visualization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1 Embedding Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.1.1 Entering Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.1.2 Finishing Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.1.3 All Transition Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20ii

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->