File: wc.nex

package info (click to toggle)
golang-github-blynn-nex 0.0.0%2Bgit.2021.03.30.1a3320dab9-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 232 kB
  • sloc: yacc: 60; makefile: 22; sh: 4
file content (14 lines) | stat: -rw-r--r-- 290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/[^\n]*\n/ < {}
  /[^ \t\r\n]*/ < {}
    /./  { nChars++ }
  >      { nWords++ }
  /./    { nChars++ }
>        { nLines++ }
//
package main
import ("fmt";"os")
func main() {
  var nLines, nWords, nChars int
  NN_FUN(NewLexer(os.Stdin))
  fmt.Printf("%d %d %d\n", nLines, nWords, nChars)
}