Skip to content

Commit

Permalink
ncd: rename NCDValue{Generator,Parser} to NCDVal{Generator,Parser}
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrop7 committed Oct 5, 2012
1 parent 41ccb66 commit bb9ca1f
Show file tree
Hide file tree
Showing 27 changed files with 79 additions and 79 deletions.
4 changes: 2 additions & 2 deletions blog_channels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ BTap 4
lwip 4
NCDConfigTokenizer 4
NCDConfigParser 4
NCDValueParser 4
NCDValParser 4
nsskey 4
addr 4
PasswordListener 4
Expand All @@ -99,7 +99,7 @@ PeerChat 4
BArpProbe 4
NCDModuleIndex 4
NCDModuleProcess 4
NCDValueGenerator 4
NCDValGenerator 4
ncd_from_string 4
ncd_to_string 4
ncd_value 4
Expand Down
6 changes: 3 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ if (BUILD_NCD)
target_link_libraries(ncd_tokenizer_test ncdtokenizer)

add_executable(ncd_parser_test ncd_parser_test.c)
target_link_libraries(ncd_parser_test ncdconfigparser ncdvaluegenerator ncdsugar)
target_link_libraries(ncd_parser_test ncdconfigparser ncdvalgenerator ncdsugar)

add_executable(ncd_value_parser_test ncd_value_parser_test.c)
target_link_libraries(ncd_value_parser_test ncdvalueparser ncdvaluegenerator)
target_link_libraries(ncd_value_parser_test ncdvalparser ncdvalgenerator)

add_executable(ncdinterfacemonitor_test ncdinterfacemonitor_test.c)
target_link_libraries(ncdinterfacemonitor_test ncdinterfacemonitor)
Expand All @@ -42,7 +42,7 @@ if (BUILD_NCD)
target_link_libraries(ncdval_test ncdval)

add_executable(ncdvalcons_test ncdvalcons_test.c)
target_link_libraries(ncdvalcons_test ncdvalcons ncdvaluegenerator)
target_link_libraries(ncdvalcons_test ncdvalcons ncdvalgenerator)
endif ()

if (BUILDING_UDEVMONITOR)
Expand Down
2 changes: 1 addition & 1 deletion examples/ncd_parser_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <misc/expstring.h>
#include <base/BLog.h>
#include <ncd/NCDConfigParser.h>
#include <ncd/NCDValueGenerator.h>
#include <ncd/NCDValGenerator.h>
#include <ncd/NCDSugar.h>

static int generate_val (NCDValue *value, ExpString *out_str)
Expand Down
4 changes: 2 additions & 2 deletions examples/ncd_value_parser_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

#include <misc/debug.h>
#include <base/BLog.h>
#include <ncd/NCDValueParser.h>
#include <ncd/NCDValueGenerator.h>
#include <ncd/NCDValParser.h>
#include <ncd/NCDValGenerator.h>

int main (int argc, char *argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ncdvalcons_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include <misc/debug.h>
#include <ncd/NCDValCons.h>
#include <ncd/NCDValueGenerator.h>
#include <ncd/NCDValGenerator.h>

static NCDValMem mem;
static NCDValCons cons;
Expand Down
2 changes: 1 addition & 1 deletion generate_files
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ do_flex predicate/BPredicate.l BPredicate
do_bison predicate/BPredicate.y BPredicate
"${PHP_CMD[@]}" blog_generator/blog.php --input-file blog_channels.txt --output-dir "${OUT_DIR}"
do_lemon ncd/NCDConfigParser_parse.y
do_lemon ncd/NCDValueParser_parse.y
do_lemon ncd/NCDValParser_parse.y
60 changes: 30 additions & 30 deletions generated/NCDValueParser_parse.c → generated/NCDValParser_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,16 @@ static void yy_destructor(
case 6: /* BRACKET_CLOSE */
case 7: /* STRING */
{
#line 37 "NCDValueParser_parse.y"
#line 37 "NCDValParser_parse.y"
free_token((yypminor->yy0));
#line 377 "NCDValueParser_parse.c"
#line 377 "NCDValParser_parse.c"
}
break;
case 9: /* list_contents */
{
#line 47 "NCDValueParser_parse.y"
#line 47 "NCDValParser_parse.y"
(void)parser_out;
#line 384 "NCDValueParser_parse.c"
#line 384 "NCDValParser_parse.c"
}
break;
default: break; /* If no destructor action specified: do nothing */
Expand Down Expand Up @@ -553,12 +553,12 @@ static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
/* Here code is inserted which will execute if the parser
** stack every overflows */
#line 58 "NCDValueParser_parse.y"
#line 58 "NCDValParser_parse.y"

if (yypMinor) {
free_token(yypMinor->yy0);
}
#line 562 "NCDValueParser_parse.c"
#line 562 "NCDValParser_parse.c"
ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

Expand Down Expand Up @@ -682,7 +682,7 @@ static void yy_reduce(
** break;
*/
case 0: /* input ::= value */
#line 64 "NCDValueParser_parse.y"
#line 64 "NCDValParser_parse.y"
{
if (!yymsp[0].minor.yy1.have) {
goto failZ0;
Expand All @@ -701,10 +701,10 @@ static void yy_reduce(

failZ0:;
}
#line 705 "NCDValueParser_parse.c"
#line 705 "NCDValParser_parse.c"
break;
case 1: /* list_contents ::= value */
#line 83 "NCDValueParser_parse.y"
#line 83 "NCDValParser_parse.y"
{
if (!yymsp[0].minor.yy1.have) {
goto failL0;
Expand All @@ -724,10 +724,10 @@ failZ0:;
yygotominor.yy1.have = 0;
doneL:;
}
#line 728 "NCDValueParser_parse.c"
#line 728 "NCDValParser_parse.c"
break;
case 2: /* list_contents ::= value COMMA list_contents */
#line 103 "NCDValueParser_parse.y"
#line 103 "NCDValParser_parse.y"
{
if (!yymsp[-2].minor.yy1.have || !yymsp[0].minor.yy1.have) {
goto failM0;
Expand All @@ -747,29 +747,29 @@ doneL:;
doneM:;
yy_destructor(yypParser,1,&yymsp[-1].minor);
}
#line 751 "NCDValueParser_parse.c"
#line 751 "NCDValParser_parse.c"
break;
case 3: /* list ::= CURLY_OPEN CURLY_CLOSE */
#line 122 "NCDValueParser_parse.y"
#line 122 "NCDValParser_parse.y"
{
NCDValCons_NewList(&parser_out->cons, &yygotominor.yy1.v);
yygotominor.yy1.have = 1;
yy_destructor(yypParser,2,&yymsp[-1].minor);
yy_destructor(yypParser,3,&yymsp[0].minor);
}
#line 761 "NCDValueParser_parse.c"
#line 761 "NCDValParser_parse.c"
break;
case 4: /* list ::= CURLY_OPEN list_contents CURLY_CLOSE */
#line 127 "NCDValueParser_parse.y"
#line 127 "NCDValParser_parse.y"
{
yygotominor.yy1 = yymsp[-1].minor.yy1;
yy_destructor(yypParser,2,&yymsp[-2].minor);
yy_destructor(yypParser,3,&yymsp[0].minor);
}
#line 770 "NCDValueParser_parse.c"
#line 770 "NCDValParser_parse.c"
break;
case 5: /* map_contents ::= value COLON value */
#line 131 "NCDValueParser_parse.y"
#line 131 "NCDValParser_parse.y"
{
if (!yymsp[-2].minor.yy1.have || !yymsp[0].minor.yy1.have) {
goto failS0;
Expand All @@ -790,10 +790,10 @@ doneM:;
doneS:;
yy_destructor(yypParser,4,&yymsp[-1].minor);
}
#line 794 "NCDValueParser_parse.c"
#line 794 "NCDValParser_parse.c"
break;
case 6: /* map_contents ::= value COLON value COMMA map_contents */
#line 151 "NCDValueParser_parse.y"
#line 151 "NCDValParser_parse.y"
{
if (!yymsp[-4].minor.yy1.have || !yymsp[-2].minor.yy1.have || !yymsp[0].minor.yy1.have) {
goto failT0;
Expand All @@ -814,29 +814,29 @@ doneT:;
yy_destructor(yypParser,4,&yymsp[-3].minor);
yy_destructor(yypParser,1,&yymsp[-1].minor);
}
#line 818 "NCDValueParser_parse.c"
#line 818 "NCDValParser_parse.c"
break;
case 7: /* map ::= BRACKET_OPEN BRACKET_CLOSE */
#line 170 "NCDValueParser_parse.y"
#line 170 "NCDValParser_parse.y"
{
NCDValCons_NewMap(&parser_out->cons, &yygotominor.yy1.v);
yygotominor.yy1.have = 1;
yy_destructor(yypParser,5,&yymsp[-1].minor);
yy_destructor(yypParser,6,&yymsp[0].minor);
}
#line 828 "NCDValueParser_parse.c"
#line 828 "NCDValParser_parse.c"
break;
case 8: /* map ::= BRACKET_OPEN map_contents BRACKET_CLOSE */
#line 175 "NCDValueParser_parse.y"
#line 175 "NCDValParser_parse.y"
{
yygotominor.yy1 = yymsp[-1].minor.yy1;
yy_destructor(yypParser,5,&yymsp[-2].minor);
yy_destructor(yypParser,6,&yymsp[0].minor);
}
#line 837 "NCDValueParser_parse.c"
#line 837 "NCDValParser_parse.c"
break;
case 9: /* value ::= STRING */
#line 179 "NCDValueParser_parse.y"
#line 179 "NCDValParser_parse.y"
{
ASSERT(yymsp[0].minor.yy0.str)

Expand All @@ -853,15 +853,15 @@ doneT:;
doneU:;
free_token(yymsp[0].minor.yy0);
}
#line 857 "NCDValueParser_parse.c"
#line 857 "NCDValParser_parse.c"
break;
case 10: /* value ::= list */
case 11: /* value ::= map */ yytestcase(yyruleno==11);
#line 196 "NCDValueParser_parse.y"
#line 196 "NCDValParser_parse.y"
{
yygotominor.yy1 = yymsp[0].minor.yy1;
}
#line 865 "NCDValueParser_parse.c"
#line 865 "NCDValParser_parse.c"
break;
default:
break;
Expand Down Expand Up @@ -923,10 +923,10 @@ static void yy_syntax_error(
){
ParseARG_FETCH;
#define TOKEN (yyminor.yy0)
#line 53 "NCDValueParser_parse.y"
#line 53 "NCDValParser_parse.y"

parser_out->error_flags |= ERROR_FLAG_SYNTAX;
#line 930 "NCDValueParser_parse.c"
#line 930 "NCDValParser_parse.c"
ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_NCDValueGenerator
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_NCDValGenerator
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef BLOG_CURRENT_CHANNEL
#undef BLOG_CURRENT_CHANNEL
#endif
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_NCDValueParser
#define BLOG_CURRENT_CHANNEL BLOG_CHANNEL_NCDValParser
4 changes: 2 additions & 2 deletions generated/blog_channels_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#define BLOG_CHANNEL_lwip 81
#define BLOG_CHANNEL_NCDConfigTokenizer 82
#define BLOG_CHANNEL_NCDConfigParser 83
#define BLOG_CHANNEL_NCDValueParser 84
#define BLOG_CHANNEL_NCDValParser 84
#define BLOG_CHANNEL_nsskey 85
#define BLOG_CHANNEL_addr 86
#define BLOG_CHANNEL_PasswordListener 87
Expand All @@ -99,7 +99,7 @@
#define BLOG_CHANNEL_BArpProbe 98
#define BLOG_CHANNEL_NCDModuleIndex 99
#define BLOG_CHANNEL_NCDModuleProcess 100
#define BLOG_CHANNEL_NCDValueGenerator 101
#define BLOG_CHANNEL_NCDValGenerator 101
#define BLOG_CHANNEL_ncd_from_string 102
#define BLOG_CHANNEL_ncd_to_string 103
#define BLOG_CHANNEL_ncd_value 104
Expand Down
4 changes: 2 additions & 2 deletions generated/blog_channels_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
{"lwip", 4},
{"NCDConfigTokenizer", 4},
{"NCDConfigParser", 4},
{"NCDValueParser", 4},
{"NCDValParser", 4},
{"nsskey", 4},
{"addr", 4},
{"PasswordListener", 4},
Expand All @@ -99,7 +99,7 @@
{"BArpProbe", 4},
{"NCDModuleIndex", 4},
{"NCDModuleProcess", 4},
{"NCDValueGenerator", 4},
{"NCDValGenerator", 4},
{"ncd_from_string", 4},
{"ncd_to_string", 4},
{"ncd_value", 4},
Expand Down
2 changes: 1 addition & 1 deletion ncd-request/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add_executable(badvpn-ncd-request
ncd-request.c
)
target_link_libraries(badvpn-ncd-request ncdrequest ncdvaluegenerator ncdvalueparser)
target_link_libraries(badvpn-ncd-request ncdrequest ncdvalgenerator ncdvalparser)

install(
TARGETS badvpn-ncd-request
Expand Down
4 changes: 2 additions & 2 deletions ncd-request/ncd-request.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#include <system/BNetwork.h>
#include <system/BReactor.h>
#include <system/BAddr.h>
#include <ncd/NCDValueParser.h>
#include <ncd/NCDValueGenerator.h>
#include <ncd/NCDValParser.h>
#include <ncd/NCDValGenerator.h>
#include <ncd/NCDRequestClient.h>

#include <generated/blog_channel_ncd_request.h>
Expand Down
18 changes: 9 additions & 9 deletions ncd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ add_library(ncdval
)
target_link_libraries(ncdval base)

add_library(ncdvaluegenerator
NCDValueGenerator.c
add_library(ncdvalgenerator
NCDValGenerator.c
)
target_link_libraries(ncdvaluegenerator base ncdval)
target_link_libraries(ncdvalgenerator base ncdval)

add_library(ncdvalueparser
NCDValueParser.c
add_library(ncdvalparser
NCDValParser.c
)
target_link_libraries(ncdvalueparser base ncdval ncdtokenizer ncdvalcons)
target_link_libraries(ncdvalparser base ncdval ncdtokenizer ncdvalcons)

add_library(ncdast
NCDAst.c
Expand All @@ -58,7 +58,7 @@ target_link_libraries(ncdsugar ncdast)
add_library(ncdrequest
NCDRequestClient.c
)
target_link_libraries(ncdrequest base system ncdvaluegenerator ncdvalueparser)
target_link_libraries(ncdrequest base system ncdvalgenerator ncdvalparser)

add_library(ncdinterfacemonitor
NCDInterfaceMonitor.c
Expand Down Expand Up @@ -150,8 +150,8 @@ add_executable(badvpn-ncd
${NCD_ADDITIONAL_SOURCES}
)
target_link_libraries(badvpn-ncd
system flow flowextra dhcpclient arpprobe ncdval ncdvaluegenerator
ncdvalueparser ncdconfigparser ncdsugar udevmonitor ncdinterfacemonitor ncdrequest
system flow flowextra dhcpclient arpprobe ncdval ncdvalgenerator
ncdvalparser ncdconfigparser ncdsugar udevmonitor ncdinterfacemonitor ncdrequest
badvpn_random
)

Expand Down
4 changes: 2 additions & 2 deletions ncd/NCDRequestClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#include <flow/PacketProtoDecoder.h>
#include <flow/PacketStreamSender.h>
#include <flow/PacketPassFifoQueue.h>
#include <ncd/NCDValueGenerator.h>
#include <ncd/NCDValueParser.h>
#include <ncd/NCDValGenerator.h>
#include <ncd/NCDValParser.h>

struct NCDRequestClient_req;

Expand Down
Loading

0 comments on commit bb9ca1f

Please sign in to comment.