Get rid of TaggedSymbols, just put tags/symbols inside Section1.Type or similar
authorNick Downing <downing.nick@gmail.com>
Sat, 28 Jul 2018 23:41:30 +0000 (09:41 +1000)
committerNick Downing <downing.nick@gmail.com>
Sat, 28 Jul 2018 23:41:30 +0000 (09:41 +1000)
src/parse-gram.y

index e49cd7c..a7a9f87 100644 (file)
@@ -501,8 +501,6 @@ grammar_declaration:
         symbol_list_free ($3);
       }
  insert_after(2, "</PYACC_Section1Or2_CodeProps>");
- insert_after(2, "</PYACC_Section1Or2_TaggedSymbols>");
- insert_before(2, "<PYACC_Section1Or2_TaggedSymbols>");
  sprintf(gram_piece_temp, "<PYACC_Section1Or2_CodeProps _type=\"%d\">", $1);
  insert_before(0, gram_piece_temp);
     }
@@ -593,8 +591,6 @@ symbol_declaration:
       current_class = unknown_sym;
       current_type = NULL;
  insert_after(2, "</PYACC_Section1Or2_NTerm>");
- insert_after(2, "</PYACC_Section1Or2_TaggedSymbols>");
- insert_before(2, "<PYACC_Section1Or2_TaggedSymbols>");
  insert_before(0, "<PYACC_Section1Or2_NTerm>");
     }
 | "%token" { current_class = token_sym; } symbol_defs.1
@@ -602,8 +598,6 @@ symbol_declaration:
       current_class = unknown_sym;
       current_type = NULL;
  insert_after(2, "</PYACC_Section1Or2_Token>");
- insert_after(2, "</PYACC_Section1Or2_TaggedSymbols>");
- insert_before(2, "<PYACC_Section1Or2_TaggedSymbols>");
  insert_before(0, "<PYACC_Section1Or2_Token>");
     }
 | "%type" TAG symbols.1
@@ -614,8 +608,6 @@ symbol_declaration:
         symbol_type_set (list->content.sym, $2, @2);
       symbol_list_free ($3);
  insert_after(2, "</PYACC_Section1Or2_Type>");
- insert_after(2, "</PYACC_Section1Or2_TaggedSymbols>");
- insert_before(1, "<PYACC_Section1Or2_TaggedSymbols>");
  insert_before(0, "<PYACC_Section1Or2_Type>");
     }
 ;
@@ -633,8 +625,6 @@ precedence_declaration:
       symbol_list_free ($3);
       current_type = NULL;
  insert_after(2, "</PYACC_Section1Or2_Precedence>");
- insert_after(2, "</PYACC_Section1Or2_TaggedSymbols>");
- insert_before(1, "<PYACC_Section1Or2_TaggedSymbols>");
  sprintf(gram_piece_temp, "<PYACC_Section1Or2_Precedence _type=\"%d\">", ($1 & 3) - 1); /* -1 precedence, 0 right, 1 left, 2 nonassoc */
  insert_before(0, gram_piece_temp);
     }