github.com/goplus/igop@v0.25.0/pkg/regexp/syntax/go119_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.19 && !go1.20
     4  // +build go1.19,!go1.20
     5  
     6  package syntax
     7  
     8  import (
     9  	q "regexp/syntax"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "syntax",
    20  		Path: "regexp/syntax",
    21  		Deps: map[string]string{
    22  			"sort":         "sort",
    23  			"strconv":      "strconv",
    24  			"strings":      "strings",
    25  			"unicode":      "unicode",
    26  			"unicode/utf8": "utf8",
    27  		},
    28  		Interfaces: map[string]reflect.Type{},
    29  		NamedTypes: map[string]reflect.Type{
    30  			"EmptyOp":   reflect.TypeOf((*q.EmptyOp)(nil)).Elem(),
    31  			"Error":     reflect.TypeOf((*q.Error)(nil)).Elem(),
    32  			"ErrorCode": reflect.TypeOf((*q.ErrorCode)(nil)).Elem(),
    33  			"Flags":     reflect.TypeOf((*q.Flags)(nil)).Elem(),
    34  			"Inst":      reflect.TypeOf((*q.Inst)(nil)).Elem(),
    35  			"InstOp":    reflect.TypeOf((*q.InstOp)(nil)).Elem(),
    36  			"Op":        reflect.TypeOf((*q.Op)(nil)).Elem(),
    37  			"Prog":      reflect.TypeOf((*q.Prog)(nil)).Elem(),
    38  			"Regexp":    reflect.TypeOf((*q.Regexp)(nil)).Elem(),
    39  		},
    40  		AliasTypes: map[string]reflect.Type{},
    41  		Vars:       map[string]reflect.Value{},
    42  		Funcs: map[string]reflect.Value{
    43  			"Compile":        reflect.ValueOf(q.Compile),
    44  			"EmptyOpContext": reflect.ValueOf(q.EmptyOpContext),
    45  			"IsWordChar":     reflect.ValueOf(q.IsWordChar),
    46  			"Parse":          reflect.ValueOf(q.Parse),
    47  		},
    48  		TypedConsts: map[string]igop.TypedConst{
    49  			"ClassNL":                  {reflect.TypeOf(q.ClassNL), constant.MakeInt64(int64(q.ClassNL))},
    50  			"DotNL":                    {reflect.TypeOf(q.DotNL), constant.MakeInt64(int64(q.DotNL))},
    51  			"EmptyBeginLine":           {reflect.TypeOf(q.EmptyBeginLine), constant.MakeInt64(int64(q.EmptyBeginLine))},
    52  			"EmptyBeginText":           {reflect.TypeOf(q.EmptyBeginText), constant.MakeInt64(int64(q.EmptyBeginText))},
    53  			"EmptyEndLine":             {reflect.TypeOf(q.EmptyEndLine), constant.MakeInt64(int64(q.EmptyEndLine))},
    54  			"EmptyEndText":             {reflect.TypeOf(q.EmptyEndText), constant.MakeInt64(int64(q.EmptyEndText))},
    55  			"EmptyNoWordBoundary":      {reflect.TypeOf(q.EmptyNoWordBoundary), constant.MakeInt64(int64(q.EmptyNoWordBoundary))},
    56  			"EmptyWordBoundary":        {reflect.TypeOf(q.EmptyWordBoundary), constant.MakeInt64(int64(q.EmptyWordBoundary))},
    57  			"ErrInternalError":         {reflect.TypeOf(q.ErrInternalError), constant.MakeString(string(q.ErrInternalError))},
    58  			"ErrInvalidCharClass":      {reflect.TypeOf(q.ErrInvalidCharClass), constant.MakeString(string(q.ErrInvalidCharClass))},
    59  			"ErrInvalidCharRange":      {reflect.TypeOf(q.ErrInvalidCharRange), constant.MakeString(string(q.ErrInvalidCharRange))},
    60  			"ErrInvalidEscape":         {reflect.TypeOf(q.ErrInvalidEscape), constant.MakeString(string(q.ErrInvalidEscape))},
    61  			"ErrInvalidNamedCapture":   {reflect.TypeOf(q.ErrInvalidNamedCapture), constant.MakeString(string(q.ErrInvalidNamedCapture))},
    62  			"ErrInvalidPerlOp":         {reflect.TypeOf(q.ErrInvalidPerlOp), constant.MakeString(string(q.ErrInvalidPerlOp))},
    63  			"ErrInvalidRepeatOp":       {reflect.TypeOf(q.ErrInvalidRepeatOp), constant.MakeString(string(q.ErrInvalidRepeatOp))},
    64  			"ErrInvalidRepeatSize":     {reflect.TypeOf(q.ErrInvalidRepeatSize), constant.MakeString(string(q.ErrInvalidRepeatSize))},
    65  			"ErrInvalidUTF8":           {reflect.TypeOf(q.ErrInvalidUTF8), constant.MakeString(string(q.ErrInvalidUTF8))},
    66  			"ErrMissingBracket":        {reflect.TypeOf(q.ErrMissingBracket), constant.MakeString(string(q.ErrMissingBracket))},
    67  			"ErrMissingParen":          {reflect.TypeOf(q.ErrMissingParen), constant.MakeString(string(q.ErrMissingParen))},
    68  			"ErrMissingRepeatArgument": {reflect.TypeOf(q.ErrMissingRepeatArgument), constant.MakeString(string(q.ErrMissingRepeatArgument))},
    69  			"ErrNestingDepth":          {reflect.TypeOf(q.ErrNestingDepth), constant.MakeString(string(q.ErrNestingDepth))},
    70  			"ErrTrailingBackslash":     {reflect.TypeOf(q.ErrTrailingBackslash), constant.MakeString(string(q.ErrTrailingBackslash))},
    71  			"ErrUnexpectedParen":       {reflect.TypeOf(q.ErrUnexpectedParen), constant.MakeString(string(q.ErrUnexpectedParen))},
    72  			"FoldCase":                 {reflect.TypeOf(q.FoldCase), constant.MakeInt64(int64(q.FoldCase))},
    73  			"InstAlt":                  {reflect.TypeOf(q.InstAlt), constant.MakeInt64(int64(q.InstAlt))},
    74  			"InstAltMatch":             {reflect.TypeOf(q.InstAltMatch), constant.MakeInt64(int64(q.InstAltMatch))},
    75  			"InstCapture":              {reflect.TypeOf(q.InstCapture), constant.MakeInt64(int64(q.InstCapture))},
    76  			"InstEmptyWidth":           {reflect.TypeOf(q.InstEmptyWidth), constant.MakeInt64(int64(q.InstEmptyWidth))},
    77  			"InstFail":                 {reflect.TypeOf(q.InstFail), constant.MakeInt64(int64(q.InstFail))},
    78  			"InstMatch":                {reflect.TypeOf(q.InstMatch), constant.MakeInt64(int64(q.InstMatch))},
    79  			"InstNop":                  {reflect.TypeOf(q.InstNop), constant.MakeInt64(int64(q.InstNop))},
    80  			"InstRune":                 {reflect.TypeOf(q.InstRune), constant.MakeInt64(int64(q.InstRune))},
    81  			"InstRune1":                {reflect.TypeOf(q.InstRune1), constant.MakeInt64(int64(q.InstRune1))},
    82  			"InstRuneAny":              {reflect.TypeOf(q.InstRuneAny), constant.MakeInt64(int64(q.InstRuneAny))},
    83  			"InstRuneAnyNotNL":         {reflect.TypeOf(q.InstRuneAnyNotNL), constant.MakeInt64(int64(q.InstRuneAnyNotNL))},
    84  			"Literal":                  {reflect.TypeOf(q.Literal), constant.MakeInt64(int64(q.Literal))},
    85  			"MatchNL":                  {reflect.TypeOf(q.MatchNL), constant.MakeInt64(int64(q.MatchNL))},
    86  			"NonGreedy":                {reflect.TypeOf(q.NonGreedy), constant.MakeInt64(int64(q.NonGreedy))},
    87  			"OneLine":                  {reflect.TypeOf(q.OneLine), constant.MakeInt64(int64(q.OneLine))},
    88  			"OpAlternate":              {reflect.TypeOf(q.OpAlternate), constant.MakeInt64(int64(q.OpAlternate))},
    89  			"OpAnyChar":                {reflect.TypeOf(q.OpAnyChar), constant.MakeInt64(int64(q.OpAnyChar))},
    90  			"OpAnyCharNotNL":           {reflect.TypeOf(q.OpAnyCharNotNL), constant.MakeInt64(int64(q.OpAnyCharNotNL))},
    91  			"OpBeginLine":              {reflect.TypeOf(q.OpBeginLine), constant.MakeInt64(int64(q.OpBeginLine))},
    92  			"OpBeginText":              {reflect.TypeOf(q.OpBeginText), constant.MakeInt64(int64(q.OpBeginText))},
    93  			"OpCapture":                {reflect.TypeOf(q.OpCapture), constant.MakeInt64(int64(q.OpCapture))},
    94  			"OpCharClass":              {reflect.TypeOf(q.OpCharClass), constant.MakeInt64(int64(q.OpCharClass))},
    95  			"OpConcat":                 {reflect.TypeOf(q.OpConcat), constant.MakeInt64(int64(q.OpConcat))},
    96  			"OpEmptyMatch":             {reflect.TypeOf(q.OpEmptyMatch), constant.MakeInt64(int64(q.OpEmptyMatch))},
    97  			"OpEndLine":                {reflect.TypeOf(q.OpEndLine), constant.MakeInt64(int64(q.OpEndLine))},
    98  			"OpEndText":                {reflect.TypeOf(q.OpEndText), constant.MakeInt64(int64(q.OpEndText))},
    99  			"OpLiteral":                {reflect.TypeOf(q.OpLiteral), constant.MakeInt64(int64(q.OpLiteral))},
   100  			"OpNoMatch":                {reflect.TypeOf(q.OpNoMatch), constant.MakeInt64(int64(q.OpNoMatch))},
   101  			"OpNoWordBoundary":         {reflect.TypeOf(q.OpNoWordBoundary), constant.MakeInt64(int64(q.OpNoWordBoundary))},
   102  			"OpPlus":                   {reflect.TypeOf(q.OpPlus), constant.MakeInt64(int64(q.OpPlus))},
   103  			"OpQuest":                  {reflect.TypeOf(q.OpQuest), constant.MakeInt64(int64(q.OpQuest))},
   104  			"OpRepeat":                 {reflect.TypeOf(q.OpRepeat), constant.MakeInt64(int64(q.OpRepeat))},
   105  			"OpStar":                   {reflect.TypeOf(q.OpStar), constant.MakeInt64(int64(q.OpStar))},
   106  			"OpWordBoundary":           {reflect.TypeOf(q.OpWordBoundary), constant.MakeInt64(int64(q.OpWordBoundary))},
   107  			"POSIX":                    {reflect.TypeOf(q.POSIX), constant.MakeInt64(int64(q.POSIX))},
   108  			"Perl":                     {reflect.TypeOf(q.Perl), constant.MakeInt64(int64(q.Perl))},
   109  			"PerlX":                    {reflect.TypeOf(q.PerlX), constant.MakeInt64(int64(q.PerlX))},
   110  			"Simple":                   {reflect.TypeOf(q.Simple), constant.MakeInt64(int64(q.Simple))},
   111  			"UnicodeGroups":            {reflect.TypeOf(q.UnicodeGroups), constant.MakeInt64(int64(q.UnicodeGroups))},
   112  			"WasDollar":                {reflect.TypeOf(q.WasDollar), constant.MakeInt64(int64(q.WasDollar))},
   113  		},
   114  		UntypedConsts: map[string]igop.UntypedConst{},
   115  	})
   116  }