148116Sbostic /*- 2*62227Sbostic * Copyright (c) 1980, 1993 3*62227Sbostic * The Regents of the University of California. All rights reserved. 448116Sbostic * 548116Sbostic * %sccs.include.redist.c% 622217Sdist */ 7795Speter 814749Sthien #ifndef lint 9*62227Sbostic static char sccsid[] = "@(#)yyseman.c 8.1 (Berkeley) 06/06/93"; 1048116Sbostic #endif /* not lint */ 11795Speter 12795Speter #include "whoami.h" 13795Speter #include "0.h" 1414749Sthien #include "tree_ty.h" /* must be included for yy.h */ 15795Speter #include "yy.h" 16795Speter 17795Speter /* 18795Speter * Assign semantics to a generated token 19795Speter * 20795Speter * Most terminals have a semantic value the current 21795Speter * input line. If they are generated they are flagged 22795Speter * by having this number negated. 23795Speter * 24795Speter * The terminals which have true semantics such 25795Speter * as identifiers and strings are instead given 26795Speter * semantic value NIL here - we do not attempt 27795Speter * to do repair, e.g. by giving generated integers 28795Speter * the value 1, etc. 29795Speter */ nullsem(ch)30795Speternullsem(ch) 31795Speter int ch; 32795Speter { 33795Speter 34795Speter switch (ch) { 35795Speter case YID: 36795Speter case YINT: 37795Speter case YNUMB: 38795Speter case YBINT: 39795Speter case YSTRING: 40795Speter return (NIL); 41795Speter default: 42795Speter return (-yyeline); 43795Speter } 44795Speter } 45