File tokgen.icn

Summary

###########################################################################

	File:     tokgen.icn

	Subject:  Procedures for token counting

	Author:   Ralph E. Griswold

	Date:     May 23, 1996

###########################################################################

   This file is in the public domain.

###########################################################################

  These procedures are for use with code produced by a meta-translator.
  The result of linking these procedures with a program
  translated by standard the meta-translator and executing the
  result is a tabulation of the tokens in the program.

###########################################################################

  Bug:  The invocable declaration is not handled properly.  "invocable all"
        will get by, but some other forms produce syntax errors.  The
        problem is in the meta-translator itself, not in this
	 program.

###########################################################################

  Links:  showtbl

###########################################################################
Procedures:
Alt, Apply, Arg, Asgnop, Augscan, Bamper, Binop, Body, Break, Case, Cclause, Clist, Clit, Compound, Create, Default, End, Every, EveryDo, Fail, Field, Global, If, IfElse, Ilit, Initial, Invocable, Invoke, Key, Limit, Link, List, Local, Next, Not, Null, Paren, Pdco, Proc, Record, Repalt, Repeat, Return, Rlit, Scan, Section, Slit, Static, Subscript, Suspend, SuspendDo, To, ToBy, Unop, Until, UntilDo, Var, While, WhileDo, main

Global variables:
all, binops, clits, controls, declarations, fields, files, fldref, globals, ilits, keys, locals, others, parms, procs, rlits, slits, statics, summary, unops, vars

Links:
showtbl.icn

This file is part of the (main) package.

Source code.

Details
Procedures:

Alt(e1, e2)

 e1 | e2


Apply(e1, e2)

 e1 ! e2


Arg(s)


Asgnop(op, e1, e2)

 e1 op e2


Augscan(e1, e2)

 e1 ?:= e2


Bamper(e1, e2)

 e1 & e2


Binop(s)


Body(s)

 procedure body


Break(e)

 break e


Case(e, clist)

 case e of { caselist }


Cclause(e1, e2)

 e1 : e2


Clist(e1, e2)

 e1 ; e2 in case list


Clit(s)


Compound(es)

 { e1; e2; ... }


Create(e)

 create e


Default(e)

 default: e


End()

 end


Every(e)

 every e


EveryDo(e1, e2)

 every e1 do e2


Fail()

 fail


Field(e1, e2)

 e . f


Global(vs)

 global v1, v2, ...


If(e1, e2)

 if e1 then e2


IfElse(e1, e2, e3)

 if e1 then e2 else e3


Ilit(s)


Initial(s)

 initial e


Invocable(es)

 invocable ... (problem)


Invoke(e0, es)

 e0(e1, e2, ...)


Key(s)


Limit(e1, e2)

 e1 \ e2


Link(vs)

 link "v1, v2, ..."


List(es)

 [e1, e2, ... ]


Local(vs)

 local v1, v2, ...


Next()

 next


Not(e)

 not e


Null()

 &null


Paren(es)

 (e1, e2, ... )


Pdco(e0, es)

 e0{e1, e2, ... }


Proc(s, es)

 procedure s(v1, v2, ...)


Record(s, es)

 record s(v1, v2, ...)


Repalt(e)

 |e


Repeat(e)

 repeat e


Return(e)

 return e


Rlit(s)


Scan(e1, e2)

 e1 ? e2


Section(op, e1, e2, e3)

 e1[e2 op  e3]


Slit(s)


Static(ev)

 static v1, v2, ..


Subscript(e1, e2)

 e1[e2]


Suspend(e)

 suspend e


SuspendDo(e1, e2)

 suspend e1 do e2


To(e1, e2)

 e1 to e2


ToBy(e1, e2, e3)

 e1 to e2 by e3


Unop(s)

 op e (op may be compound)


Until(e)

 until e


UntilDo(e1, e2)

 until e1 do e2


Var(s)


While(e)

 while e


WhileDo(e1, e2)

 while e1 do e2


main()


Global variables:
all -- kludge -- invocable is not handled properly

binops

clits

controls

declarations

fields

files

fldref

globals

ilits

keys

locals

others

parms

procs

rlits

slits

statics

summary

unops

vars


This page produced by UniDoc on 2021/04/15 @ 23:59:54.