Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for lex (0.06 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. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/execution/TopLevelBlockExtractionTest.kt

        }
    
        private
        fun extractBuildscriptBlockFrom(script: String) =
            lex(script, buildscript).document.topLevelBlocks.singleBlockSectionOrNull()?.wholeRange
    
        private
        fun extractPluginAndPluginManagementBlockFrom(script: String) =
            lex(script, pluginManagement, plugins).document.topLevelBlocks
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  8. src/cmd/asm/main.go

    package main
    
    import (
    	"bufio"
    	"flag"
    	"fmt"
    	"internal/buildcfg"
    	"log"
    	"os"
    
    	"cmd/asm/internal/arch"
    	"cmd/asm/internal/asm"
    	"cmd/asm/internal/flags"
    	"cmd/asm/internal/lex"
    
    	"cmd/internal/bio"
    	"cmd/internal/obj"
    	"cmd/internal/objabi"
    	"cmd/internal/telemetry"
    )
    
    func main() {
    	log.SetFlags(0)
    	log.SetPrefix("asm: ")
    	telemetry.Start()
    
    	buildcfg.Check()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/lex/stack.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
    
    import (
    	"text/scanner"
    
    	"cmd/internal/src"
    )
    
    // A Stack is a stack of TokenReaders. As the top TokenReader hits EOF,
    // it resumes reading the next one down.
    type Stack struct {
    	tr []TokenReader
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 09 22:33:23 UTC 2017
    - 1.2K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/lex/slice.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
    
    import (
    	"text/scanner"
    
    	"cmd/internal/src"
    )
    
    // A Slice reads from a slice of Tokens.
    type Slice struct {
    	tokens []Token
    	base   *src.PosBase
    	line   int
    	pos    int
    }
    
    func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 29 22:49:50 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top