Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTianqi Zhang <tianzh@microsoft.com>2021-07-02 09:38:59 +0300
committerTianqi Zhang <tianzh@microsoft.com>2021-07-02 09:38:59 +0300
commit9163ef7e2d36fe8d07bbe7bbc6372181be75bf4d (patch)
tree921f03d758ca97b746723f2ba11da1d69a62d7eb
parenta38e403054b23ee95c7ef1304becca995732bff4 (diff)
support array scenario
-rw-r--r--monodoc/Monodoc.Ecma/EcmaDesc.cs39
-rw-r--r--monodoc/Monodoc.Ecma/EcmaUrlParser.jay10
-rw-r--r--[-rwxr-xr-x]monodoc/Monodoc.Ecma/jay/jay.sh (renamed from monodoc/jay.sh)0
-rw-r--r--monodoc/Monodoc.Ecma/jay/skeleton.cs391
-rw-r--r--monodoc/Monodoc.Ecma/prebuilt/EcmaUrlParser.cs369
-rw-r--r--monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs26
-rw-r--r--monodoc/monodoc.csproj3
7 files changed, 651 insertions, 187 deletions
diff --git a/monodoc/Monodoc.Ecma/EcmaDesc.cs b/monodoc/Monodoc.Ecma/EcmaDesc.cs
index d50c30e5..5c04b402 100644
--- a/monodoc/Monodoc.Ecma/EcmaDesc.cs
+++ b/monodoc/Monodoc.Ecma/EcmaDesc.cs
@@ -47,6 +47,11 @@ namespace Monodoc.Ecma
set;
}
+ public Mod ArrayModifier {
+ get;
+ set;
+ }
+
public string Namespace {
get;
set;
@@ -246,6 +251,10 @@ namespace Monodoc.Ecma
sb.Append ('+');
NestedType.ConstructCRef (sb, skipLeadingDot: true);
}
+ if (DescModifier != Mod.Normal)
+ {
+ sb.Append(ModToString(DescModifier));
+ }
if (ArrayDimensions != null && ArrayDimensions.Count > 0) {
for (int i = 0; i < ArrayDimensions.Count; i++) {
sb.Append ('[');
@@ -253,6 +262,10 @@ namespace Monodoc.Ecma
sb.Append (']');
}
}
+ if (ArrayModifier != Mod.Normal)
+ {
+ sb.Append(ModToString(ArrayModifier));
+ }
if (DescKind == Kind.Type)
return;
@@ -399,15 +412,23 @@ namespace Monodoc.Ecma
string ModToString (EcmaDesc desc)
{
- switch (desc.DescModifier) {
- case Mod.Pointer:
- return "*";
- case Mod.Ref:
- return "&";
- case Mod.Out:
- return "@";
- default:
- return string.Empty;
+ return ModToString(desc.DescModifier);
+ }
+
+ string ModToString(EcmaDesc.Mod mod)
+ {
+ switch (mod)
+ {
+ case Mod.Pointer:
+ return "*";
+ case Mod.Ref:
+ return "&";
+ case Mod.Out:
+ return "@";
+ case Mod.Nullable:
+ return "?";
+ default:
+ return string.Empty;
}
}
diff --git a/monodoc/Monodoc.Ecma/EcmaUrlParser.jay b/monodoc/Monodoc.Ecma/EcmaUrlParser.jay
index c53eedbf..7b1689a6 100644
--- a/monodoc/Monodoc.Ecma/EcmaUrlParser.jay
+++ b/monodoc/Monodoc.Ecma/EcmaUrlParser.jay
@@ -114,15 +114,17 @@ reduced_type_expression
}
type_expression_suffix
- : opt_generic_type_suffix opt_inner_type_description opt_array_definition opt_etc {
+ : opt_generic_type_suffix opt_inner_type_description opt_arg_type_suffix opt_array_definition opt_arg_type_suffix opt_etc {
bool nestedDescHasEtc = $2 != null && ((EcmaDesc)$2).IsEtc;
EcmaDesc nestedType = (EcmaDesc)$2;
$$ = new EcmaDesc {
GenericTypeArguments = $1 as List<EcmaDesc>,
NestedType = nestedType,
- ArrayDimensions = SafeReverse ($3 as List<int>),
- Etc = $4 != null ? ((Tuple<char, string>)$4).Item1 : nestedDescHasEtc ? nestedType.Etc : (char)0,
- EtcFilter = $4 != null ? ((Tuple<char, string>)$4).Item2 : nestedDescHasEtc ? nestedType.EtcFilter : null
+ DescModifier = (EcmaDesc.Mod)$3,
+ ArrayDimensions = SafeReverse ($4 as List<int>),
+ ArrayModifier = (EcmaDesc.Mod)$5,
+ Etc = $6 != null ? ((Tuple<char, string>)$6).Item1 : nestedDescHasEtc ? nestedType.Etc : (char)0,
+ EtcFilter = $6 != null ? ((Tuple<char, string>)$6).Item2 : nestedDescHasEtc ? nestedType.EtcFilter : null
};
if (nestedDescHasEtc) {
nestedType.Etc = (char)0;
diff --git a/monodoc/jay.sh b/monodoc/Monodoc.Ecma/jay/jay.sh
index 6df0eb52..6df0eb52 100755..100644
--- a/monodoc/jay.sh
+++ b/monodoc/Monodoc.Ecma/jay/jay.sh
diff --git a/monodoc/Monodoc.Ecma/jay/skeleton.cs b/monodoc/Monodoc.Ecma/jay/skeleton.cs
new file mode 100644
index 00000000..dda3811b
--- /dev/null
+++ b/monodoc/Monodoc.Ecma/jay/skeleton.cs
@@ -0,0 +1,391 @@
+# jay skeleton
+
+# character in column 1 determines outcome...
+# # is a comment
+# . is copied
+# t is copied as //t if -t is set
+# other lines are interpreted to call jay procedures
+
+.// created by jay 0.7 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
+.
+ prolog ## %{ ... %} prior to the first %%
+
+.
+. /** error output stream.
+. It should be changeable.
+. */
+. public System.IO.TextWriter ErrorOutput = System.Console.Out;
+.
+. /** simplified error message.
+. @see <a href="#yyerror(java.lang.String, java.lang.String[])">yyerror</a>
+. */
+. public void yyerror (string message) {
+. yyerror(message, null);
+. }
+.#pragma warning disable 649
+. /* An EOF token */
+. public int eof_token;
+.#pragma warning restore 649
+. /** (syntax) error message.
+. Can be overwritten to control message format.
+. @param message text to be displayed.
+. @param expected vector of acceptable tokens, if available.
+. */
+. public void yyerror (string message, string[] expected) {
+. if ((yacc_verbose_flag > 0) && (expected != null) && (expected.Length > 0)) {
+. ErrorOutput.Write (message+", expecting");
+. for (int n = 0; n < expected.Length; ++ n)
+. ErrorOutput.Write (" "+expected[n]);
+. ErrorOutput.WriteLine ();
+. } else
+. ErrorOutput.WriteLine (message);
+. }
+.
+. /** debugging support, requires the package jay.yydebug.
+. Set to null to suppress debugging messages.
+. */
+t internal yydebug.yyDebug debug;
+.
+ debug ## tables for debugging support
+.
+. /** index-checked interface to yyNames[].
+. @param token single character or %token value.
+. @return token name or [illegal] or [unknown].
+. */
+t public static string yyname (int token) {
+t if ((token < 0) || (token > yyNames.Length)) return "[illegal]";
+t string name;
+t if ((name = yyNames[token]) != null) return name;
+t return "[unknown]";
+t }
+.
+.#pragma warning disable 414
+. int yyExpectingState;
+.#pragma warning restore 414
+. /** computes list of expected tokens on error by tracing the tables.
+. @param state for which to compute the list.
+. @return list of token names.
+. */
+. protected int [] yyExpectingTokens (int state){
+. int token, n, len = 0;
+. bool[] ok = new bool[yyNames.Length];
+. if ((n = yySindex[state]) != 0)
+. for (token = n < 0 ? -n : 0;
+. (token < yyNames.Length) && (n+token < yyTable.Length); ++ token)
+. if (yyCheck[n+token] == token && !ok[token] && yyNames[token] != null) {
+. ++ len;
+. ok[token] = true;
+. }
+. if ((n = yyRindex[state]) != 0)
+. for (token = n < 0 ? -n : 0;
+. (token < yyNames.Length) && (n+token < yyTable.Length); ++ token)
+. if (yyCheck[n+token] == token && !ok[token] && yyNames[token] != null) {
+. ++ len;
+. ok[token] = true;
+. }
+. int [] result = new int [len];
+. for (n = token = 0; n < len; ++ token)
+. if (ok[token]) result[n++] = token;
+. return result;
+. }
+. protected string[] yyExpecting (int state) {
+. int [] tokens = yyExpectingTokens (state);
+. string [] result = new string[tokens.Length];
+. for (int n = 0; n < tokens.Length; n++)
+. result[n++] = yyNames[tokens [n]];
+. return result;
+. }
+.
+. /** the generated parser, with debugging messages.
+. Maintains a state and a value stack, currently with fixed maximum size.
+. @param yyLex scanner.
+. @param yydebug debug message writer implementing yyDebug, or null.
+. @return result of the last reduction, if any.
+. @throws yyException on irrecoverable parse error.
+. */
+. internal Object yyparse (yyParser.yyInput yyLex, Object yyd)
+. {
+t this.debug = (yydebug.yyDebug)yyd;
+. return yyparse(yyLex);
+. }
+.
+. /** initial size and increment of the state/value stack [default 256].
+. This is not final so that it can be overwritten outside of invocations
+. of yyparse().
+. */
+. protected int yyMax;
+.
+. /** executed at the beginning of a reduce action.
+. Used as $$ = yyDefault($1), prior to the user-specified action, if any.
+. Can be overwritten to provide deep copy, etc.
+. @param first value for $1, or null.
+. @return first.
+. */
+. protected Object yyDefault (Object first) {
+. return first;
+. }
+.
+. static int[] global_yyStates;
+. static object[] global_yyVals;
+.#pragma warning disable 649
+. protected bool use_global_stacks;
+.#pragma warning restore 649
+. object[] yyVals; // value stack
+. object yyVal; // value stack ptr
+. int yyToken; // current input
+. int yyTop;
+.
+. /** the generated parser.
+. Maintains a state and a value stack, currently with fixed maximum size.
+. @param yyLex scanner.
+. @return result of the last reduction, if any.
+. @throws yyException on irrecoverable parse error.
+. */
+. internal Object yyparse (yyParser.yyInput yyLex)
+. {
+. if (yyMax <= 0) yyMax = 256; // initial size
+. int yyState = 0; // state stack ptr
+. int [] yyStates; // state stack
+. yyVal = null;
+. yyToken = -1;
+. int yyErrorFlag = 0; // #tks to shift
+. if (use_global_stacks && global_yyStates != null) {
+. yyVals = global_yyVals;
+. yyStates = global_yyStates;
+. } else {
+. yyVals = new object [yyMax];
+. yyStates = new int [yyMax];
+. if (use_global_stacks) {
+. global_yyVals = yyVals;
+. global_yyStates = yyStates;
+. }
+. }
+.
+ local ## %{ ... %} after the first %%
+
+. /*yyLoop:*/ for (yyTop = 0;; ++ yyTop) {
+. if (yyTop >= yyStates.Length) { // dynamically increase
+. global::System.Array.Resize (ref yyStates, yyStates.Length+yyMax);
+. global::System.Array.Resize (ref yyVals, yyVals.Length+yyMax);
+. }
+. yyStates[yyTop] = yyState;
+. yyVals[yyTop] = yyVal;
+t if (debug != null) debug.push(yyState, yyVal);
+.
+. /*yyDiscarded:*/ while (true) { // discarding a token does not change stack
+. int yyN;
+. if ((yyN = yyDefRed[yyState]) == 0) { // else [default] reduce (yyN)
+. if (yyToken < 0) {
+. yyToken = yyLex.advance() ? yyLex.token() : 0;
+
+t if (debug != null)
+t debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
+. }
+. if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
+. && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
+t if (debug != null)
+t debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
+. yyState = yyTable[yyN]; // shift to yyN
+. yyVal = yyLex.value();
+. yyToken = -1;
+. if (yyErrorFlag > 0) -- yyErrorFlag;
+. goto continue_yyLoop;
+. }
+. if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
+. && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
+. yyN = yyTable[yyN]; // reduce (yyN)
+. else
+. switch (yyErrorFlag) {
+.
+. case 0:
+. yyExpectingState = yyState;
+. // yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
+t if (debug != null) debug.error("syntax error");
+. if (yyToken == 0 /*eof*/ || yyToken == eof_token) throw new yyParser.yyUnexpectedEof ();
+. goto case 1;
+. case 1: case 2:
+. yyErrorFlag = 3;
+. do {
+. if ((yyN = yySindex[yyStates[yyTop]]) != 0
+. && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
+. && yyCheck[yyN] == Token.yyErrorCode) {
+t if (debug != null)
+t debug.shift(yyStates[yyTop], yyTable[yyN], 3);
+. yyState = yyTable[yyN];
+. yyVal = yyLex.value();
+. goto continue_yyLoop;
+. }
+t if (debug != null) debug.pop(yyStates[yyTop]);
+. } while (-- yyTop >= 0);
+t if (debug != null) debug.reject();
+. throw new yyParser.yyException("irrecoverable syntax error");
+.
+. case 3:
+. if (yyToken == 0) {
+t if (debug != null) debug.reject();
+. throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
+. }
+t if (debug != null)
+t debug.discard(yyState, yyToken, yyname(yyToken),
+t yyLex.value());
+. yyToken = -1;
+. goto continue_yyDiscarded; // leave stack alone
+. }
+. }
+. int yyV = yyTop + 1-yyLen[yyN];
+t if (debug != null)
+t debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
+. yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
+. switch (yyN) {
+
+ actions ## code from the actions within the grammar
+
+. }
+. yyTop -= yyLen[yyN];
+. yyState = yyStates[yyTop];
+. int yyM = yyLhs[yyN];
+. if (yyState == 0 && yyM == 0) {
+t if (debug != null) debug.shift(0, yyFinal);
+. yyState = yyFinal;
+. if (yyToken < 0) {
+. yyToken = yyLex.advance() ? yyLex.token() : 0;
+
+t if (debug != null)
+t debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
+. }
+. if (yyToken == 0) {
+t if (debug != null) debug.accept(yyVal);
+. return yyVal;
+. }
+. goto continue_yyLoop;
+. }
+. if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
+. && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
+. yyState = yyTable[yyN];
+. else
+. yyState = yyDgoto[yyM];
+t if (debug != null) debug.shift(yyStates[yyTop], yyState);
+. goto continue_yyLoop;
+. continue_yyDiscarded: ; // implements the named-loop continue: 'continue yyDiscarded'
+. }
+. continue_yyLoop: ; // implements the named-loop continue: 'continue yyLoop'
+. }
+. }
+.
+ tables ## tables for rules, default reduction, and action calls
+.
+ epilog ## text following second %%
+.namespace yydebug {
+. using System;
+. internal interface yyDebug {
+. void push (int state, Object value);
+. void lex (int state, int token, string name, Object value);
+. void shift (int from, int to, int errorFlag);
+. void pop (int state);
+. void discard (int state, int token, string name, Object value);
+. void reduce (int from, int to, int rule, string text, int len);
+. void shift (int from, int to);
+. void accept (Object value);
+. void error (string message);
+. void reject ();
+. }
+.
+. class yyDebugSimple : yyDebug {
+. void println (string s){
+. Console.Error.WriteLine (s);
+. }
+.
+. public void push (int state, Object value) {
+. println ("push\tstate "+state+"\tvalue "+value);
+. }
+.
+. public void lex (int state, int token, string name, Object value) {
+. println("lex\tstate "+state+"\treading "+name+"\tvalue "+value);
+. }
+.
+. public void shift (int from, int to, int errorFlag) {
+. switch (errorFlag) {
+. default: // normally
+. println("shift\tfrom state "+from+" to "+to);
+. break;
+. case 0: case 1: case 2: // in error recovery
+. println("shift\tfrom state "+from+" to "+to
+. +"\t"+errorFlag+" left to recover");
+. break;
+. case 3: // normally
+. println("shift\tfrom state "+from+" to "+to+"\ton error");
+. break;
+. }
+. }
+.
+. public void pop (int state) {
+. println("pop\tstate "+state+"\ton error");
+. }
+.
+. public void discard (int state, int token, string name, Object value) {
+. println("discard\tstate "+state+"\ttoken "+name+"\tvalue "+value);
+. }
+.
+. public void reduce (int from, int to, int rule, string text, int len) {
+. println("reduce\tstate "+from+"\tuncover "+to
+. +"\trule ("+rule+") "+text);
+. }
+.
+. public void shift (int from, int to) {
+. println("goto\tfrom state "+from+" to "+to);
+. }
+.
+. public void accept (Object value) {
+. println("accept\tvalue "+value);
+. }
+.
+. public void error (string message) {
+. println("error\t"+message);
+. }
+.
+. public void reject () {
+. println("reject");
+. }
+.
+. }
+.}
+.// %token constants
+. class Token {
+ tokens public const int
+. }
+. namespace yyParser {
+. using System;
+. /** thrown for irrecoverable syntax errors and stack overflow.
+. */
+. internal class yyException : System.Exception {
+. public yyException (string message) : base (message) {
+. }
+. }
+. internal class yyUnexpectedEof : yyException {
+. public yyUnexpectedEof (string message) : base (message) {
+. }
+. public yyUnexpectedEof () : base ("") {
+. }
+. }
+.
+. /** must be implemented by a scanner object to supply input to the parser.
+. */
+. internal interface yyInput {
+. /** move on to next token.
+. @return false if positioned beyond tokens.
+. @throws IOException on input error.
+. */
+. bool advance (); // throws java.io.IOException;
+. /** classifies current token.
+. Should not be called if advance() returned false.
+. @return current %token or single character.
+. */
+. int token ();
+. /** associated with current token.
+. Should not be called if advance() returned false.
+. @return value for token().
+. */
+. Object value ();
+. }
+. }
+.} // close outermost namespace, that MUST HAVE BEEN opened in the prolog
diff --git a/monodoc/Monodoc.Ecma/prebuilt/EcmaUrlParser.cs b/monodoc/Monodoc.Ecma/prebuilt/EcmaUrlParser.cs
index 1965cd0b..9e2e3fa2 100644
--- a/monodoc/Monodoc.Ecma/prebuilt/EcmaUrlParser.cs
+++ b/monodoc/Monodoc.Ecma/prebuilt/EcmaUrlParser.cs
@@ -1,6 +1,7 @@
// created by jay 0.7 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
-#line 2 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 1 "Monodoc.Ecma/EcmaUrlParser.jay"
+
using System.Text;
using System.IO;
using System;
@@ -106,7 +107,7 @@ namespace Monodoc.Ecma
"namespace_expression : dot_expression",
"type_expression : dot_expression type_expression_suffix",
"reduced_type_expression : IDENTIFIER type_expression_suffix",
- "type_expression_suffix : opt_generic_type_suffix opt_inner_type_description opt_array_definition opt_etc",
+ "type_expression_suffix : opt_generic_type_suffix opt_inner_type_description opt_arg_type_suffix opt_array_definition opt_arg_type_suffix opt_etc",
"opt_inner_type_description :",
"opt_inner_type_description : INNER_TYPE_SEPARATOR reduced_type_expression",
"opt_generic_type_suffix :",
@@ -133,6 +134,7 @@ namespace Monodoc.Ecma
"opt_arg_type_suffix : STAR",
"opt_arg_type_suffix : REF_ARG",
"opt_arg_type_suffix : OUT_ARG",
+ "opt_arg_type_suffix : QUESTION_MARK",
"type_expression_list :",
"type_expression_list : arg_type_expression",
"type_expression_list : arg_type_expression COMMA type_expression_list",
@@ -174,6 +176,7 @@ namespace Monodoc.Ecma
"OP_GENERICS_LT","OP_GENERICS_GT","OP_GENERICS_BACKTICK",
"OP_OPEN_PAREN","OP_CLOSE_PAREN","OP_ARRAY_OPEN","OP_ARRAY_CLOSE",
"SLASH_SEPARATOR","STAR","REF_ARG","OUT_ARG","EXPLICIT_IMPL_SEP",
+ "QUESTION_MARK",
};
/** index-checked interface to yyNames[].
@@ -363,47 +366,47 @@ namespace Monodoc.Ecma
yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
switch (yyN) {
case 1:
-#line 78 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 79 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Type); }
break;
case 2:
-#line 79 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 80 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Namespace); }
break;
case 3:
-#line 80 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 81 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Method); }
break;
case 4:
-#line 81 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 82 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Field); }
break;
case 5:
-#line 82 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 83 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Constructor); }
break;
case 6:
-#line 83 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 84 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Property); }
break;
case 7:
-#line 84 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 85 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Event); }
break;
case 8:
-#line 85 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 86 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = SetEcmaDescType (yyVals[0+yyTop], EcmaDesc.Kind.Operator); }
break;
case 9:
-#line 89 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 90 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = new List<string> { (string)yyVals[0+yyTop] }; }
break;
case 10:
-#line 90 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 91 "Monodoc.Ecma/EcmaUrlParser.jay"
{ ((ICollection<string>)yyVals[0+yyTop]).Add ((string)yyVals[-2+yyTop]); yyVal = yyVals[0+yyTop]; }
break;
case 11:
-#line 93 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 94 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = new EcmaDesc { Namespace = string.Join (".", ((IEnumerable<string>)yyVals[0+yyTop]).Reverse ()) }; }
break;
case 12:
@@ -416,66 +419,66 @@ case 14:
case_14();
break;
case 15:
-#line 133 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 136 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = null; }
break;
case 16:
-#line 134 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 137 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = yyVals[0+yyTop]; }
break;
case 17:
-#line 137 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 140 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = null; }
break;
case 18:
-#line 138 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 141 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = Enumerable.Repeat<EcmaDesc> (null, (int)yyVals[0+yyTop]).ToList (); }
break;
case 19:
-#line 139 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 142 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = yyVals[-1+yyTop]; }
break;
case 20:
-#line 142 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 145 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = new List<EcmaDesc> () { (EcmaDesc)yyVals[0+yyTop] }; }
break;
case 21:
-#line 143 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 146 "Monodoc.Ecma/EcmaUrlParser.jay"
{ ((List<EcmaDesc>)yyVals[-2+yyTop]).Add ((EcmaDesc)yyVals[0+yyTop]); yyVal = yyVals[-2+yyTop]; }
break;
case 22:
-#line 146 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 149 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = null; }
break;
case 23:
case_23();
break;
case 24:
-#line 154 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 157 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = 1; }
break;
case 25:
-#line 155 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 158 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = ((int)yyVals[0+yyTop]) + 1; }
break;
case 26:
-#line 158 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 161 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = null; }
break;
case 27:
-#line 159 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 162 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = Tuple.Create<char, string> (((string)yyVals[0+yyTop])[0], null); }
break;
case 28:
-#line 160 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 163 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = Tuple.Create<char, string> (((string)yyVals[-2+yyTop])[0], (string)yyVals[0+yyTop]); }
break;
case 29:
-#line 164 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 167 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = "*"; }
break;
case 30:
-#line 165 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 168 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = yyVals[0+yyTop]; }
break;
case 31:
@@ -488,46 +491,47 @@ case 33:
case_33();
break;
case 34:
-#line 193 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 196 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = (string)yyVals[-1+yyTop] + (yyVals[0+yyTop] == null ? string.Empty : "<" + string.Join (",", ((IEnumerable<EcmaDesc>)yyVals[0+yyTop]).Select (t => t.ToCompleteTypeName ())) + ">"); }
break;
case 35:
case_35();
break;
case 36:
-#line 201 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 204 "Monodoc.Ecma/EcmaUrlParser.jay"
{ var desc = (EcmaDesc)yyVals[-1+yyTop]; desc.DescModifier = (EcmaDesc.Mod)yyVals[0+yyTop]; yyVal = desc; }
break;
case 37:
-#line 204 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 207 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = EcmaDesc.Mod.Normal; }
break;
case 38:
-#line 205 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 208 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = EcmaDesc.Mod.Pointer; }
break;
case 39:
-#line 206 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 209 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = EcmaDesc.Mod.Ref; }
break;
case 40:
-#line 207 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 210 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = EcmaDesc.Mod.Out; }
break;
case 41:
-#line 210 "Monodoc.Ecma/EcmaUrlParser.jay"
- { yyVal = null; }
+#line 211 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { yyVal = EcmaDesc.Mod.Nullable; }
break;
case 42:
-#line 211 "Monodoc.Ecma/EcmaUrlParser.jay"
- { yyVal = new List<EcmaDesc> () { (EcmaDesc)yyVals[0+yyTop] }; }
+#line 214 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { yyVal = null; }
break;
case 43:
-#line 212 "Monodoc.Ecma/EcmaUrlParser.jay"
- { ((List<EcmaDesc>)yyVals[0+yyTop]).Add ((EcmaDesc)yyVals[-2+yyTop]); yyVal = yyVals[0+yyTop]; }
+#line 215 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { yyVal = new List<EcmaDesc> () { (EcmaDesc)yyVals[0+yyTop] }; }
break;
case 44:
- case_44();
+#line 216 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { ((List<EcmaDesc>)yyVals[0+yyTop]).Add ((EcmaDesc)yyVals[-2+yyTop]); yyVal = yyVals[0+yyTop]; }
break;
case 45:
case_45();
@@ -536,26 +540,29 @@ case 46:
case_46();
break;
case 47:
-#line 237 "Monodoc.Ecma/EcmaUrlParser.jay"
- { yyVal = yyVals[0+yyTop]; }
+ case_47();
break;
case 48:
-#line 240 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 241 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = yyVals[0+yyTop]; }
break;
case 49:
- case_49();
+#line 244 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { yyVal = yyVals[0+yyTop]; }
break;
case 50:
-#line 250 "Monodoc.Ecma/EcmaUrlParser.jay"
- { yyVal = yyVals[0+yyTop]; }
+ case_50();
break;
case 51:
-#line 258 "Monodoc.Ecma/EcmaUrlParser.jay"
- { yyVal = null; }
+#line 254 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { yyVal = yyVals[0+yyTop]; }
break;
case 52:
-#line 259 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 262 "Monodoc.Ecma/EcmaUrlParser.jay"
+ { yyVal = null; }
+ break;
+case 53:
+#line 263 "Monodoc.Ecma/EcmaUrlParser.jay"
{ yyVal = yyVals[-1+yyTop]; }
break;
#line default
@@ -594,7 +601,7 @@ case 52:
All more than 3 lines long rules are wrapped into a method
*/
void case_12()
-#line 96 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 97 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var dotExpr = ((List<string>)yyVals[-1+yyTop]);
dotExpr.Reverse ();
@@ -606,7 +613,7 @@ void case_12()
}
void case_13()
-#line 108 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 109 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var desc = yyVals[0+yyTop] as EcmaDesc;
desc.DescKind = EcmaDesc.Kind.Type;
@@ -615,14 +622,16 @@ void case_13()
}
void case_14()
-#line 116 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 117 "Monodoc.Ecma/EcmaUrlParser.jay"
{
- bool nestedDescHasEtc = yyVals[-2+yyTop] != null && ((EcmaDesc)yyVals[-2+yyTop]).IsEtc;
- EcmaDesc nestedType = (EcmaDesc)yyVals[-2+yyTop];
+ bool nestedDescHasEtc = yyVals[-4+yyTop] != null && ((EcmaDesc)yyVals[-4+yyTop]).IsEtc;
+ EcmaDesc nestedType = (EcmaDesc)yyVals[-4+yyTop];
yyVal = new EcmaDesc {
- GenericTypeArguments = yyVals[-3+yyTop] as List<EcmaDesc>,
+ GenericTypeArguments = yyVals[-5+yyTop] as List<EcmaDesc>,
NestedType = nestedType,
- ArrayDimensions = SafeReverse (yyVals[-1+yyTop] as List<int>),
+ DescModifier = (EcmaDesc.Mod)yyVals[-3+yyTop],
+ ArrayDimensions = SafeReverse (yyVals[-2+yyTop] as List<int>),
+ ArrayModifier = (EcmaDesc.Mod)yyVals[-1+yyTop],
Etc = yyVals[0+yyTop] != null ? ((Tuple<char, string>)yyVals[0+yyTop]).Item1 : nestedDescHasEtc ? nestedType.Etc : (char)0,
EtcFilter = yyVals[0+yyTop] != null ? ((Tuple<char, string>)yyVals[0+yyTop]).Item2 : nestedDescHasEtc ? nestedType.EtcFilter : null
};
@@ -633,7 +642,7 @@ void case_14()
}
void case_23()
-#line 147 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 150 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var dims = ((IList<int>)yyVals[0+yyTop]) ?? new List<int> (2);
dims.Add ((int)yyVals[-2+yyTop]);
@@ -641,7 +650,7 @@ void case_23()
}
void case_31()
-#line 168 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 171 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var desc = yyVals[-4+yyTop] as EcmaDesc;
desc.MemberName = yyVals[-2+yyTop] as string;
@@ -651,7 +660,7 @@ void case_31()
}
void case_32()
-#line 175 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 178 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var dotExpr = ((List<string>)yyVals[-2+yyTop]);
yyVal = new EcmaDesc {
@@ -664,7 +673,7 @@ void case_32()
}
void case_33()
-#line 185 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 188 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var desc = yyVals[-2+yyTop] as EcmaDesc;
desc.ExplicitImplMember = yyVals[0+yyTop] as EcmaDesc;
@@ -672,15 +681,15 @@ void case_33()
}
void case_35()
-#line 194 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 197 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var existing = yyVals[0+yyTop] as string;
var expr = (string)yyVals[-3+yyTop] + (yyVals[-2+yyTop] == null ? string.Empty : "<" + string.Join (",", ((IEnumerable<EcmaDesc>)yyVals[-2+yyTop]).Select (t => t.ToCompleteTypeName ())) + ">");
yyVal = expr + "." + existing;
}
-void case_44()
-#line 215 "Monodoc.Ecma/EcmaUrlParser.jay"
+void case_45()
+#line 219 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var dotExpr = ((List<string>)yyVals[0+yyTop]);
dotExpr.Reverse ();
@@ -692,24 +701,24 @@ void case_44()
};
}
-void case_45()
-#line 225 "Monodoc.Ecma/EcmaUrlParser.jay"
+void case_46()
+#line 229 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var desc = yyVals[-2+yyTop] as EcmaDesc;
desc.MemberName = yyVals[0+yyTop] as string;
yyVal = desc;
}
-void case_46()
-#line 230 "Monodoc.Ecma/EcmaUrlParser.jay"
+void case_47()
+#line 234 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var desc = yyVals[-2+yyTop] as EcmaDesc;
desc.ExplicitImplMember = yyVals[0+yyTop] as EcmaDesc;
yyVal = desc;
}
-void case_49()
-#line 243 "Monodoc.Ecma/EcmaUrlParser.jay"
+void case_50()
+#line 247 "Monodoc.Ecma/EcmaUrlParser.jay"
{
var desc = yyVals[-1+yyTop] as EcmaDesc;
(desc.ExplicitImplMember ?? desc).MemberArguments = SafeReverse (yyVals[0+yyTop] as List<EcmaDesc>);
@@ -719,87 +728,87 @@ void case_49()
#line default
static readonly short [] yyLhs = { -1,
0, 0, 0, 0, 0, 0, 0, 0, 8, 8,
- 2, 1, 10, 9, 12, 12, 11, 11, 11, 15,
- 15, 13, 13, 16, 16, 14, 14, 14, 17, 17,
- 3, 3, 3, 18, 18, 20, 21, 21, 21, 21,
- 22, 22, 22, 4, 4, 4, 5, 7, 6, 23,
- 19, 19,
+ 2, 1, 10, 9, 12, 12, 11, 11, 11, 16,
+ 16, 14, 14, 17, 17, 15, 15, 15, 18, 18,
+ 3, 3, 3, 19, 19, 21, 13, 13, 13, 13,
+ 13, 22, 22, 22, 4, 4, 4, 5, 7, 6,
+ 23, 20, 20,
};
static readonly short [] yyLen = { 2,
3, 3, 3, 3, 3, 3, 3, 3, 1, 3,
- 1, 2, 2, 4, 0, 2, 0, 2, 3, 1,
+ 1, 2, 2, 6, 0, 2, 0, 2, 3, 1,
3, 0, 4, 0, 2, 0, 2, 4, 1, 1,
5, 3, 3, 2, 4, 2, 0, 1, 1, 1,
- 0, 1, 3, 1, 3, 3, 1, 1, 2, 1,
- 0, 3,
+ 1, 0, 1, 3, 1, 3, 3, 1, 1, 2,
+ 1, 0, 3,
};
static readonly short [] yyDefRed = { 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- 2, 11, 0, 3, 0, 0, 4, 0, 47, 5,
- 0, 6, 7, 48, 8, 0, 0, 0, 12, 0,
- 0, 0, 0, 0, 0, 0, 50, 49, 10, 20,
- 0, 18, 0, 0, 0, 33, 32, 45, 46, 0,
- 0, 0, 0, 19, 0, 16, 0, 0, 0, 38,
- 39, 40, 36, 0, 52, 21, 13, 0, 0, 0,
- 14, 31, 43, 25, 0, 30, 29, 0, 23, 0,
- 0, 28, 0, 0, 35,
+ 2, 11, 0, 3, 0, 0, 4, 0, 48, 5,
+ 0, 6, 7, 49, 8, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0, 51, 50, 10, 20,
+ 0, 18, 0, 0, 0, 33, 32, 46, 47, 0,
+ 0, 0, 0, 19, 0, 16, 38, 39, 40, 41,
+ 0, 0, 36, 0, 53, 21, 13, 0, 0, 31,
+ 44, 0, 0, 0, 25, 0, 0, 14, 23, 30,
+ 29, 0, 0, 0, 28, 0, 0, 35,
};
protected static readonly short [] yyDgoto = { 9,
23, 21, 24, 27, 30, 32, 35, 20, 39, 66,
- 40, 54, 68, 81, 51, 79, 88, 92, 47, 61,
- 73, 62, 48,
+ 40, 54, 71, 79, 88, 51, 83, 92, 95, 47,
+ 61, 62, 48,
};
- protected static readonly short [] yySindex = { -32,
- -231, -228, -202, -201, -200, -199, -198, -195, 0, -190,
- -190, -190, -190, -190, -190, -190, -190, -189, 0, -207,
- 0, 0, -257, 0, -207, -248, 0, -207, 0, 0,
- -197, 0, 0, 0, 0, -190, -190, -187, 0, -188,
- -185, -190, -224, -184, -190, -190, 0, 0, 0, 0,
- -210, 0, -182, -192, -207, 0, 0, 0, 0, -259,
- -183, -186, -190, 0, -207, 0, -181, -180, -197, 0,
- 0, 0, 0, -190, 0, 0, 0, -181, -191, -216,
- 0, 0, 0, 0, -192, 0, 0, -178, 0, -175,
- -207, 0, -176, -175, 0,
+ protected static readonly short [] yySindex = { -21,
+ -229, -226, -220, -217, -197, -192, -190, -189, 0, -230,
+ -230, -230, -230, -230, -230, -230, -230, -238, 0, -213,
+ 0, 0, -236, 0, -213, -234, 0, -213, 0, 0,
+ -193, 0, 0, 0, 0, -230, -230, -184, 0, -187,
+ -181, -230, -240, -180, -230, -230, 0, 0, 0, 0,
+ -194, 0, -179, -212, -213, 0, 0, 0, 0, -212,
+ -177, -188, -230, 0, -213, 0, 0, 0, 0, 0,
+ -183, -193, 0, -230, 0, 0, 0, -176, -212, 0,
+ 0, -176, -182, -178, 0, -183, -241, 0, 0, 0,
+ 0, -175, -171, -213, 0, -170, -171, 0,
};
protected static readonly short [] yyRindex = { 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 0, 144,
- 0, 0, 0, 0, 128, 0, 0, 129, 0, 0,
- 85, 0, 0, 0, 0, 0, 0, 0, 0, 33,
- 0, 0, 92, 0, 0, -179, 0, 0, 0, 0,
- 0, 0, 0, 65, 4, 0, 0, 0, 0, -252,
- -174, 0, 0, 0, 17, 0, -172, 81, 85, 0,
- 0, 0, 0, -179, 0, 0, 0, -172, 0, 0,
- 0, 0, 0, 0, 65, 0, 0, 97, 0, 0,
- 49, 0, 112, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1, 0, 68,
+ 0, 0, 0, 0, 83, 0, 0, 100, 0, 0,
+ 81, 0, 0, 0, 0, 0, 0, 0, 0, 35,
+ 0, 0, 177, 0, 0, -186, 0, 0, 0, 0,
+ 0, 0, 0, 194, 4, 0, 0, 0, 0, -214,
+ -174, 0, 0, 0, 18, 0, 0, 0, 0, 0,
+ 117, 81, 0, -186, 0, 0, 0, -173, 194, 0,
+ 0, -173, 0, 134, 0, 117, 0, 0, 0, 0,
+ 0, 151, 0, 52, 0, 167, 0, 0,
};
protected static readonly short [] yyGindex = { 0,
- -5, 0, 12, -9, 0, 0, 0, 8, 21, 0,
- -25, 0, 2, 0, 0, 10, 0, -4, -41, 0,
- 0, 22, 0,
+ -8, 0, 2, 5, 0, 0, 0, -2, 24, 0,
+ -25, 0, -54, 6, 0, 0, 9, 0, 7, -40,
+ 0, 21, 0,
};
protected static readonly short [] yyTable = { 43,
- 9, 57, 41, 17, 19, 31, 33, 26, 37, 26,
- 26, 44, 70, 71, 72, 37, 17, 42, 22, 25,
- 28, 25, 28, 28, 25, 29, 45, 82, 34, 69,
- 10, 50, 15, 11, 5, 59, 7, 4, 53, 26,
- 60, 86, 46, 49, 3, 2, 8, 6, 17, 25,
- 63, 1, 28, 56, 64, 87, 37, 76, 38, 12,
- 13, 14, 15, 16, 22, 93, 17, 18, 60, 46,
- 36, 52, 55, 58, 53, 65, 67, 74, 85, 78,
- 26, 75, 91, 94, 51, 77, 89, 84, 41, 95,
- 80, 51, 90, 42, 0, 83, 27, 24, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 34, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 17, 44, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 19, 57, 17, 26, 73, 26, 26, 22, 25,
+ 28, 25, 28, 28, 25, 29, 90, 17, 34, 31,
+ 33, 36, 53, 41, 84, 44, 46, 18, 50, 72,
+ 91, 80, 10, 49, 15, 11, 26, 60, 42, 25,
+ 45, 12, 28, 56, 13, 5, 37, 7, 4, 59,
+ 37, 17, 38, 37, 76, 3, 2, 8, 6, 67,
+ 68, 69, 1, 70, 14, 60, 63, 17, 96, 15,
+ 64, 16, 17, 46, 52, 53, 55, 58, 65, 75,
+ 52, 42, 17, 74, 82, 78, 94, 86, 77, 97,
+ 85, 89, 87, 43, 81, 93, 24, 0, 0, 45,
+ 0, 0, 0, 98, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 26, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 27, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -807,43 +816,48 @@ void case_49()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 9, 0, 9, 9, 9, 9, 9, 9, 9,
- 17, 9, 9, 9, 9, 9, 17, 17, 0, 17,
- 0, 17, 0, 0, 17, 17, 0, 17, 17, 17,
- 17, 17, 15, 15, 0, 0, 0, 15, 0, 0,
- 15, 15, 0, 15, 15, 15, 15, 15, 17, 17,
- 0, 0, 0, 17, 0, 0, 17, 17, 0, 17,
- 17, 17, 17, 17, 22, 22, 0, 0, 0, 22,
- 0, 0, 22, 0, 0, 22, 22, 22, 22, 22,
- 26, 26, 0, 0, 0, 26, 0, 0, 26, 26,
- 0, 15, 26, 26, 26, 26, 27, 27, 0, 0,
- 15, 27, 15, 0, 27, 27, 15, 0, 27, 27,
- 27, 27, 34, 0, 0, 0, 34, 0, 0, 34,
- 34, 0, 34, 34, 34, 34, 34, 17, 17, 0,
- 17, 17, 0, 0, 17, 44, 17, 17, 17, 17,
- 0, 0, 17, 17, 17, 0, 17, 0, 17, 0,
- 0, 17, 17, 0, 17, 17, 17, 17,
+ 17, 9, 9, 9, 9, 9, 9, 17, 17, 0,
+ 17, 0, 17, 0, 0, 17, 17, 0, 17, 17,
+ 17, 17, 17, 17, 15, 15, 0, 0, 0, 15,
+ 0, 0, 15, 15, 0, 15, 15, 15, 15, 15,
+ 15, 17, 17, 0, 0, 0, 17, 0, 0, 17,
+ 17, 0, 17, 17, 17, 17, 17, 17, 17, 0,
+ 17, 0, 17, 0, 0, 17, 17, 0, 17, 17,
+ 17, 17, 17, 17, 0, 17, 0, 0, 0, 17,
+ 0, 17, 0, 17, 17, 17, 17, 17, 17, 17,
+ 0, 0, 17, 0, 0, 0, 45, 0, 17, 0,
+ 17, 17, 17, 17, 17, 17, 22, 22, 0, 0,
+ 0, 22, 0, 0, 22, 0, 0, 22, 22, 22,
+ 22, 22, 22, 26, 26, 0, 0, 0, 26, 0,
+ 0, 26, 26, 0, 0, 26, 26, 26, 26, 26,
+ 27, 27, 0, 0, 0, 27, 0, 0, 27, 27,
+ 0, 0, 27, 27, 27, 27, 27, 34, 0, 0,
+ 0, 34, 0, 0, 34, 34, 15, 34, 34, 34,
+ 34, 34, 34, 0, 0, 15, 0, 15, 15, 15,
+ 15, 15, 15, 37, 37, 0, 0, 0, 37, 0,
+ 0, 37, 37, 0, 37, 0, 0, 0, 37,
};
protected static readonly short [] yyCheck = { 25,
- 0, 43, 260, 0, 10, 15, 16, 13, 261, 15,
- 16, 260, 272, 273, 274, 268, 0, 275, 11, 12,
- 13, 14, 15, 16, 17, 14, 275, 69, 17, 55,
- 262, 37, 0, 262, 67, 45, 69, 70, 263, 45,
- 46, 258, 267, 36, 77, 78, 79, 80, 0, 42,
- 261, 84, 45, 42, 265, 272, 264, 63, 266, 262,
- 262, 262, 262, 262, 0, 91, 262, 258, 74, 267,
- 260, 259, 258, 258, 263, 258, 269, 261, 270, 261,
- 0, 268, 258, 260, 0, 65, 85, 78, 268, 94,
- 271, 0, 271, 268, -1, 74, 0, 270, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 0, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 0, 0, -1,
+ 0, 10, 43, 0, 13, 60, 15, 16, 11, 12,
+ 13, 14, 15, 16, 17, 14, 258, 0, 17, 15,
+ 16, 260, 263, 260, 79, 260, 267, 258, 37, 55,
+ 272, 72, 262, 36, 0, 262, 45, 46, 275, 42,
+ 275, 262, 45, 42, 262, 67, 261, 69, 70, 45,
+ 264, 0, 266, 268, 63, 77, 78, 79, 80, 272,
+ 273, 274, 84, 276, 262, 74, 261, 0, 94, 262,
+ 265, 262, 262, 267, 259, 263, 258, 258, 258, 268,
+ 0, 268, 0, 261, 261, 269, 258, 270, 65, 260,
+ 82, 86, 271, 268, 74, 271, 270, -1, -1, 0,
+ -1, -1, -1, 97, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -851,24 +865,30 @@ void case_49()
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 261, -1, 263, 264, 265, 266, 267, 268, 269,
- 267, 271, 272, 273, 274, 275, 260, 261, -1, 263,
- -1, 265, -1, -1, 268, 269, -1, 271, 272, 273,
- 274, 275, 260, 261, -1, -1, -1, 265, -1, -1,
- 268, 269, -1, 271, 272, 273, 274, 275, 260, 261,
- -1, -1, -1, 265, -1, -1, 268, 269, -1, 271,
- 272, 273, 274, 275, 260, 261, -1, -1, -1, 265,
- -1, -1, 268, -1, -1, 271, 272, 273, 274, 275,
+ 267, 271, 272, 273, 274, 275, 276, 260, 261, -1,
+ 263, -1, 265, -1, -1, 268, 269, -1, 271, 272,
+ 273, 274, 275, 276, 260, 261, -1, -1, -1, 265,
+ -1, -1, 268, 269, -1, 271, 272, 273, 274, 275,
+ 276, 260, 261, -1, -1, -1, 265, -1, -1, 268,
+ 269, -1, 271, 272, 273, 274, 275, 276, 261, -1,
+ 263, -1, 265, -1, -1, 268, 269, -1, 271, 272,
+ 273, 274, 260, 276, -1, 263, -1, -1, -1, 267,
+ -1, 269, -1, 271, 272, 273, 274, 275, 276, 260,
+ -1, -1, 263, -1, -1, -1, 267, -1, 269, -1,
+ 271, 272, 273, 274, 275, 276, 260, 261, -1, -1,
+ -1, 265, -1, -1, 268, -1, -1, 271, 272, 273,
+ 274, 275, 276, 260, 261, -1, -1, -1, 265, -1,
+ -1, 268, 269, -1, -1, 272, 273, 274, 275, 276,
260, 261, -1, -1, -1, 265, -1, -1, 268, 269,
- -1, 260, 272, 273, 274, 275, 260, 261, -1, -1,
- 269, 265, 271, -1, 268, 269, 275, -1, 272, 273,
- 274, 275, 261, -1, -1, -1, 265, -1, -1, 268,
- 269, -1, 271, 272, 273, 274, 275, 260, 260, -1,
- 263, 263, -1, -1, 267, 267, 269, 269, 271, 271,
- -1, -1, 275, 275, 261, -1, 263, -1, 265, -1,
- -1, 268, 269, -1, 271, 272, 273, 274,
+ -1, -1, 272, 273, 274, 275, 276, 261, -1, -1,
+ -1, 265, -1, -1, 268, 269, 260, 271, 272, 273,
+ 274, 275, 276, -1, -1, 269, -1, 271, 272, 273,
+ 274, 275, 276, 260, 261, -1, -1, -1, 265, -1,
+ -1, 268, 269, -1, 271, -1, -1, -1, 275,
};
-#line 262 "Monodoc.Ecma/EcmaUrlParser.jay"
+#line 265 "Monodoc.Ecma/EcmaUrlParser.jay"
+
}
#line default
@@ -967,6 +987,7 @@ namespace yydebug {
public const int REF_ARG = 273;
public const int OUT_ARG = 274;
public const int EXPLICIT_IMPL_SEP = 275;
+ public const int QUESTION_MARK = 276;
public const int yyErrorCode = 256;
}
namespace yyParser {
diff --git a/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs b/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs
index 8e27bc08..c61c478e 100644
--- a/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs
+++ b/monodoc/Test/Monodoc.Ecma/EcmaUrlTests.cs
@@ -220,6 +220,32 @@ namespace MonoTests.Monodoc.Ecma
}
[Test]
+ public void NullableTypeStringSimpleTest()
+ {
+ string stringCref = "T:System.String?";
+ var desc = parser.Parse(stringCref);
+ Assert.AreEqual(EcmaDesc.Mod.Nullable, desc.DescModifier);
+ string generatedEcmaCref = desc.ToEcmaCref();
+ Assert.AreEqual(stringCref, generatedEcmaCref);
+ }
+
+ [Test]
+ public void NullableTypeStringArrayTest()
+ {
+ string stringCref = "T:System.String?[]";
+ var desc = parser.Parse(stringCref);
+ Assert.AreEqual(EcmaDesc.Mod.Nullable, desc.DescModifier);
+ string generatedEcmaCref = desc.ToEcmaCref();
+ Assert.AreEqual(stringCref, generatedEcmaCref);
+
+ stringCref = "T:System.String[]?";
+ desc = parser.Parse(stringCref);
+ Assert.AreEqual(EcmaDesc.Mod.Nullable, desc.ArrayModifier);
+ generatedEcmaCref = desc.ToEcmaCref();
+ Assert.AreEqual(stringCref, generatedEcmaCref);
+ }
+
+ [Test]
public void MetaEtcNodeTest ()
{
var ast = new EcmaDesc () { DescKind = EcmaDesc.Kind.Type,
diff --git a/monodoc/monodoc.csproj b/monodoc/monodoc.csproj
index b4e7f507..875e1496 100644
--- a/monodoc/monodoc.csproj
+++ b/monodoc/monodoc.csproj
@@ -710,5 +710,8 @@
<Name>ICSharpCode.SharpZipLib</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="Monodoc.Ecma\EcmaUrlParser.jay" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file