C# Class MpcLib.Common.FiniteField.Circuits.Parser

Mostra file Open project: mahdiz/mpclib

Public Methods

Method Description
CreateCircuit ( int prime, IList inputs ) : Circuit
Parse ( ) : void
Parser ( FunctionType type, int numPlayers, int prime ) : System
Parser ( string pathOrString, int prime ) : System

Private Methods

Method Description
BuildCircuitDef ( FunctionType type, int numPlayers ) : string
CheckParanthesisSyntax ( string line ) : void
CheckVariableSynthax ( string @var ) : void
CreateAddGates ( string line, Wire firstWire ) : Wire
CreateEqualsGate ( string line ) : Wire
CreateEqualsGate ( string line, Wire firstWire ) : Wire
CreateMulGate ( Wire firstWireOrNull, System.Operation firstOpOrNull, string line ) : Wire
CreateMulGates ( Wire firstWireOrNull, System.Operation firstOpOrNull, string line ) : Wire
CreateParenthesesWire ( string line, bool keepCalculating ) : Wire
FindCorrectIndex ( string line, SearchFor searchFor ) : int
FindEndingParantheses ( string line ) : int
GetFirstParamterIndex ( string line ) : int
GetFixedIndex ( int index ) : int
GetIndexOfMinusOrPlus ( string line, int fromIndex ) : int
GetLineType ( string line ) : LineType
GetOperation ( string str ) : System.Operation
GetWireFromCondition ( string line ) : Wire
GetWireFromCondition ( string line, Wire conditionWire ) : Wire
GetWireFromExpression ( string line ) : Wire
GetWireFromString ( string st ) : Wire
IsTargetInGates ( IList gates, Wire outputWire ) : bool
ReadFormula ( string line ) : bool
ReadInputOutputDecleration ( string line, bool isInput ) : bool
ReadLine ( string line ) : void
SetGate ( IList inputWires, Wire outputWire, System.Operation op ) : void
SplitMul ( string line, IList operands, IList operations ) : void
getIndexOfDivOrMul ( string line, int fromIndex ) : int

Method Details

CreateCircuit() public method

public CreateCircuit ( int prime, IList inputs ) : Circuit
prime int
inputs IList
return Circuit

Parse() public method

public Parse ( ) : void
return void

Parser() public method

public Parser ( FunctionType type, int numPlayers, int prime ) : System
type FunctionType
numPlayers int
prime int
return System

Parser() public method

public Parser ( string pathOrString, int prime ) : System
pathOrString string
prime int
return System