Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lumiera::advice::anonymous_namespace{binding.cpp} Namespace Reference

Functions

regex findPredicate ("\\s*"+matchSym+"("+matchArg+")?\\s*,?")
 sym(arg), groups: [symbol, parenthesis, argument symbol]
 
uint detectArity (smatch const &match)
 detect the arity of an predicate, as matched by findPredicate.
 

Variables

const string matchSym = "(\\w+(?:[\\.\\-]\\w+)*)"
 
const string matchArg = "\\‍(\\s*"+matchSym+"?\\s*\\‍)"
 

Function Documentation

◆ findPredicate()

regex findPredicate ( "\\s*"+matchSym+"("+matchArg+")?\\s*  ,
?"   
)

sym(arg), groups: [symbol, parenthesis, argument symbol]

References findPredicate().

Referenced by findPredicate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ detectArity()

uint detectArity ( smatch const &  match)
inline

detect the arity of an predicate, as matched by findPredicate.

Currently, we don't really parse predicate logic notation and thus we just distinguish nullary predicates (no argument) and predicates with one single constant argument.

Definition at line 65 of file common/advice/binding.cpp.

References detectArity().

Referenced by detectArity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ matchSym

const string matchSym = "(\\w+(?:[\\.\\-]\\w+)*)"

Definition at line 56 of file common/advice/binding.cpp.

◆ matchArg

const string matchArg = "\\‍(\\s*"+matchSym+"?\\s*\\‍)"

Definition at line 57 of file common/advice/binding.cpp.