Archived

This forum has been archived. Please start a new discussion on GitHub.

Remaking the SLICE parser, ++

Hi!

---
Ice 1.1.0 on Redhat 9.0:
---

I am experimenting with the SLICE language and I wonder how can I remake the SLICE parser and the slice2cpp application so that I can try out my new grammars?

Just issuing "make" in the top Ice directory does not work because make does not catch changes in the Grammar.y file. Neither does it work to issue "make" in the SRC/Slice directory.

Thanks,
Catalin

Comments

  • In the file config/Make.rules, find the following lines:
    #%.h %.cpp: %.y
    #       rm -f $(*F).h $(*F).cpp
    #       bison $(BISONFLAGS) $<
    #       mv $(*F).tab.c $(*F).cpp
    #       mv $(*F).tab.h $(*F).h
    #       rm -f $(*F).output
    
    #%.cpp: %.l
    #       flex $(FLEXFLAGS) $<
    #       rm -f $@
    #       echo '#include <IceUtil/Config.h>' > $@
    #       cat lex.yy.c >> $@
    #       rm -f lex.yy.c
    

    Remove the '#' from the beginning of the lines. Then the Grammer.cpp and Scanner.cpp files are automatically generated when you change the .y/.l files.