C# 클래스 Microsoft.R.Core.AST.Expressions.Expression

Implements shunting yard algorithm of expression parsing. https://en.wikipedia.org/wiki/Shunting-yard_algorithm
파일 보기 프로젝트 열기: Microsoft/RTVS 1 사용 예제들

공개 메소드들

메소드 설명
Expression ( bool inGroup ) : System.Diagnostics

Constructs an expression that will be parsed as it is inside braces (in a group) so expression parsing will continue even if there is a line break that would normally terminate the expression.

Expression ( string terminatingKeyword ) : System.Diagnostics
Parse ( ParseContext context, IAstNode parent ) : bool
ToString ( ) : string

비공개 메소드들

메소드 설명
CheckEndOfExpression ( ParseContext context, OperationType currentOperationType ) : bool
CreateConstant ( ParseContext context ) : IRValueNode
GetErrorRange ( ParseContext context ) : ITextRange
GetIndexerOrFunctionErrorRange ( ParseContext context, IOperator operatorNode ) : ITextRange
GetOperandErrorRange ( ParseContext context ) : ITextRange
GetOperatorErrorRange ( ParseContext context ) : ITextRange
HandleConstant ( ParseContext context ) : OperationType
HandleIdentifier ( ParseContext context ) : OperationType
HandleKeyword ( ParseContext context, ParseErrorType &errorType ) : OperationType
HandleKeyword ( ParseContext context, string keyword ) : ParseErrorType
HandleLambda ( ParseContext context, ParseErrorType &errorType ) : OperationType
HandleOpenBrace ( ParseContext context, ParseErrorType &errorType ) : OperationType
HandleOperator ( ParseContext context, ParseErrorType &errorType ) : OperationType
HandleOperator ( ParseContext context, IAstNode parent, bool &isUnary ) : ParseErrorType
HandleOperatorPrecedence ( ParseContext context, IOperator currentOperator ) : ParseErrorType
HandleSquareBrackets ( ParseContext context, ParseErrorType &errorType ) : OperationType
IsConsistentOperationSequence ( ParseContext context, OperationType currentOperationType ) : bool
IsTerminatingKeyword ( string s ) : bool
MakeNode ( ParseContext context ) : ParseErrorType

Constructs AST node from operator (root) and one or two operands. In order for the node to be successfully created stacks must contain an operator and, depending on the operator, one or two operands.

ParseExpression ( ParseContext context ) : bool
ProcessHigherPrecendenceOperators ( ParseContext context, IOperator currentOperator ) : ParseErrorType
SafeGetLeftOperand ( IOperator operatorNode ) : IRValueNode
SafeGetOperand ( IOperator operatorNode ) : IRValueNode
SafeGetRightOperand ( IOperator operatorNode ) : IRValueNode

메소드 상세

Expression() 공개 메소드

Constructs an expression that will be parsed as it is inside braces (in a group) so expression parsing will continue even if there is a line break that would normally terminate the expression.
public Expression ( bool inGroup ) : System.Diagnostics
inGroup bool
리턴 System.Diagnostics

Expression() 공개 메소드

public Expression ( string terminatingKeyword ) : System.Diagnostics
terminatingKeyword string
리턴 System.Diagnostics

Parse() 공개 메소드

public Parse ( ParseContext context, IAstNode parent ) : bool
context Microsoft.R.Core.Parser.ParseContext
parent IAstNode
리턴 bool

ToString() 공개 메소드

public ToString ( ) : string
리턴 string