diff options
Diffstat (limited to 'tikzit/src/common/tikzparser.ym')
-rw-r--r-- | tikzit/src/common/tikzparser.ym | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/tikzit/src/common/tikzparser.ym b/tikzit/src/common/tikzparser.ym index bf33aa9..a6dc1ee 100644 --- a/tikzit/src/common/tikzparser.ym +++ b/tikzit/src/common/tikzparser.ym @@ -18,16 +18,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#import "tikzparserdefs.h" %} /* we use features added to bison 2.4 */ -%require "2.4" +%require "2.3" %error-verbose /* enable maintaining locations for better error messages */ %locations /* the name of the header file */ -%defines "common/tikzparser.h" +/*%defines "common/tikzparser.h"*/ /* make it re-entrant (no global variables) */ %pure-parser /* We use a pure (re-entrant) lexer. This means yylex @@ -37,21 +39,6 @@ that lexer state as an argument */ %parse-param {void *scanner} -/* things required to use the parser (will go in the header); - in particular, declarations/imports for types in the %union - must go here */ -%code requires { -#import <Foundation/Foundation.h> -@class TikzGraphAssembler; -@class GraphElementData; -@class GraphElementProperty; -@class Node; -struct noderef { - Node *node; - NSString *anchor; -}; -} - /* possible data types for semantic values */ %union { NSPoint pt; @@ -62,7 +49,7 @@ struct noderef { struct noderef noderef; } -%code { +%{ #import "GraphElementData.h" #import "GraphElementProperty.h" #import "Node.h" @@ -78,7 +65,7 @@ struct noderef { void yyerror(YYLTYPE *yylloc, void *scanner, const char *str) { [assembler reportError:str atLocation:yylloc]; } -} +%} /* yyloc is set up with first_column = last_column = 1 by default; however, it makes more sense to think of us being "before the |