- Timestamp:
- 10/22/13 19:23:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Util.cs
r10067 r10079 26 26 public class Util { 27 27 // simplistic regex for formal parameters, any string of non-whitespace and not comma characters is allowed as a type name 28 // this has to be changed to allow for e.g., generic types (S<T0, T1>) and for expressions in actual parameters (max(x, 0) + 1)) 28 29 private static string refOrOutGroup = @"(?:(?<refOrOut>(out|ref))\s+)"; // "ref " | "out " 29 private static string typeGroup = @"(?:(?<type>[^ ,\f\n\r\t\v]*)\s+)";30 private static string identGroup = @"(?<id>[ \w]+)\s*";30 private static string typeGroup = @"(?:(?<type>[^,]+)\s+)"; 31 private static string identGroup = @"(?<id>[^,]+)\s*"; 31 32 private static Regex formalParameterExpr = new Regex(@"\s*,?\s*" + refOrOutGroup + "?" + typeGroup + "?" + identGroup, RegexOptions.ECMAScript); 32 33 public static IEnumerable<TerminalNode.FieldDefinition> ExtractParameters(string formalParameterSrc) {
Note: See TracChangeset
for help on using the changeset viewer.