Documentation ¶
Overview ¶
Copyright 2018 storyicon@foxmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 storyicon@foxmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 storyicon@foxmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 storyicon@foxmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func Compile(expr []byte) (*kernel.Graph, error)
- type Iterator
- func (iter *Iterator) Read() (parser *kernel.Graph)
- func (iter *Iterator) ReadArray() (nodes []*kernel.GraphNode)
- func (iter *Iterator) ReadChildren() (childType int, children []*kernel.GraphNode)
- func (iter *Iterator) ReadFuncName() (name string)
- func (iter *Iterator) ReadNode() (node *kernel.GraphNode)
- func (iter *Iterator) ReadNodeName() (name string)
- func (iter *Iterator) ReadObject() (nodes []*kernel.GraphNode)
- func (iter *Iterator) ReadObjectArray() (nodes []*kernel.GraphNode)
- func (iter *Iterator) ReadPipeline() *pipeline.Pipeline
- func (iter *Iterator) ReadPipelines() (pipelines pipeline.Pipelines)
- func (iter *Iterator) ReadStringTuple() (args []string)
- func (iter *Iterator) ReportError(operation string, msg string)
- func (iter *Iterator) ReportMismatchChar(operation string, expect byte, appear byte)
- func (iter *Iterator) ReportUnExpectedChar(operation string, appear byte)
- func (iter *Iterator) WhatIsNext() SignalType
- func (iter *Iterator) WhatIsNextByte() byte
- type SignalType
Constants ¶
const ( // SignalInvalid identifies unrecognized signals SignalInvalid = iota // SignalName identifies the beginning of the function name and key name SignalName // SignalPipeline identifies the beginning of the pipeline SignalPipeline // SignalObject identifies the beginning of the object SignalObject // SignalArray identifies the beginning of the array SignalArray )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Iterator ¶
type Iterator struct { Error error // contains filtered or unexported fields }
Iterator is a io.Reader like object, with specific read functions.
func ParseBytes ¶
ParseBytes creates an Iterator instance from byte array
func (*Iterator) ReadChildren ¶
ReadChildren attempts to read node children from the byte stream
func (*Iterator) ReadFuncName ¶
ReadFuncName attempts to read function name from the byte stream
func (*Iterator) ReadNodeName ¶
ReadNodeName attempts to read a continuous node name from the byte stream.
func (*Iterator) ReadObject ¶
ReadObject attempts to read object from the byte stream
func (*Iterator) ReadObjectArray ¶
ReadObjectArray attempts to read a object array from the byte stream.
func (*Iterator) ReadPipeline ¶
ReadPipeline attempts to read pipeline from the byte stream
func (*Iterator) ReadPipelines ¶
ReadPipelines attempts to read pipelines from the byte stream
func (*Iterator) ReadStringTuple ¶
ReadStringTuple attempts to read function arguments from the byte stream
func (*Iterator) ReportError ¶
ReportError record a error in iterator instance with current position.
func (*Iterator) ReportMismatchChar ¶
ReportMismatchChar report an error that does not match the expected character.
func (*Iterator) ReportUnExpectedChar ¶
ReportUnExpectedChar reports an error of "unexpected character".
func (*Iterator) WhatIsNext ¶
func (iter *Iterator) WhatIsNext() SignalType
WhatIsNext gets ValueType of relatively next element
func (*Iterator) WhatIsNextByte ¶
WhatIsNextByte gets byte of relatively next element