4
* BlueZ - Bluetooth protocol stack for Linux
6
* Copyright (C) 2002-2008 Marcel Holtmann <marcel@holtmann.org>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
/* Nasty workaround, but flex defines isatty() twice */
34
#include <sys/socket.h>
36
#include <bluetooth/bluetooth.h>
37
#include <bluetooth/rfcomm.h>
47
#define YY_DECL int yylex(void)
49
int yyerror(char *str);
58
keyword [A-Za-z0-9\_\-]+
62
bdaddr [A-Za-z0-9]{2}:[A-Za-z0-9]{2}:[A-Za-z0-9]{2}:[A-Za-z0-9]{2}:[A-Za-z0-9]{2}:[A-Za-z0-9]{2}
67
/* Skip spaces and tabs */
77
yylval.number = atoi(yytext);
82
yylval.string = yytext;
87
bdaddr_t *ba = malloc(sizeof(bdaddr_t));
94
int keyword = rfcomm_find_keyword(rfcomm_keyword, yytext);
98
if (strncmp(yytext, "rfcomm", 6) == 0) {
99
yylval.number = atoi(yytext + 6);
103
yylval.string = yytext;