added some setters to Scene, including some modules in parser, ready to do something with the parse results
git-svn-id: svn://anubis/fart/trunk@89 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
70eeff90fb
commit
fc8a46853b
3 files changed
+16
-3
No files matched your search
+2
-2
@@ -10,10 +10,10 @@ CXXOBJS := $(PARSER).tab.o
|
||||
all: $(COBJS) $(CXXOBJS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $@ $<
|
||||
$(CC) -c -o $@ $(CPPFLAGS) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(CXX) -c -o $@ $<
|
||||
$(CXX) -c -o $@ $(CPPFLAGS) $<
|
||||
|
||||
$(PARSER).tab.cc $(PARSER).tab.hh: $(PARSER).yy
|
||||
$(BISON) -d $<
|
||||
|
||||
+6
-1
@@ -2,6 +2,8 @@
|
||||
%{
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include "main/Scene.h"
|
||||
#include "util/Vector.h"
|
||||
using namespace std;
|
||||
|
||||
extern "C" {
|
||||
@@ -29,6 +31,8 @@ class Node
|
||||
void * ptr;
|
||||
};
|
||||
|
||||
static Scene * g_scene;
|
||||
|
||||
#define YYSTYPE Node
|
||||
|
||||
%}
|
||||
@@ -183,8 +187,9 @@ vector: LESS number COMMA number COMMA number GREATER
|
||||
|
||||
%%
|
||||
|
||||
int parse(const char * fileName)
|
||||
int parse(Scene * scene, const char * fileName)
|
||||
{
|
||||
g_scene = scene;
|
||||
yyin = fopen(fileName, "r");
|
||||
if (yyin == NULL)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user