Skip to content

Commit

Permalink
Add copyright headers to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Aug 21, 2018
1 parent 9cfbc17 commit 2609237
Show file tree
Hide file tree
Showing 128 changed files with 520 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ast/asdl_go.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#! /usr/bin/env python

# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""Generate Go code from an ASDL description."""

# TO DO
Expand Down
4 changes: 4 additions & 0 deletions ast/ast.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 ast

// FIXME make base AstNode with position in
Expand Down
5 changes: 5 additions & 0 deletions ast/asttest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3

# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""
Do some ast stuff
"""
Expand Down
4 changes: 4 additions & 0 deletions ast/dump.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 ast

import (
Expand Down
4 changes: 4 additions & 0 deletions ast/dump_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 ast

import (
Expand Down
4 changes: 4 additions & 0 deletions ast/walk.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 ast

import "fmt"
Expand Down
4 changes: 4 additions & 0 deletions ast/walk_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 ast

import (
Expand Down
4 changes: 4 additions & 0 deletions builtin/builtin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Built-in functions
package builtin

Expand Down
4 changes: 4 additions & 0 deletions builtin/builtin_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 builtin_test

import (
Expand Down
4 changes: 4 additions & 0 deletions builtin/tests/builtin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

doc="abs"
assert abs(0) == 0
assert abs(10) == 10
Expand Down
4 changes: 4 additions & 0 deletions builtin/tests/lib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# Some targets to be imported

def libfn():
Expand Down
4 changes: 4 additions & 0 deletions compile/compile.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// compile python code
package compile

Expand Down
4 changes: 4 additions & 0 deletions compile/compile_data_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Test data generated by make_compile_test.py - do not edit

package compile
Expand Down
4 changes: 4 additions & 0 deletions compile/compile_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 compile

// See FIXME for tests that need to be re-instanted
Expand Down
5 changes: 5 additions & 0 deletions compile/diffdis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3.4

# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# Diff two bytecode strings

import sys
Expand Down
4 changes: 4 additions & 0 deletions compile/instructions.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 compile

import "github.com/go-python/gpython/vm"
Expand Down
4 changes: 4 additions & 0 deletions compile/instructions_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 compile

import (
Expand Down
4 changes: 4 additions & 0 deletions compile/legacy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 compile

import (
Expand Down
5 changes: 5 additions & 0 deletions compile/make_compile_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3.4

# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""
Write compile_data_test.go
"""
Expand Down
4 changes: 4 additions & 0 deletions examples/pi_chudnovsky_bs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""
Python3 program to calculate Pi using python long integers, binary
splitting and the Chudnovsky algorithm
Expand Down
4 changes: 4 additions & 0 deletions importlib/importlib.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Frozen version of importlib/_bootstrap.py

package py
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Gpython binary

package main
Expand Down
4 changes: 4 additions & 0 deletions marshal/marshal.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Implement unmarshal and marshal
package marshal

Expand Down
4 changes: 4 additions & 0 deletions math/math.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/* Math module -- standard C math library functions, pi and e */
package math

Expand Down
4 changes: 4 additions & 0 deletions math/math_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 math_test

import (
Expand Down
4 changes: 4 additions & 0 deletions math/tests/libtest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""
Simple test harness
"""
Expand Down
4 changes: 4 additions & 0 deletions math/tests/libulp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

try:
from math import to_ulps
except ImportError:
Expand Down
4 changes: 4 additions & 0 deletions math/tests/math.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# Converted from cpython/Lib/test/test_math.py
# FIXME ignoring ./Lib/test/math_testcases.txt, /Lib/test/cmath_testcases.txt for the moment
#
Expand Down
4 changes: 4 additions & 0 deletions math/tests/testcases.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# Testcases for functions in math.
#
# Each line takes the form:
Expand Down
4 changes: 4 additions & 0 deletions parser/grammar.y
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 parser
Expand Down
4 changes: 4 additions & 0 deletions parser/grammar_data_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Test data generated by make_grammar_test.py - do not edit

package parser
Expand Down
4 changes: 4 additions & 0 deletions parser/grammar_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 parser

//go:generate ./make_grammar_test.py
Expand Down
4 changes: 4 additions & 0 deletions parser/lexer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 parser

// FIXME need to implement formfeed
Expand Down
4 changes: 4 additions & 0 deletions parser/lexer_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 parser

import (
Expand Down
5 changes: 5 additions & 0 deletions parser/make_grammar_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3.4

# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""
Write grammar_data_test.go
"""
Expand Down
4 changes: 4 additions & 0 deletions parser/parser.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file holds the go generate command to run yacc on the grammar in grammar.y.
// To build y.go:
// % go generate
Expand Down
4 changes: 4 additions & 0 deletions parser/stringescape.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 parser

import (
Expand Down
4 changes: 4 additions & 0 deletions parser/stringescape_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 parser

import (
Expand Down
5 changes: 5 additions & 0 deletions parser/testparser/py3compile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3

# Copyright 2018 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

"""
Compile any files passed in on the command line
"""
Expand Down
4 changes: 4 additions & 0 deletions parser/testparser/testparser.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python 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 main

import (
Expand Down
4 changes: 4 additions & 0 deletions parser/y.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//line grammar.y:2
package parser

Expand Down
4 changes: 4 additions & 0 deletions py/args.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Argument parsing for Go functions called by python
//
// These functions are useful when creating your own extensions
Expand Down
4 changes: 4 additions & 0 deletions py/arithmetic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Automatically generated - DO NOT EDIT
// Regenerate with: go generate

Expand Down
4 changes: 4 additions & 0 deletions py/bigint.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// BigInt objects

package py
Expand Down
4 changes: 4 additions & 0 deletions py/bool.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Bool objects

package py
Expand Down
4 changes: 4 additions & 0 deletions py/boundmethod.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// BoundMethod object
//
// Combines an object and a callable
Expand Down
4 changes: 4 additions & 0 deletions py/bytes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Bytes objects

package py
Expand Down
4 changes: 4 additions & 0 deletions py/cell.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2018 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Cell object
//
// In the Go implementation this is just a pointer to an Object which
Expand Down
Loading

0 comments on commit 2609237

Please sign in to comment.