annotate extensions/test_app/ta_conf.l @ 1214:c2fbaf2985f4

New options to test_app extension to generate long Diameter messages
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 18 Jun 2013 16:27:45 +0800
parents 1af09cc156d6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 /*********************************************************************************************************
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 * Software License Agreement (BSD License) *
740
4a9f08d6b6ba Updated my mail address
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 662
diff changeset
3 * Author: Sebastien Decugis <sdecugis@freediameter.net> *
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4 * *
1127
1af09cc156d6 Updated copyright information
Sebastien Decugis <sdecugis@freediameter.net>
parents: 974
diff changeset
5 * Copyright (c) 2013, WIDE Project and NICT *
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6 * All rights reserved. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8 * Redistribution and use of this software in source and binary forms, with or without modification, are *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 * permitted provided that the following conditions are met: *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 * * Redistributions of source code must retain the above *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 * copyright notice, this list of conditions and the *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 * following disclaimer. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15 * * Redistributions in binary form must reproduce the above *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
16 * copyright notice, this list of conditions and the *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
17 * following disclaimer in the documentation and/or other *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
18 * materials provided with the distribution. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
20 * * Neither the name of the WIDE Project or NICT nor the *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
21 * names of its contributors may be used to endorse or *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
22 * promote products derived from this software without *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
23 * specific prior written permission of WIDE Project and *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
24 * NICT. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
25 * *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 *********************************************************************************************************/
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
36 /* Lex extension's configuration parser.
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
37 *
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
38 * The configuration file contains a default priority, and a list of peers with optional overwite priority.
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
39 * -- see the app_test.conf.sample file for more detail.
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
40 */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
41
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
42 %{
120
d7acdc46134d Renamed several extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 93
diff changeset
43 #include "test_app.h"
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
44 /* Include yacc tokens definitions */
120
d7acdc46134d Renamed several extensions
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 93
diff changeset
45 #include "ta_conf.tab.h"
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
46
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
47 /* Update the column information */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
48 #define YY_USER_ACTION { \
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
49 yylloc->first_column = yylloc->last_column + 1; \
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
50 yylloc->last_column = yylloc->first_column + yyleng - 1; \
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
51 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
52
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
53 /* Avoid warning with newer flex */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
54 #define YY_NO_INPUT
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
55
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
56 %}
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
58 %option bison-bridge bison-locations
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59 %option noyywrap
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
60 %option nounput
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
61
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
62 %%
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
64 /* Update the line count */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 \n {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
66 yylloc->first_line++;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 yylloc->last_line++;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68 yylloc->last_column=0;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
69 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
70
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71 /* Eat all spaces but not new lines */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
72 ([[:space:]]{-}[\n])+ ;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 /* Eat all comments */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74 #.*$ ;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
76 /* Recognize any integer */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
77 [-]?[[:digit:]]+ {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
78 /* Convert this to an integer value */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
79 int ret=0;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
80 ret = sscanf(yytext, "%i", &yylval->integer);
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
81 if (ret != 1) {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
82 /* No matching: an error occurred */
974
2091bf698fb1 Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR
Thomas Klausner <tk@giga.or.at>
parents: 740
diff changeset
83 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno));
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
84 return LEX_ERROR; /* trig an error in yacc parser */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
85 /* Maybe we could REJECT instead of failing here? */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
86 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
87 return INTEGER;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
88 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
89
128
0b58b533d4f6 Allow souple configuration
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 127
diff changeset
90 /* Recognize quoted strings -- we do not support escaped \" in the string currently. */
0b58b533d4f6 Allow souple configuration
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 127
diff changeset
91 \"[^\"]+\" {
0b58b533d4f6 Allow souple configuration
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 127
diff changeset
92 /* Match a quoted string. Let's be very permissive. */
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
93 yylval->string = strdup(yytext+1);
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
94 if (!yylval->string) {
974
2091bf698fb1 Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR
Thomas Klausner <tk@giga.or.at>
parents: 740
diff changeset
95 fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
96 TRACE_DEBUG(INFO, "strdup failed");
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
97 return LEX_ERROR; /* trig an error in yacc parser */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
98 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
99 yylval->string[strlen(yytext) - 2] = '\0';
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
100 return QSTRING;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
101 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
102
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
103 /* Recognize the tokens */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
104 (?i:"vendor-id") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
105 return VENDOR_ID;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
106 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
107
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
108 (?i:"appli-id") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
109 return APPLI_ID;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
110 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
111
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
112 (?i:"cmd-id") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
113 return CMD_ID;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
114 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
115
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
116 (?i:"avp-id") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
117 return AVP_ID;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
118 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
119
1214
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
120 (?i:"long-avp-id") {
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
121 return LONG_AVP_ID;
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
122 }
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
123
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
124 (?i:"long-avp-len") {
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
125 return LONG_AVP_LEN;
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
126 }
c2fbaf2985f4 New options to test_app extension to generate long Diameter messages
Sebastien Decugis <sdecugis@freediameter.net>
parents: 1127
diff changeset
127
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
128 (?i:"mode") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
129 return MODE;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
130 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
131
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
132 (?i:"server") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
133 yylval->integer = MODE_SERV;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
134 return INTEGER;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
135 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
136
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
137 (?i:"client") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
138 yylval->integer = MODE_CLI;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
139 return INTEGER;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
140 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
141
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
142 (?i:"both") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
143 yylval->integer = MODE_SERV | MODE_CLI;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
144 return INTEGER;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
145 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
146
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
147 (?i:"dest-realm") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
148 return DEST_REALM;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
149 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
150
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
151 (?i:"dest-host") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
152 return DEST_HOST;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
153 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
154
127
8ee43cf85a5f Added User-Name AVP in test_app extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 120
diff changeset
155 (?i:"user-name") {
8ee43cf85a5f Added User-Name AVP in test_app extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 120
diff changeset
156 return USER_NAME;
8ee43cf85a5f Added User-Name AVP in test_app extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 120
diff changeset
157 }
8ee43cf85a5f Added User-Name AVP in test_app extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 120
diff changeset
158
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
159 (?i:"Signal") {
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
160 return SIGNAL;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
161 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
162
572
b1b56d4682d0 Added benchmark mode in test_app
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 128
diff changeset
163 (?i:"Benchmark") {
b1b56d4682d0 Added benchmark mode in test_app
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 128
diff changeset
164 return BENCH;
b1b56d4682d0 Added benchmark mode in test_app
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 128
diff changeset
165 }
b1b56d4682d0 Added benchmark mode in test_app
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 128
diff changeset
166
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
167
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
168 /* Valid single characters for yyparse */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
169 [=;] { return yytext[0]; }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
170
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
171 /* Unrecognized sequence, if it did not match any previous pattern */
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
172 [^[:space:]"*=>;\n]+ {
974
2091bf698fb1 Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR
Thomas Klausner <tk@giga.or.at>
parents: 740
diff changeset
173 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
93
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
174 return LEX_ERROR;
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
175 }
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
176
3910804c84db Ported the app_test application
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
177 %%
"Welcome to our mercurial repository"