hello, I am trying to build the C# Target (C# Runtime) of ANTLR v3.3 with Mono2.0 (actually 1.9.1). There are binaries for v3.1 but they don't seem to be compatible with ANTLR 3.3.
I am using this tarball: http://antlr.org/download/antlr-3.3.tar.gz In order to be able to compile this, you (probably, I'm guessing) need to copy a file: $ cd antlr-3.3/runtime/CSharp2/ $ cp ../CSharp3/Sources/Antlr3.Runtime/IAstRuleReturnScope\`1.cs Sources/Antlr3.Runtime/IAstRuleReturnScope\`1.cs When I try to build now: ---------------------- $ cd antlr-3.3/runtime/CSharp2/ $ nant clean NAnt 0.85 (Build 0.85.2478.0; release; 14.10.2006) Copyright (C) 2001-2006 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/all.antlr3.runtime.net.build Target framework: Mono 2.0 Profile Target(s) specified: clean clean: [delete] Deleting directory '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/bin'. [delete] Deleting directory '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/build/mono-2.0'. BUILD SUCCEEDED Total time: 0.1 seconds. ---------------------- ---------------------- $ nant build NAnt 0.85 (Build 0.85.2478.0; release; 14.10.2006) Copyright (C) 2001-2006 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/all.antlr3.runtime.net.build Target framework: Mono 2.0 Profile Target(s) specified: build clean: init: [mkdir] Creating directory '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/bin'. [mkdir] Creating directory '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/build/mono-2.0'. copy_build_dependencies: [copy] Copying 3 files to '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/build/mono-2.0'. build.v3.runtime: [nant] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/default.build build Buildfile: file:///home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/default.build Target framework: Mono 2.0 Profile Target(s) specified: build [tstamp] 4. März 2011 21:22:55. [echo] Building project: 'Antlr3.Runtime' version 3.1b1 ==> 'Antlr3.Runtime.dll' clean: copy_build_dependencies: [copy] Copying 3 files to '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/bin'. init: [mkdir] Creating directory '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/bin/tests'. compile: [csc] Compiling 106 files to '/home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/bin/Antlr3.Runtime.dll'. [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/CommonToken.cs(115,0): warning CS1587: XML comment is not placed on a valid language element [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/Lexer.cs(61,0): warning CS1587: XML comment is not placed on a valid language element [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/Lexer.cs(68,0): warning CS1587: XML comment is not placed on a valid language element [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/Lexer.cs(161,0): warning CS1587: XML comment is not placed on a valid language element [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/Lexer.cs(266,0): warning CS1587: XML comment is not placed on a valid language element [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/ITreeNodeStream.cs(44,9): warning CS1587: XML comment is not placed on a valid language element [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BaseRecognizer.cs(328,28): warning CS1574: XML comment on `Antlr.Runtime.BaseRecognizer.NumberOfSyntaxErrors' has cref attribute `reportError()' that could not be resolved [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BaseRecognizer.cs(748,38): warning CS1570: XML comment on `M:Antlr.Runtime.BaseRecognizer.GetRuleInvocationStack' has non-well-formed XML ('String' is expected Line 7, position 16.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BaseRecognizer.cs(824,37): warning CS1570: XML comment on `M:Antlr.Runtime.BaseRecognizer.ToStrings(System.Collections.Generic.ICollection{Antlr.Runtime.IToken})' has non-well-formed XML ('String' is expected Line 5, position 16.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BitSet.cs(60,27): warning CS1570: XML comment on `F:Antlr.Runtime.BitSet.MOD_MASK' has non-well-formed XML (a name did not start with a legal character 32 ( ) Line 5, position 25.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BufferedTokenStream.cs(54,18): warning CS1570: XML comment on `T:Antlr.Runtime.BufferedTokenStream' has non-well-formed XML (expected '>' (3E) but found '{' (7B) Line 6, position 48.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/LegacyCommonTokenStream.cs(64,41): warning CS1570: XML comment on `F:Antlr.Runtime.LegacyCommonTokenStream.channelOverrideMap' has non-well-formed XML (expected '>' (3E) but found ',' (2C) Line 2, position 25.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/LegacyCommonTokenStream.cs(67,40): warning CS1570: XML comment on `F:Antlr.Runtime.LegacyCommonTokenStream.discardSet' has non-well-formed XML ('tokentype' is expected Line 2, position 63.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/RecognizerSharedState.cs(105,40): warning CS1570: XML comment on `F:Antlr.Runtime.RecognizerSharedState.ruleMemo' has non-well-formed XML (expected '>' (3E) but found ',' (2C) Line 3, position 53.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/IDebugEventListener.cs(224,14): warning CS1570: XML comment on `M:Antlr.Runtime.Debug.IDebugEventListener.RecognitionException(Antlr.Runtime.RecognitionException)' has non-well-formed XML (a name did not start with a legal character 52 (4) Line 43, position 30.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/IDebugEventListener.cs(361,14): warning CS1574: XML comment on `Antlr.Runtime.Debug.IDebugEventListener.BecomeRoot(object, object)' has cref attribute `Antlr.Runtime.Tree.TreeAdaptor.becomeRoot()' that could not be resolved [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/IDebugEventListener.cs(372,14): warning CS1574: XML comment on `Antlr.Runtime.Debug.IDebugEventListener.AddChild(object, object)' has cref attribute `Antlr.Runtime.Tree.TreeAdaptor.addChild()' that could not be resolved [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/Profiler.cs(51,18): warning CS1570: XML comment on `T:Antlr.Runtime.Debug.Profiler' has non-well-formed XML (unexpected end of file. Current depth is 1 Line 4, position 6.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/ITreeAdaptor.cs(97,16): warning CS1570: XML comment on `M:Antlr.Runtime.Tree.ITreeAdaptor.ErrorNode(Antlr.Runtime.ITokenStream,Antlr.Runtime.IToken,Antlr.Runtime.IToken,Antlr.Runtime.RecognitionException)' has non-well-formed XML (closing element without matching opening element Line 9, position 15.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/RewriteRuleElementStream.cs(64,26): warning CS1570: XML comment on `F:Antlr.Runtime.Tree.RewriteRuleElementStream.singleElement' has non-well-formed XML (unexpected end of file. Current depth is 1 Line 2, position 80.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/RewriteRuleElementStream.cs(67,25): warning CS1570: XML comment on `F:Antlr.Runtime.Tree.RewriteRuleElementStream.elements' has non-well-formed XML (unexpected end of file. Current depth is 1 Line 2, position 58.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/RewriteRuleElementStream.cs(77,24): warning CS1570: XML comment on `F:Antlr.Runtime.Tree.RewriteRuleElementStream.dirty' has non-well-formed XML (unexpected end of file. Current depth is 1 Line 9, position 10.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/RewriteRuleElementStream.cs(83,26): warning CS1570: XML comment on `F:Antlr.Runtime.Tree.RewriteRuleElementStream.elementDescription' has non-well-formed XML (unexpected end of file. Current depth is 1 Line 5, position 10.) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BufferedTokenStream.cs(63,32): warning CS3021: `Antlr.Runtime.BufferedTokenStream._tokens' does not need a CLSCompliant attribute because the assembly is not marked as CLS-compliant [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/BufferedTokenStream.cs(74,23): warning CS3021: `Antlr.Runtime.BufferedTokenStream._p' does not need a CLSCompliant attribute because the assembly is not marked as CLS-compliant [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/Lexer.cs(286,38): warning CS0219: The variable `nvae' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/Lexer.cs(292,36): warning CS0219: The variable `eee' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/RecognizerSharedState.cs(59,20): warning CS3021: `Antlr.Runtime.RecognizerSharedState._fsp' does not need a CLSCompliant attribute because the assembly is not marked as CLS-compliant [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/UnbufferedTokenStream.cs(56,32): warning CS3021: `Antlr.Runtime.UnbufferedTokenStream.tokenSource' does not need a CLSCompliant attribute because the assembly is not marked as CLS-compliant [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugEventSocketProxy.cs(262,17): warning CS0219: The variable `type' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugEventSocketProxy.cs(261,20): warning CS0219: The variable `text' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugEventSocketProxy.cs(260,17): warning CS0219: The variable `ID' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugTreeNodeStream.cs(124,17): warning CS0219: The variable `type' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugTreeNodeStream.cs(123,20): warning CS0219: The variable `text' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugTreeNodeStream.cs(122,17): warning CS0219: The variable `ID' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugTreeNodeStream.cs(132,20): warning CS0219: The variable `text' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/DebugTreeNodeStream.cs(131,17): warning CS0219: The variable `ID' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/Profiler.cs(71,23): warning CS3021: `Antlr.Runtime.Debug.Profiler.ruleLevel' does not need a CLSCompliant attribute because the assembly is not marked as CLS-compliant [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/BaseTree.cs(332,21): warning CS0219: The variable `numToInsert' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/TraceDebugEventListener.cs(97,20): warning CS0219: The variable `text' is assigned but its value is never used [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/CommonTree.cs(49,23): warning CS3021: `Antlr.Runtime.Tree.CommonTree.token' does not need a CLSCompliant attribute because the assembly is not marked as CLS-compliant [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/DotTreeGenerator.cs(166,41): error CS1061: Type `Antlr.Runtime.Tree.ITreeAdaptor' does not contain a definition for `GetNodeText' and no extension method `GetNodeText' of type `Antlr.Runtime.Tree.ITreeAdaptor' could be found (are you missing a using directive or an assembly reference?) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/DotTreeGenerator.cs(170,44): error CS1061: Type `Antlr.Runtime.Tree.ITreeAdaptor' does not contain a definition for `GetNodeText' and no extension method `GetNodeText' of type `Antlr.Runtime.Tree.ITreeAdaptor' could be found (are you missing a using directive or an assembly reference?) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/DotTreeGenerator.cs(180,35): error CS1061: Type `Antlr.Runtime.Tree.ITreeAdaptor' does not contain a definition for `GetNodeText' and no extension method `GetNodeText' of type `Antlr.Runtime.Tree.ITreeAdaptor' could be found (are you missing a using directive or an assembly reference?) [csc] Compilation failed: 3 error(s), 41 warnings BUILD FAILED - 0 non-fatal error(s), 44 warning(s) /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/default.build(83,4): External Program Failed: /usr/lib/mono/2.0/gmcs.exe (return code was 1) Total time: 2.2 seconds. BUILD FAILED ---------------------- All Errors occur in DotTreeGenerator.cs: ---------------------- [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/DotTreeGenerator.cs(166,41): error CS1061: Type `Antlr.Runtime.Tree.ITreeAdaptor' does not contain a definition for `GetNodeText' and no extension method `GetNodeText' of type `Antlr.Runtime.Tree.ITreeAdaptor' could be found (are you missing a using directive or an assembly reference?) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/DotTreeGenerator.cs(170,44): error CS1061: Type `Antlr.Runtime.Tree.ITreeAdaptor' does not contain a definition for `GetNodeText' and no extension method `GetNodeText' of type `Antlr.Runtime.Tree.ITreeAdaptor' could be found (are you missing a using directive or an assembly reference?) [csc] /home/felix/doks/CSMath/ANTLR/antlr-3.3/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/DotTreeGenerator.cs(180,35): error CS1061: Type `Antlr.Runtime.Tree.ITreeAdaptor' does not contain a definition for `GetNodeText' and no extension method `GetNodeText' of type `Antlr.Runtime.Tree.ITreeAdaptor' could be found (are you missing a using directive or an assembly reference?) [csc] Compilation failed: 3 error(s), 41 warnings ---------------------- I have uploaded the source of DotTreeGenerator.cs: http://www2.inf.fh-brs.de/~fnatte2s/DotTreeGenerator.cs I am using Mono 1.9.1 (Debian Lenny). => Would this compile with a more recent Mono or is the code broken? Thanks a lot in advance! -- Felix Natter _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
