Skip to content

Commit

Permalink
Modify yacc.go to increase capacity for term and non-term count.
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnusTiberius committed Dec 18, 2014
1 parent 6262902 commit d4eeb86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/yacc/yacc.go
Expand Up @@ -71,7 +71,7 @@ const (
STATEINC = 200 // increase for states statemem

NAMESIZE = 50
NTYPES = 63
NTYPES = 100
ISIZE = 400

PRIVATE = 0xE000 // unicode private use
Expand Down Expand Up @@ -139,9 +139,9 @@ const NOMORE = -1000
// macros for getting associativity and precedence levels
func ASSOC(i int) int { return i & 3 }

func PLEVEL(i int) int { return (i >> 4) & 077 }
func PLEVEL(i int) int { return (i >> 4) & 0777 }

func TYPE(i int) int { return (i >> 10) & 077 }
func TYPE(i int) int { return (i >> 10) & 0777 }

// macros for setting associativity and precedence levels
func SETASC(i, j int) int { return i | j }
Expand Down

1 comment on commit d4eeb86

@MagnusTiberius
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a test showing the increment value resetting to zero after 63.

https://play.golang.org/p/yDGGVwYR74

Please sign in to comment.