Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for lex (0.02 sec)

  1. src/cmd/asm/internal/lex/lex.go

    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Package lex implements lexical analysis for the assembler.
    package lex
    
    import (
    	"fmt"
    	"log"
    	"os"
    	"strings"
    	"text/scanner"
    
    	"cmd/internal/src"
    )
    
    // A ScanToken represents an input item. It is a simple wrapping of rune, as
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 18:31:05 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. src/text/template/parse/lex.go

    	state := lexText
    	if l.insideAction {
    		state = lexInsideAction
    	}
    	for {
    		state = state(l)
    		if state == nil {
    			return l.item
    		}
    	}
    }
    
    // lex creates a new scanner for the input string.
    func lex(name, input, left, right string) *lexer {
    	if left == "" {
    		left = leftDelim
    	}
    	if right == "" {
    		right = rightDelim
    	}
    	l := &lexer{
    		name:         name,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 04 22:36:12 UTC 2022
    - 18.1K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/parse.go

    	//	">>" == 1
    	//	"->" == 2
    	//	"@>" == 3
    	r1, ok := p.registerReference(name)
    	if !ok {
    		return 0
    	}
    	var op int16
    	switch p.next().ScanToken {
    	case lex.LSH:
    		op = 0
    	case lex.RSH:
    		op = 1
    	case lex.ARR:
    		op = 2
    	case lex.ROT:
    		// following instructions on ARM64 support rotate right
    		// AND, ANDS, TST, BIC, BICS, EON, EOR, ORR, MVN, ORN
    		op = 3
    	}
    	tok := p.next()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 14:34:57 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  4. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/execution/LexerTest.kt

    import org.hamcrest.MatcherAssert.assertThat
    
    import org.junit.Test
    
    
    class LexerTest {
    
        @Test
        fun `extracts comments, annotations and top-level blocks`() {
    
            assertThat(
                lex(
                    "/* ... @TaskAction ... */" +
                        "\n// ... @Suppress(\"unused_variable\")" +
                        "\nbuildscript { /*" +
                        "\n ... */" +
                        "\n}" +
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/pseudo_test.go

    // license that can be found in the LICENSE file.
    
    package asm
    
    import (
    	"strings"
    	"testing"
    
    	"cmd/asm/internal/lex"
    )
    
    func tokenize(s string) [][]lex.Token {
    	res := [][]lex.Token{}
    	if len(s) == 0 {
    		return res
    	}
    	for _, o := range strings.Split(s, ",") {
    		res = append(res, lex.Tokenize(o))
    	}
    	return res
    }
    
    func TestErroneous(t *testing.T) {
    
    	type errtest struct {
    		pseudo   string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 07:48:38 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    		}
    	}
    	in.token.text = text
    	in.token.endPos = in.pos
    }
    
    // peek returns the kind of the next token returned by lex.
    func (in *input) peek() tokenKind {
    	return in.token.kind
    }
    
    // lex is called from the parser to obtain the next input token.
    func (in *input) lex() token {
    	tok := in.token
    	in.readToken()
    	return tok
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/expr_test.go

    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package asm
    
    import (
    	"cmd/asm/internal/lex"
    	"strings"
    	"testing"
    	"text/scanner"
    )
    
    type exprTest struct {
    	input  string
    	output int64
    	atEOF  bool
    }
    
    var exprTests = []exprTest{
    	// Simple
    	{"0", 0, true},
    	{"3", 3, true},
    	{"070", 8 * 7, true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 07:48:38 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  8. internal/s3select/sql/parser_test.go

    	// s := bytes.NewBuffer([]byte("s.['name'].*.[*].abc.[\"abc\"]"))
    	s := bytes.NewBuffer([]byte("S3Object.words.*.id"))
    	// s := bytes.NewBuffer([]byte("COUNT(Id)"))
    	lex, err := sqlLexer.Lex(s)
    	if err != nil {
    		t.Fatal(err)
    	}
    	tokens, err := lexer.ConsumeAll(lex)
    	if err != nil {
    		t.Fatal(err)
    	}
    	// for i, t := range tokens {
    	// 	fmt.Printf("%d: %#v\n", i, t)
    	// }
    	if len(tokens) != 7 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  9. src/text/template/parse/parse.go

    		}
    		*errp = e.(error)
    	}
    }
    
    // startParse initializes the parser, using the lexer.
    func (t *Tree) startParse(funcs []map[string]any, lex *lexer, treeSet map[string]*Tree) {
    	t.Root = nil
    	t.lex = lex
    	t.vars = []string{"$"}
    	t.funcs = funcs
    	t.treeSet = treeSet
    	lex.options = lexOptions{
    		emitComment: t.Mode&ParseComments != 0,
    		breakOK:     !t.hasFunction("break"),
    		continueOK:  !t.hasFunction("continue"),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/asm/line_test.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package asm
    
    import (
    	"cmd/asm/internal/lex"
    	"strings"
    	"testing"
    )
    
    type badInstTest struct {
    	input, error string
    }
    
    func TestAMD64BadInstParser(t *testing.T) {
    	testBadInstParser(t, "amd64", []badInstTest{
    		// Test AVX512 suffixes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 07:48:38 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top