~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/parsetools/doc/src/leex.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
&lt;Regexp> : &lt;Erlang code>.</code>
282
282
 
283
283
    <p>The &lt;Regexp> must occur at the start of a line and not
284
 
      include any blanks; use <c>\\t</c> and <c>\\s</c> to include TAB
 
284
      include any blanks; use <c>\t</c> and <c>\s</c> to include TAB
285
285
      and SPACE characters in the regular expression. If &lt;Regexp>
286
286
      matches then the corresponding &lt;Erlang code> is evaluated to
287
287
      generate a token. With the Erlang code the following predefined
344
344
{D}+ :
345
345
  {token,{integer,TokenLine,list_to_integer(TokenChars)}}.
346
346
 
347
 
{D}+\\.{D}+((E|e)(\\+|\\-)?{D}+)? :
 
347
{D}+\.{D}+((E|e)(\+|\-)?{D}+)? :
348
348
  {token,{float,TokenLine,list_to_float(TokenChars)}}.</code>
349
349
 
350
350
    <p>The Erlang code in the "Erlang code." section is written into
367
367
      <tag><c>c</c></tag>
368
368
      <item><p>Matches the non-metacharacter c.</p>
369
369
      </item>
370
 
      <tag><c>\\c</c></tag>
 
370
      <tag><c>\c</c></tag>
371
371
      <item><p>Matches the escape sequence or literal character c.</p>
372
372
      </item>
373
373
      <tag><c>.</c></tag>
410
410
    <p>The escape sequences allowed are the same as for Erlang strings:</p>
411
411
 
412
412
    <taglist>
413
 
      <tag><c>\\b</c></tag>
 
413
      <tag><c>\b</c></tag>
414
414
      <item><p>Backspace.</p></item>
415
 
      <tag><c>\\f</c></tag>
 
415
      <tag><c>\f</c></tag>
416
416
      <item><p>Form feed.</p></item>
417
 
      <tag><c>\\n</c></tag>
 
417
      <tag><c>\n</c></tag>
418
418
      <item><p>Newline (line feed).</p></item>
419
 
      <tag><c>\\r</c></tag>
 
419
      <tag><c>\r</c></tag>
420
420
      <item><p>Carriage return.</p></item>
421
 
      <tag><c>\\t</c></tag>
 
421
      <tag><c>\t</c></tag>
422
422
      <item><p>Tab.</p></item>
423
 
      <tag><c>\\e</c></tag>
 
423
      <tag><c>\e</c></tag>
424
424
      <item><p>Escape.</p></item>
425
 
      <tag><c>\\v</c></tag>
 
425
      <tag><c>\v</c></tag>
426
426
      <item><p>Vertical tab.</p></item>
427
 
      <tag><c>\\s</c></tag>
 
427
      <tag><c>\s</c></tag>
428
428
      <item><p>Space.</p></item>
429
 
      <tag><c>\\d</c></tag>
 
429
      <tag><c>\d</c></tag>
430
430
      <item><p>Delete.</p></item>
431
 
      <tag><c>\\ddd</c></tag>
 
431
      <tag><c>\ddd</c></tag>
432
432
      <item><p>The octal value <c>ddd</c>.</p></item>
433
 
      <tag><c>\\xhh</c></tag>
 
433
      <tag><c>\xhh</c></tag>
434
434
      <item><p>The hexadecimal value <c>hh</c>.</p></item>
435
 
      <tag><c>\\x{h...}</c></tag>
 
435
      <tag><c>\x{h...}</c></tag>
436
436
      <item><p>The hexadecimal value <c>h...</c>.</p></item>
437
 
      <tag><c>\\c</c></tag>
438
 
      <item><p>Any other character literally, for example <c>\\\\</c> for
439
 
        backslash, <c>\\"</c> for <c>"</c>.</p>
 
437
      <tag><c>\c</c></tag>
 
438
      <item><p>Any other character literally, for example <c>\\</c> for
 
439
        backslash, <c>\"</c> for <c>"</c>.</p>
440
440
      </item>
441
441
    </taglist>
442
442
 
446
446
 
447
447
Variables [A-Z_][0-9a-zA-Z_]*
448
448
 
449
 
Floats (\\+|-)?[0-9]+\\.[0-9]+((E|e)(\\+|-)?[0-9]+)?</code>
 
449
Floats (\+|-)?[0-9]+\.[0-9]+((E|e)(\+|-)?[0-9]+)?</code>
450
450
 
451
451
    <note><p>Anchoring a regular expression with <c>^</c> and <c>$</c>
452
452
      is not implemented in the current version of Leex and just