~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/w32api/w32api_function_definition_scanner.l

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%{
 
2
/*
 
3
   +----------------------------------------------------------------------+
 
4
   | PHP version 4.0                                                      |
 
5
   +----------------------------------------------------------------------+
 
6
   | Copyright (c) 1997-2001 The PHP Group                                |
 
7
   +----------------------------------------------------------------------+
 
8
   | This source file is subject to version 3.0 of the PHP license,       |
 
9
   | that is bundled with this package in the file LICENSE, and is        |
 
10
   | available through the world-wide-web at the following url:           |
 
11
   | http://www.php.net/license/3_0.txt.                                  |
 
12
   | If you did not receive a copy of the PHP license and are unable to   |
 
13
   | obtain it through the world-wide-web, please send a note to          |
 
14
   | license@php.net so we can mail you a copy immediately.               |
 
15
   +----------------------------------------------------------------------+
 
16
   | Authors: James Moore <jmoore@php.net>                                |
 
17
   +----------------------------------------------------------------------+
 
18
 */
 
19
 
 
20
/* $Id: w32api_function_definition_scanner.l,v 1.3 2003/06/10 20:03:40 imajes Exp $ */
 
21
 
 
22
 
 
23
#include <stdio.h>
 
24
#include <stdlib.h>
 
25
#define  WIN32_LEAN_AND_MEAN
 
26
#include <windows.h>
 
27
#include <string.h>
 
28
 
 
29
#include "php.h"
 
30
#include "php_ini.h"
 
31
#include "ext/standard/info.h"
 
32
#include "ext/standard/php_string.h"
 
33
#include "php_w32api.h"
 
34
#include "w32api_function_definition_parser.h"
 
35
 
 
36
#ifdef YYSTYPE
 
37
#undef YYSTYPE
 
38
#endif
 
39
 
 
40
#define YYSTYPE w32api_parser_function_definition_union 
 
41
 
 
42
#define YY_DECL int w32api_function_definition_lex(w32api_parser_function_definition_union *funcdef_lval)
 
43
 
 
44
 
 
45
%}
 
46
 
 
47
ID [A-Za-z][A-Za-z0-9_]*
 
48
FILENAME {ID}\.{ID}
 
49
 
 
50
%option noyywrap
 
51
 
 
52
%%
 
53
 
 
54
"from"      {return tFROM;}
 
55
"alias"         {return tALIAS;}
 
56
"&"         {return tBYREF;}
 
57
{FILENAME}  {funcdef_lval->s = estrdup(yytext); return tFILENAME;}
 
58
{ID}        {funcdef_lval->s = estrdup(yytext); return tIDENTIFIER;}
 
59
[ \r\t\n]   /* Ignore Whitespace */
 
60
.           {return *yytext;}
 
61
 
 
62
%%
 
63