- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for parsers (0.15 sec)
-
src/cmd/cgo/ast.go
// license that can be found in the LICENSE file. // Parse input AST and prepare Prog structure. package main import ( "fmt" "go/ast" "go/format" "go/parser" "go/scanner" "go/token" "os" "strings" ) func parse(name string, src []byte, flags parser.Mode) *ast.File { ast1, err := parser.ParseFile(fset, name, src, flags) if err != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jun 07 16:54:27 GMT 2023 - 14.3K bytes - Viewed (0) -
src/cmd/asm/internal/asm/pseudo_test.go
// Note these errors should be independent of the architecture. // Just run the test with amd64. parser := newParser("amd64") var buf strings.Builder parser.errorWriter = &buf for _, cat := range testcats { for _, test := range cat.tests { parser.allowABI = cat.allowABI parser.errorCount = 0 parser.lineNum++ if !parser.pseudo(test.pseudo, tokenize(test.operands)) { t.Fatalf("Wrong pseudo-instruction: %s", test.pseudo)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 3.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/operand_test.go
parser.allowABI = true testOperandParser(t, parser, amd64RuntimeOperandTests) testBadOperandParser(t, parser, amd64BadOperandRuntimeTests) } func Test386OperandParser(t *testing.T) { parser := newParser("386") testOperandParser(t, parser, x86OperandTests) } func TestARMOperandParser(t *testing.T) { parser := newParser("arm") testOperandParser(t, parser, armOperandTests)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 18:31:05 GMT 2023 - 23.9K bytes - Viewed (0) -
src/cmd/cgo/doc.go
decide which. The obvious thing for cgo to do is to process the preamble, expanding #includes and processing the corresponding C code. That would require a full C parser and type checker that was also aware of any extensions known to the system compiler (for example, all the GNU C extensions) as well as the system-specific header locations and system-specific
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
p.start(op) if name, abi, ok := p.funcAddress(); ok { fmt.Fprintf(w, "ref %s %s\n", name, abi) } } } func (p *Parser) start(operand []lex.Token) { p.input = operand p.inputPos = 0 } // address parses the operand into a link address structure. func (p *Parser) address(operand []lex.Token) obj.Addr { p.start(operand) addr := obj.Addr{} p.operand(&addr) return addr }
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) -
src/archive/tar/strconv.go
b = append(b, byte(c)) } } return string(b) } type parser struct { err error // Last error seen } type formatter struct { err error // Last error seen } // parseString parses bytes as a NUL-terminated C-style string. // If a NUL byte is not found then the whole slice is returned as a string. func (*parser) parseString(b []byte) string { if i := bytes.IndexByte(b, 0); i >= 0 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 01 14:28:42 GMT 2023 - 9K bytes - Viewed (0) -
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) -
src/cmd/asm/internal/arch/arm.go
if prog.As == arm.AB { prog.As = bcode[(bits^arm.C_SCOND_XOR)&0xf] bits = (bits &^ 0xf) | arm.C_SCOND_NONE } prog.Scond = bits return true } // ParseARMCondition parses the conditions attached to an ARM instruction. // The input is a single string consisting of period-separated condition // codes, such as ".P.W". An initial period is ignored. func ParseARMCondition(cond string) (uint8, bool) {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Nov 18 17:59:44 GMT 2022 - 6.1K bytes - Viewed (0) -
src/cmd/asm/internal/asm/expr_test.go
{"3 x", 3, false}, // Big number {"4611686018427387904", 4611686018427387904, true}, } func TestExpr(t *testing.T) { p := NewParser(nil, nil, nil) // Expression evaluation uses none of these fields of the parser. for i, test := range exprTests { p.start(lex.Tokenize(test.input)) result := int64(p.expr()) if result != test.output { t.Errorf("%d: %q evaluated to %d; expected %d", i, test.input, result, test.output) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 3.2K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
n.Const = fmt.Sprintf("%#x", i) } else if n.Define[0] == '\'' { if _, err := parser.ParseExpr(n.Define); err == nil { n.Kind = "iconst" n.Const = n.Define } } else if n.Define[0] == '"' { if _, err := parser.ParseExpr(n.Define); err == nil { n.Kind = "sconst" n.Const = n.Define } } if n.IsConst() { continue
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0)