#include "lclintMacros.nf"#include "llbasic.h"#include "llgrammar.h"#include "scanline.h"#include "lclscanline.h"Go to the source code of this file.
Functions | |
| ltoken | ltoken_create (unsigned int code, lsymbol text) |
| ltoken | ltoken_createRaw (unsigned int code, lsymbol text) |
| ltoken | ltoken_createType (unsigned int code, SimpleIdCode idtype, lsymbol text) |
| ltoken | ltoken_createFull (unsigned int code, lsymbol text, cstring file, unsigned int line, unsigned int col) |
| cstring | ltoken_unparseCodeName (ltoken tok) |
| cstring | ltoken_unparse (ltoken s) |
| ltoken | ltoken_copy (ltoken tok) |
| lsymbol | ltoken_getRawText (ltoken tok) |
| cstring | ltoken_unparseLoc (ltoken t) |
| void | ltoken_markOwned ( ltoken tok) |
| void | ltoken_free ( ltoken tok) |
| bool | ltoken_isSingleChar (char c) |
Variables | |
| ltoken | ltoken_forall |
| ltoken | ltoken_exists |
| ltoken | ltoken_true |
| ltoken | ltoken_false |
| ltoken | ltoken_not |
| ltoken | ltoken_and |
| ltoken | ltoken_or |
| ltoken | ltoken_implies |
| ltoken | ltoken_eq |
| ltoken | ltoken_neq |
| ltoken | ltoken_equals |
| ltoken | ltoken_eqsep |
| ltoken | ltoken_select |
| ltoken | ltoken_open |
| ltoken | ltoken_sep |
| ltoken | ltoken_close |
| ltoken | ltoken_id |
| ltoken | ltoken_arrow |
| ltoken | ltoken_marker |
| ltoken | ltoken_pre |
| ltoken | ltoken_post |
| ltoken | ltoken_comment |
| ltoken | ltoken_any |
| ltoken | ltoken_compose |
| ltoken | ltoken_if |
| ltoken | ltoken_result |
| ltoken | ltoken_typename |
| ltoken | ltoken_bool |
| ltoken | ltoken_farrow |
| ltoken | ltoken_lbracked |
| ltoken | ltoken_rbracket |
|
|
Definition at line 249 of file ltoken.c. Referenced by LCLBuiltins(), LCLScanLine(), LSLGenShift(), LSLScanEofToken(), LSLScanFreshToken(), declaratorNode_copy(), declareForwardType(), enteringClaimScope(), enteringFcnScope(), makeConstDeclarationNode(), makeDeclaratorNode(), makeEnumSpecNode(), makeFcnNode(), makeLetDeclNode(), makeLiteralTermNode(), makeVarDeclarationNode(), makeVarNode(), makestrOrUnionNode(), quantifierNode_copy(), sigNode_copy(), sort_init(), varNode_copy(), and yllex(). 00250 {
00251 if (ltoken_isValid (tok))
00252 {
00253 ltoken ret = (ltoken) dmalloc (sizeof (*ret));
00254
00255 ret->code = tok->code;
00256 ret->text = tok->text;
00257 ret->fname = tok->fname;
00258 ret->line = tok->line;
00259 ret->col = tok->col;
00260 ret->rawText = tok->rawText;
00261 ret->defined = tok->defined;
00262 ret->hasSyn = tok->hasSyn;
00263 ret->idtype = tok->idtype;
00264 ret->intfield = tok->intfield;
00265
00266 return ret;
00267 }
00268 else
00269 {
00270 return ltoken_undefined;
00271 }
00272 }
|
|
|
Definition at line 90 of file ltoken.c. Referenced by LCLInsertToken(), LSLInsertToken(), abstract_init(), makeLiteralTermNode(), sort_import(), sort_init(), sort_makeEnum(), sort_makeStr(), and sort_makeUnion(). 00091 {
00092 ltoken tok = ltoken_new ();
00093
00094 tok->code = code;
00095 tok->text = text;
00096
00097 return tok;
00098 }
|
|
|
Definition at line 123 of file ltoken.c. Referenced by o_fctInfo(). 00126 {
00127 ltoken tok = (ltoken) dmalloc (sizeof (*tok));
00128
00129 tok->code = code;
00130 tok->text = text;
00131 tok->fname = lsymbol_fromString (file);
00132 tok->line = line;
00133 tok->col = col;
00134 tok->rawText = lsymbol_undefined;
00135 tok->defined = FALSE;
00136 tok->hasSyn = FALSE;
00137
00138 return tok;
00139 }
|
|
|
Definition at line 100 of file ltoken.c. Referenced by LCLScanLine(). 00101 {
00102 ltoken tok = ltoken_new ();
00103
00104 tok->code = code;
00105 tok->rawText = text;
00106
00107 return tok;
00108 }
|
|
|
Definition at line 110 of file ltoken.c. Referenced by LCLBuiltins(), abstract_init(), makeAbstractNode(), and sort_init(). 00111 {
00112 ltoken tok = ltoken_new ();
00113
00114 /* no...what's the real llassert (code == simpleId); */
00115
00116 tok->code = code;
00117 tok->idtype = idtype;
00118 tok->text = text;
00119
00120 return tok;
00121 }
|
|
|
Definition at line 318 of file ltoken.c. Referenced by LCLScanLine(), LCLTokenTableCleanup(), LSLProcessInitFileInit(), checkAndEnterTag(), declaratorNode_free(), enteringFcnScope(), fcnNode_free(), letDeclNode_free(), ltokenTableCleanup(), makeArrayNode(), makeCTypesNode(), makeChecksNode(), makeEnsuresNode(), makeEnumSpecNode(), makeIfTermNode(), makeIntraClaimNode(), makeLiteralTermNode(), makeNameNodeId(), makeOpCallTermNode(), makePointerNode(), makeReplaceNode(), makeRequiresNode(), makeTypeSpecifier(), makeUnchangedTermNode1(), quantifierNode_free(), replaceNode_free(), sigNode_free(), signNode_free(), and varNode_free(). 00319 {
00320 sfree (tok);
00321 }
|
|
|
Definition at line 274 of file ltoken.c. Referenced by PrintToken(), and makeInterfaceNodeImports(). 00275 {
00276 if (ltoken_isValid (tok))
00277 {
00278 lsymbol ret = tok->rawText;
00279
00280 if (lsymbol_isUndefined (ret))
00281 {
00282 ret = tok->text;
00283 }
00284
00285 return ret;
00286 }
00287 else
00288 {
00289 return lsymbol_undefined;
00290 }
00291 }
|
|
|
Definition at line 323 of file ltoken.c. 00324 {
00325 return (LCLScanCharClass (c) == SINGLECHAR);
00326 }
|
|
|
Definition at line 313 of file ltoken.c. 00314 {
00315 sfreeEventually (tok);
00316 }
|
|
|
Definition at line 237 of file ltoken.c. Referenced by o_fctInfo(), sigNode_unparse(), and sigNode_unparseText(). 00238 {
00239 if (ltoken_isValid (s))
00240 {
00241 return (lsymbol_toString (s->text));
00242 }
00243 else
00244 {
00245 return cstring_undefined;
00246 }
00247 }
|
|
|
Definition at line 232 of file ltoken.c. 00233 {
00234 return LCLTokenCode_unparseCodeName (ltoken_getCode (tok));
00235 }
|
|
|
Definition at line 293 of file ltoken.c. Referenced by lclerror(). 00294 {
00295 if (ltoken_getCode (t) != NOTTOKEN)
00296 {
00297 if (context_getFlag (FLG_SHOWCOL))
00298 {
00299 return (message ("%s:%u,%u", ltoken_fileName (t),
00300 ltoken_getLine (t), ltoken_getCol (t)));
00301 }
00302 else
00303 {
00304 return (message ("%s:%u", ltoken_fileName (t), ltoken_getLine (t)));
00305 }
00306 }
00307 else
00308 {
00309 return cstring_makeLiteral ("*** Not Token ***");
00310 }
00311 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.3 written by Dimitri van Heesch,
© 1997-2000