Ejemplo n.º 1
0
 private static ParseResult Match_QuotedChar(InputStream input)
 {
     return(ParseBuilder.WithAction(
                ParseBuilder.Sequence(Match_Backslash, ParseBuilder.Any),
                result =>
     {
         string ch = new SequenceResult(result)[1].MatchedString;
         return new ParseResult(ch);
     })(input));
 }
Ejemplo n.º 2
0
        public static TypeNameInfo Parse(string typeName)
        {
            var input = new InputStream(typeName);

            ParseResult result = Sequence(Match_TypeName, EOF)(input);

            if (!result.Matched)
            {
                return(null);
            }

            var typeNameResult = new SequenceResult(result)[0];

            return((TypeNameInfo)typeNameResult.ResultData);
        }