mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 15:52:26 +01:00
Author:halw
Date:2008-09-23T14:51:54.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@35 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelLex Class Reference]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|51198de0-9cad-6b47-e351-6e0de86942ce]]
|
||||
==View the [[ref:libraries/lex/reference/index|EiffelLex Class Reference]]==
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[[Property:title|Lex Sample]]
|
||||
[[Property:link_title|EiffelLex Sample]]
|
||||
[[Property:title|EiffelLex Sample]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|79ad35f3-75a9-429c-ad47-f304fec23306]]
|
||||
* [[Eiffel scanner|Eiffel scanner]]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[[Property:title|Lexical analysis: the Lex library]]
|
||||
[[Property:link_title|EiffelLex Tutorial]]
|
||||
[[Property:title|EiffelLex Tutorial]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|9ea43bef-1483-fbf2-4791-2be6a31d394d]]
|
||||
==OVERVIEW==
|
||||
@@ -10,7 +9,7 @@ The process of recognizing the successive tokens of a text is called lexical ana
|
||||
|
||||
Besides recognizing the tokens, it is usually necessary to recognize the deeper syntactic structure of the text. This process is called '''parsing''' or '''syntax analysis''' and is studied in the next chapter.
|
||||
|
||||
Figure 1 shows the inheritance structure of the classes discussed in this chapter. Class [[ref:/libraries/parse/reference/l_interface_chart|L_INTERFACE]] has also been included although we will only study it in the [[Parsing: The Parse Library|next chapter]] ; it belongs to the Parse library, where it takes care of the interface between parsing and lexical analysis.
|
||||
Figure 1 shows the inheritance structure of the classes discussed in this chapter. Class [[ref:/libraries/parse/reference/l_interface_chart|L_INTERFACE]] has also been included although we will only study it in the [[EiffelParse Tutorial]]; it belongs to the Parse library, where it takes care of the interface between parsing and lexical analysis.
|
||||
[[Image:figure1]]
|
||||
Figure 1: Lexical classes
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
[[Property:title|EiffelLex Library]]
|
||||
[[Property:link_title|EiffelLex]]
|
||||
[[Property:title|EiffelLex]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|52e88d58-1a02-d4e2-5503-e405253e7656]]
|
||||
==EiffelLex Library==
|
||||
|
||||
Type: Library <br/>
|
||||
Platform: Any <br/>
|
||||
|
||||
|
||||
See:
|
||||
* [[Lexical analysis: the Lex library|Content]]
|
||||
* [[Lex Sample|Samples]]
|
||||
* [[ref:libraries/lex/reference/index|Reference]]
|
||||
|
||||
|
||||
|
||||
Eiffel classes to facilitate lexical analysis.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelParse Class Reference]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|6b37fcc9-198c-a846-2ff2-32fc30c0d029]]
|
||||
==View the [[ref:libraries/parse/reference/index|EiffelParse Class Reference]]==
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[[Property:title|Parsing: The Parse Library]]
|
||||
[[Property:link_title|EiffelParse Tutorial]]
|
||||
[[Property:title|EiffelParse Tutorial]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|b5861080-e5fd-dbb8-bf89-452915b3483e]]
|
||||
==OVERVIEW==
|
||||
@@ -54,7 +53,7 @@ Parsing is seldom an end in itself; rather, it serves as an intermediate step fo
|
||||
|
||||
Parsing takes care of one of the basic tasks of a document processor: reconstructing the logical organization of a document, which must conform to a certain '''syntax''' (or structure), defined by a '''grammar'''.
|
||||
|
||||
{{note| '''Note''': the more complete name '''syntactic grammar''' avoids any confusion with the ''lexical'' grammars discussed in the [[Lexical analysis: the Lex library|previous chapter]] . By default, "grammar" with no further qualification will always denote a syntactic grammar. A syntactic grammar normally relies on a lexical grammar, which gives the form of the most elementary components - the tokens - appearing in the syntactic structure. }}
|
||||
{{note| '''Note''': the more complete name '''syntactic grammar''' avoids any confusion with the ''lexical'' grammars discussed in the [[EiffelLex Tutorial]]. By default, "grammar" with no further qualification will always denote a syntactic grammar. A syntactic grammar normally relies on a lexical grammar, which gives the form of the most elementary components - the tokens - appearing in the syntactic structure. }}
|
||||
|
||||
Once parsing has reconstructed the structure of a document, the document processor will perform various operations on the basis of that structure. For example a compiler will generate target code corresponding to the original text; a command language interpreter will execute the operations requested in the commands; and a documentation tool such as the short and flat-short commands for Eiffel will produce some information on the parsed document. Such operations are called '''semantic actions'''. One of the principal requirements on a good parsing mechanism is that it should make it easy to graft semantics onto syntax, by adding semantic actions of many possible kinds to the grammar.
|
||||
|
||||
@@ -585,6 +584,8 @@ where ''s'' is a specimen of <eiffel>SUM</eiffel>, is written as
|
||||
|
||||
The commit after the recognition of the keyword "(" is there to use the following piece of higher-level knowledge:
|
||||
<code>No choice production of the grammar that has NESTED
|
||||
|
||||
|
||||
as one of its alternatives has another alternative construct whose
|
||||
specimens could begin with an opening parenthesis "(".</code>
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
[[Property:title|EiffelParse Library]]
|
||||
[[Property:link_title|EiffelParse]]
|
||||
[[Property:title|EiffelParse]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|0984d15a-6ee9-3bd4-71d6-31df2987af3a]]
|
||||
==EiffelParse Library==
|
||||
|
||||
Type: Library <br/>
|
||||
Platform: Any <br/>
|
||||
|
||||
|
||||
See:
|
||||
* [[Parsing: The Parse Library|Content]]
|
||||
* [[Parse Sample|Samples]]
|
||||
* [[ref:libraries/parse/reference/index|Reference]]
|
||||
|
||||
|
||||
|
||||
Eiffel classes for building parsers.
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
[[Property:title|Text processing]]
|
||||
[[Property:weight|-6]]
|
||||
[[Property:uuid|e74b5b47-d87d-2eb0-49ba-981dae52d338]]
|
||||
== Text processing (Lexical analysis and parsing) ==
|
||||
* [[EiffelLex Library|EiffelLex]]
|
||||
** [[Lexical analysis: the Lex library|EiffelLex tutorial]]
|
||||
** EiffelLex class reference
|
||||
** [[Lex Sample|EiffelLex samples]]
|
||||
* [[EiffelParse Library|EiffelParse]]
|
||||
** [[Parsing: The Parse Library|EiffelParse tutorial]]
|
||||
** EiffelParse class reference
|
||||
** [[Parse Sample|EiffelParse samples]]
|
||||
== Text processing (lexical analysis and parsing) solutions==
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user