equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
868 expr->print_assert(fp); |
868 expr->print_assert(fp); |
869 } |
869 } |
870 } |
870 } |
871 |
871 |
872 // Print out the dictionary contents as key-value pairs |
872 // Print out the dictionary contents as key-value pairs |
873 static void dumpekey(const void* key) { fprintf(stdout, "%s", key); } |
873 static void dumpekey(const void* key) { fprintf(stdout, "%s", (char*) key); } |
874 static void dumpexpr(const void* expr) { fflush(stdout); ((Expr*)expr)->print(); } |
874 static void dumpexpr(const void* expr) { fflush(stdout); ((Expr*)expr)->print(); } |
875 |
875 |
876 void ExprDict::dump() { |
876 void ExprDict::dump() { |
877 _expr.print(dumpekey, dumpexpr); |
877 _expr.print(dumpekey, dumpexpr); |
878 } |
878 } |
1018 } |
1018 } |
1019 |
1019 |
1020 } |
1020 } |
1021 |
1021 |
1022 // Print out the dictionary contents as key-value pairs |
1022 // Print out the dictionary contents as key-value pairs |
1023 static void print_key (const void* key) { fprintf(stdout, "%s", key); } |
1023 static void print_key (const void* key) { fprintf(stdout, "%s", (char*) key); } |
1024 static void print_production(const void* production) { fflush(stdout); ((Production*)production)->print(); } |
1024 static void print_production(const void* production) { fflush(stdout); ((Production*)production)->print(); } |
1025 |
1025 |
1026 void ProductionState::print() { |
1026 void ProductionState::print() { |
1027 _production.print(print_key, print_production); |
1027 _production.print(print_key, print_production); |
1028 } |
1028 } |