Skip to content

Commit

Permalink
xml doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcondon committed Aug 3, 2024
1 parent a1a87e0 commit 5385009
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/SCFirstOrderLogic/SentenceCreation/SentenceParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public class SentenceParser
/// </para>
/// <para>
/// These are combined because we check whether the returned value is among the identifiers of variables
/// that are in scope in order to determine whether something is a variable reference or a constant.
/// If they were separate, you'd end up in the awkward situation where you'd have to bear in mind that
/// "getVariableIdentifier" actually gets called for things that are constants, and for constants two "gets"
/// would end up being performed. Or of course we could offer the ability to customise this determination
/// logic - which feels overcomplicated.
/// that are in scope in order to determine whether something is a variable reference or a zero arity function
/// without parentheses. If they were separate, you'd end up in the awkward situation where you'd have to bear
/// in mind that "getVariableIdentifier" actually gets called for things that are zero arity functions, and for
/// zero arity functions two "gets" would end up being performed. Or of course we could offer the ability to
/// customise this determination logic - which feels overcomplicated.
/// </para>
/// </param>
public SentenceParser(
Expand All @@ -47,7 +47,8 @@ public SentenceParser(
}

/// <summary>
/// Retrieves an instance of a parser that just uses the symbol text as the identifier for returned predicates, functions, constants and variables.
/// Retrieves an instance of a parser that just uses the symbol text as the identifier for returned predicates, functions, and variables.
/// NB: This means that the identifiers for the zero arity functions declared as `f` and as `f()` are identical.
/// </summary>
public static SentenceParser BasicParser { get; } = new SentenceParser(s => s, s => s, s => s);

Expand Down Expand Up @@ -236,7 +237,7 @@ public override Term VisitVariableOrConstant([NotNull] FirstOrderLogicParser.Var
}
else
{
// identifier doesn't match any variable in scope - interpret as a constant
// identifier doesn't match any variable in scope - interpret as a zero arity function
return new Function(identifier);
}
}
Expand Down

0 comments on commit 5385009

Please sign in to comment.