aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dtd_grammar.lemon
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-08-26 10:32:52 +0200
committerAnders Broman <a.broman58@gmail.com>2015-08-27 04:35:23 +0000
commit2e1fa634c60b8a6af19be57c6a334c564692c986 (patch)
treecca48fcdc81befe715f07689b7961526656918c0 /epan/dtd_grammar.lemon
parent0af048b7e40ee92d6702df873cbc515ae2eff9c8 (diff)
Lemon grammar: fix indent (use tabs)
Change-Id: I6fa38d5d85b25ac6c55fcfa67d6c8dba8482cc8c Reviewed-on: https://code.wireshark.org/review/10266 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dtd_grammar.lemon')
-rw-r--r--epan/dtd_grammar.lemon98
1 files changed, 49 insertions, 49 deletions
diff --git a/epan/dtd_grammar.lemon b/epan/dtd_grammar.lemon
index 8f2755072c..9010bf96a0 100644
--- a/epan/dtd_grammar.lemon
+++ b/epan/dtd_grammar.lemon
@@ -38,16 +38,16 @@ static dtd_named_list_t* dtd_named_list_new(gchar* name, GPtrArray* list) {
nl->name = name;
nl->list = list;
-
+
return nl;
}
static GPtrArray* g_ptr_array_join(GPtrArray* a, GPtrArray* b){
-
+
while(b->len > 0) {
g_ptr_array_add(a,g_ptr_array_remove_index_fast(b,0));
}
-
+
g_ptr_array_free(b,TRUE);
return a;
@@ -87,36 +87,36 @@ dtd ::= doctype.
dtd ::= dtd_parts.
doctype ::= TAG_START DOCTYPE_KW NAME(Name) OPEN_BRACKET dtd_parts CLOSE_BRACKET TAG_STOP. {
- dtd_named_list_t* root;
- GPtrArray* root_elems = g_ptr_array_new();
- guint i;
- gchar *name;
+ dtd_named_list_t* root;
+ GPtrArray* root_elems = g_ptr_array_new();
+ guint i;
+ gchar *name;
- if(! bd->proto_name) {
- bd->proto_name = Name->text;
- }
+ if(! bd->proto_name) {
+ bd->proto_name = Name->text;
+ }
- if(bd->proto_root)
- g_free(bd->proto_root);
+ if(bd->proto_root)
+ g_free(bd->proto_root);
bd->proto_root = Name->text;
-
- name = g_ascii_strdown(bd->proto_name, -1);
- g_free(bd->proto_name);
+
+ name = g_ascii_strdown(bd->proto_name, -1);
+ g_free(bd->proto_name);
bd->proto_name = name;
-
- for( i = 0; i< bd->elements->len; i++) {
- dtd_named_list_t* el = (dtd_named_list_t*)g_ptr_array_index(bd->elements,i);
-
- g_ptr_array_add(root_elems,g_strdup(el->name));
- }
-
- root = dtd_named_list_new(g_strdup(Name->text),root_elems);
-
- g_ptr_array_add(bd->elements,root);
-
- g_free(Name->location);
- g_free(Name);
+
+ for( i = 0; i< bd->elements->len; i++) {
+ dtd_named_list_t* el = (dtd_named_list_t*)g_ptr_array_index(bd->elements,i);
+
+ g_ptr_array_add(root_elems,g_strdup(el->name));
+ }
+
+ root = dtd_named_list_new(g_strdup(Name->text),root_elems);
+
+ g_ptr_array_add(bd->elements,root);
+
+ g_free(Name->location);
+ g_free(Name);
}
@@ -127,18 +127,18 @@ dtd_parts ::= attlist(Attlist). { g_ptr_array_add(bd->attributes,Attlist); }
%type attlist { dtd_named_list_t* }
attlist(A) ::= TAG_START ATTLIST_KW NAME(B) attrib_list(TheList) TAG_STOP. {
- A = dtd_named_list_new(g_ascii_strdown(B->text, -1),TheList);
- g_free(B->text);
- g_free(B->location);
- g_free(B);
+ A = dtd_named_list_new(g_ascii_strdown(B->text, -1),TheList);
+ g_free(B->text);
+ g_free(B->location);
+ g_free(B);
}
%type element { dtd_named_list_t* }
element(A) ::= TAG_START ELEMENT_KW NAME(B) sub_elements(C) TAG_STOP. {
- A = dtd_named_list_new(g_ascii_strdown(B->text, -1),C);
- g_free(B->text);
- g_free(B->location);
- g_free(B);
+ A = dtd_named_list_new(g_ascii_strdown(B->text, -1),C);
+ g_free(B->text);
+ g_free(B->location);
+ g_free(B);
}
%type attrib_list { GPtrArray* }
@@ -148,9 +148,9 @@ attrib_list(A) ::= attrib(B). { A = g_ptr_array_new(); g_ptr_array_add(A,B); }
%type attrib { gchar* }
attrib(A) ::= NAME(B) att_type att_default. {
A = g_ascii_strdown(B->text, -1);
- g_free(B->text);
- g_free(B->location);
- g_free(B);
+ g_free(B->text);
+ g_free(B->location);
+ g_free(B);
}
att_type ::= ATT_TYPE.
@@ -188,35 +188,35 @@ element_list(A) ::= element_list(B) COMMA element_child(C). { g_ptr_array_add(B,
element_list(A) ::= element_list(B) PIPE element_child(C). { g_ptr_array_add(B,C); A = B; }
element_list(A) ::= element_child(B). { A = g_ptr_array_new(); g_ptr_array_add(A,B); }
element_list(A) ::= sub_elements(B). { A = B; }
-element_list(A) ::= element_list(B) COMMA sub_elements(C). { A = g_ptr_array_join(B,C); }
-element_list(A) ::= element_list(B) PIPE sub_elements(C). { A = g_ptr_array_join(B,C); }
+element_list(A) ::= element_list(B) COMMA sub_elements(C). { A = g_ptr_array_join(B,C); }
+element_list(A) ::= element_list(B) PIPE sub_elements(C). { A = g_ptr_array_join(B,C); }
%type element_child { gchar* }
element_child(A) ::= NAME(B). {
A = g_ascii_strdown(B->text, -1);
g_free(B->text);
- g_free(B->location);
- g_free(B);
+ g_free(B->location);
+ g_free(B);
}
element_child(A) ::= NAME(B) STAR. {
A = g_ascii_strdown(B->text, -1);
g_free(B->text);
- g_free(B->location);
- g_free(B);
+ g_free(B->location);
+ g_free(B);
}
element_child(A) ::= NAME(B) QUESTION. {
A = g_ascii_strdown(B->text, -1);
g_free(B->text);
- g_free(B->location);
- g_free(B);
+ g_free(B->location);
+ g_free(B);
}
element_child(A) ::= NAME(B) PLUS. {
A = g_ascii_strdown(B->text, -1);
g_free(B->text);
- g_free(B->location);
- g_free(B);
+ g_free(B->location);
+ g_free(B);
}