Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for parse (0.22 sec)

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

    	p.errorCount++
    	if p.errorCount > 10 && !*flags.AllErrors {
    		log.Fatal("too many errors")
    	}
    }
    
    func (p *Parser) pos() src.XPos {
    	return p.ctxt.PosTable.XPos(src.MakePos(p.lex.Base(), uint(p.lineNum), 0))
    }
    
    func (p *Parser) Parse() (*obj.Prog, bool) {
    	scratch := make([][]lex.Token, 0, 3)
    	for {
    		word, cond, operands, ok := p.line(scratch)
    		if !ok {
    			break
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/line_test.go

    	for i, test := range tests {
    		arch, ctxt := setArch(goarch)
    		tokenizer := lex.NewTokenizer("", strings.NewReader(test.input+"\n"), nil)
    		parser := NewParser(ctxt, arch, tokenizer)
    
    		err := tryParse(t, func() {
    			parser.Parse()
    		})
    
    		switch {
    		case err == nil:
    			t.Errorf("#%d: %q: want error %q; have none", i, test.input, test.error)
    		case !strings.Contains(err.Error(), test.error):
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/flags/flags.go

    	(*m) = append(*m, val)
    	return nil
    }
    
    func Usage() {
    	fmt.Fprintf(os.Stderr, "usage: asm [options] file.s ...\n")
    	fmt.Fprintf(os.Stderr, "Flags:\n")
    	flag.PrintDefaults()
    	os.Exit(2)
    }
    
    func Parse() {
    	objabi.Flagparse(Usage)
    	if flag.NArg() == 0 {
    		flag.Usage()
    	}
    
    	// Flag refinement.
    	if *OutputFile == "" {
    		if flag.NArg() != 1 {
    			flag.Usage()
    		}
    		input := filepath.Base(flag.Arg(0))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 22 19:18:23 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/lex/input.go

    	if len(in.ifdefStack) == 0 {
    		in.Error("unmatched #endif")
    	}
    	in.ifdefStack = in.ifdefStack[:len(in.ifdefStack)-1]
    }
    
    // #include processing.
    func (in *Input) include() {
    	// Find and parse string.
    	tok := in.Stack.Next()
    	if tok != scanner.String {
    		in.expectText("expected string after #include")
    	}
    	name, err := strconv.Unquote(in.Stack.Text())
    	if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/endtoend_test.go

    )
    
    // An end-to-end test for the assembler: Do we print what we parse?
    // Output is generated by, in effect, turning on -S and comparing the
    // result against a golden file.
    
    func testEndToEnd(t *testing.T, goarch, file string) {
    	input := filepath.Join("testdata", file+".s")
    	architecture, ctxt := setArch(goarch)
    	architecture.Init(ctxt)
    	lexer := lex.NewLexer(input)
    	parser := NewParser(ctxt, architecture, lexer)
    	pList := new(obj.Plist)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  6. src/cmd/asm/main.go

    		lexer := lex.NewLexer(f)
    		parser := asm.NewParser(ctxt, architecture, lexer)
    		ctxt.DiagFunc = func(format string, args ...interface{}) {
    			diag = true
    			log.Printf(format, args...)
    		}
    		if *flags.SymABIs {
    			ok = parser.ParseSymABIs(buf)
    		} else {
    			pList := new(obj.Plist)
    			pList.Firstpc, ok = parser.Parse()
    			// reports errors to parser.Errorf
    			if ok {
    				obj.Flushplist(ctxt, pList, nil)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/lex/lex.go

    type Macro struct {
    	name   string   // The #define name.
    	args   []string // Formal arguments.
    	tokens []Token  // Body of macro.
    }
    
    // Tokenize turns a string into a list of Tokens; used to parse the -D flag and in tests.
    func Tokenize(str string) []Token {
    	t := NewTokenizer("command line", strings.NewReader(str), nil)
    	var tokens []Token
    	for {
    		tok := t.Next()
    		if tok == scanner.EOF {
    			break
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  8. api/go1.1.txt

    pkg text/template/parse, const NodeIf = 10
    pkg text/template/parse, const NodeList = 11
    pkg text/template/parse, const NodeNil = 12
    pkg text/template/parse, const NodeNil NodeType
    pkg text/template/parse, const NodeNumber = 13
    pkg text/template/parse, const NodePipe = 14
    pkg text/template/parse, const NodeRange = 15
    pkg text/template/parse, const NodeString = 16
    pkg text/template/parse, const NodeTemplate = 17
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Mar 31 20:37:15 GMT 2022
    - 2.6M bytes
    - Viewed (0)
  9. src/bufio/example_test.go

    	}
    	// Output:
    	// 1234
    	// 5678
    	// Invalid input: strconv.ParseInt: parsing "1234567901234567890": value out of range
    }
    
    // Use a Scanner with a custom split function to parse a comma-separated
    // list with an empty final value.
    func ExampleScanner_emptyFinalToken() {
    	// Comma-separated list; last entry is empty.
    	const input = "1,2,3,4,"
    	scanner := bufio.NewScanner(strings.NewReader(input))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  10. api/go1.17.txt

    pkg testing, method (*B) Setenv(string, string)
    pkg testing, method (*T) Setenv(string, string)
    pkg testing, type TB interface, Setenv(string, string)
    pkg text/template/parse, const SkipFuncCheck = 2
    pkg text/template/parse, const SkipFuncCheck Mode
    pkg time, const Layout = "01/02 03:04:05PM '06 -0700"
    pkg time, const Layout ideal-string
    pkg time, func UnixMicro(int64) Time
    pkg time, func UnixMilli(int64) Time
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 17 20:31:46 GMT 2023
    - 18K bytes
    - Viewed (0)
Back to top