From ddc3fa5b3b342a48898895910e98c092cd8e2ffa Mon Sep 17 00:00:00 2001 From: Shevek Date: Sun, 18 May 2008 09:39:41 +0000 Subject: minor patches for 1.2.1 release --- src/java/org/anarres/cpp/LexerSource.java | 1 + src/java/org/anarres/cpp/Main.java | 5 ++++- src/java/org/anarres/cpp/Preprocessor.java | 3 --- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/java/org/anarres') diff --git a/src/java/org/anarres/cpp/LexerSource.java b/src/java/org/anarres/cpp/LexerSource.java index 11a8538..6bb4220 100644 --- a/src/java/org/anarres/cpp/LexerSource.java +++ b/src/java/org/anarres/cpp/LexerSource.java @@ -84,6 +84,7 @@ public class LexerSource extends Source { return column; } + @Override /* pp */ boolean isNumbered() { return true; } diff --git a/src/java/org/anarres/cpp/Main.java b/src/java/org/anarres/cpp/Main.java index e592169..7ca260c 100644 --- a/src/java/org/anarres/cpp/Main.java +++ b/src/java/org/anarres/cpp/Main.java @@ -97,7 +97,10 @@ public class Main { int idx; Preprocessor pp = new Preprocessor(); + pp.addFeature(Feature.DIGRAPHS); + pp.addFeature(Feature.TRIGRAPHS); pp.addFeature(Feature.LINEMARKERS); + pp.setListener(new PreprocessorListener()); pp.addMacro("__JCPP__"); @@ -157,7 +160,7 @@ public class Main { List path = pp.getSystemIncludePath(); path.add("/usr/local/include"); path.add("/usr/include"); - path.add("/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include"); + // path.add("/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include"); for (int i = g.getOptind(); i < args.length; i++) pp.addInput(new FileLexerSource(new File(args[i]))); diff --git a/src/java/org/anarres/cpp/Preprocessor.java b/src/java/org/anarres/cpp/Preprocessor.java index 9c3bfa8..9e32973 100644 --- a/src/java/org/anarres/cpp/Preprocessor.java +++ b/src/java/org/anarres/cpp/Preprocessor.java @@ -70,10 +70,7 @@ public class Preprocessor { this.quoteincludepath = new ArrayList(); this.sysincludepath = new ArrayList(); this.features = EnumSet.noneOf(Feature.class); - features.add(Feature.DIGRAPHS); - features.add(Feature.TRIGRAPHS); this.warnings = EnumSet.noneOf(Warning.class); - setListener(new PreprocessorListener()); } public Preprocessor(Source initial) { -- cgit v1.2.3