Esempio n. 1
0
        public Preprocessor()
        {
            this.inputs = new List<Source>();

            this.macros = new Dictionary<String,Macro>();
            macros.Add(__LINE__.getName(), __LINE__);
            macros.Add(__FILE__.getName(), __FILE__);
            macros.Add(__COUNTER__.getName(), __COUNTER__);
            this.states = new Stack<State>();
            states.Push(new State());
            this.source = null;

            this.counter = 0;

            this.quoteincludepath = new List<String>();
            this.sysincludepath = new List<String>();
            this.frameworkspath = new List<String>();
            this.features = Feature.NONE;
            this.warnings = Warning.NONE;
            this.filesystem = new JavaFileSystem();
            this.listener = null;
        }
Esempio n. 2
0
 /**
  * Sets the PreprocessorListener which handles events for
  * this Preprocessor.
  *
  * The listener is notified of warnings, errors and source
  * changes, amongst other things.
  */
 public void setListener(PreprocessorListenerBase listener)
 {
     this.listener = listener;
     Source	s = source;
     while (s != null) {
     // s.setListener(listener);
     s.init(this);
     s = s.getParent();
     }
 }
Esempio n. 3
0
 internal void init(Preprocessor pp, LexerSource s)
 {
     this.listener = pp.getListener();
     this.source = s;
     setTrigraphs(pp.getFeature(Feature.TRIGRAPHS),
                     pp.getWarning(Warning.TRIGRAPHS));
 }