15 #include "readtensegrity.tab.h"
17 int ReadTensegritylex(
void);
19 extern unsigned int RTline;
28 R_NUMBER (({DIGIT}+(\.{DIGIT}+)?)|(\.{DIGIT}+))((E|e)[+-]?{DIGIT}+)?
31 IDENTIFIER {LETTER}({DIGIT}|{LETTER}|"_
")*
46 [^*\n]+ // eat comment in chunks
47 "*
" // eat the lone star
53 {RETURN} { RTline++; }
76 return(_GREATER_EQUAL);
220 return(_GRANULARITY);
236 return(_ORIENTATION);
256 return(_FIXED_POINTS);
368 char string_tmp[100];
370 memcpy(string_tmp,ReadTensegritytext,(unsigned int)ReadTensegrityleng);
371 string_tmp[ReadTensegrityleng]=0;
372 ReadTensegritylval.int_number=atoi(string_tmp);
377 char string_tmp[100];
379 memcpy(string_tmp,ReadTensegritytext,(unsigned int)ReadTensegrityleng);
380 string_tmp[ReadTensegrityleng]=0;
381 ReadTensegritylval.real_number=atof(string_tmp);
387 NEW(ReadTensegritylval.string,ReadTensegrityleng,char);
389 memcpy(ReadTensegritylval.string,&(ReadTensegritytext[1]),(unsigned int)ReadTensegrityleng-2);
390 ReadTensegritylval.string[ReadTensegrityleng-2]=0;
396 NEW(ReadTensegritylval.id,ReadTensegrityleng+1,char);
397 memcpy(ReadTensegritylval.id,ReadTensegritytext,(unsigned int)ReadTensegrityleng);
399 ReadTensegritylval.id[ReadTensegrityleng]=0;
404 . { return(ReadTensegritytext[0]); }
409 * This function is automatically called by the parser at the end of a file.
410 * If 1 is returned the lexical analysis is stopped.
412 int ReadTensegritywrap()
Error function specific of the tensegrity parser.
#define BAR
One of the possible types of legs.
unsigned int RTline
Number of the line currently parsed when reading a .tensegrity file.
#define STRUT
One of the possible types of legs.
#define CYLINDER
One of the possible type of polyhedrons.
Definitions of constants and macros used in several parts of the cuik library.
#define SPHERE
One of the possible type of polyhedrons.
Definition of the Tcolor type and the associated functions.
#define CABLE
One of the possible types of legs.
#define SPRING
One of the possible types of legs.
Definition of the Tinterval type and the associated functions.
Follow us!