News
Open Question: i need help with my english homework. its all about the pledge of allegiance. see inside for details plz help!?
1)what is a flag and what does it represent?
2)If you had to give a bried yet percise description of what the words the united states of america in the pledge of allegiance mean what would you say?
3) what does the phrase "for which it stands" mean?
any help is appreciated! it is due tomorrow!
Read more...
Open Question: Why is it that when I ask Flag Burning questions here and assert my 1st Amendment Rights to do so, I get?
tough guy responses, gonna kick my asse ect from the right wingers, but when I ask if there is a way to stop "Reverend" Jones from burning Korans, the same people defend his right?
In other words, when I say I am going to burn a flag because I can, I get threats.
When I ask about Jones, they defend his rights.
Read more...
Open Question: C++ simplified lexical analyzer?
It's just supposed to pull the data from a txt file and display it. I can't compile it yet because I still have to wait for the .txt input file. I think the program won't work this way. Especially with the arrays. Does anybody know how to fix this?
-------------------------
#include
#include
#include
#include
/****************************************************************
Functions prototype.
*****************************************************************/
void Open_File();
void Demage_Lexeme();
int Search(char[256],int);
void analyze();
void Skip_Comment();
void Read_String();
void Is_Keyword_Or_Not();
void Is_Identifier_Or_Not();
void Is_Operator_Or_Not();
void Read_Number();
void Is_Special_Or_Not();
void Is_Comparison_Or_Not();
void Add_To_Lexical (char[256],int,char[256]);
void Print_ST();
void Print_TOKEN();
void Token_Attribute();
/****************************************************************
Data structure used in program.
*****************************************************************/
struct lexical
{
char data[256]; //Value of token.
int line[256]; //Line # which token appear in input
file.
int times; //# of times that token appear in input
file.
char type[256]; //Type of each token.
struct lexical *next;
};
typedef struct lexical Lex;
typedef Lex *lex;
/****************************************************************
File pointer for accessing the file.
*****************************************************************/
FILE *fp;
FILE *st;
FILE *token;
char lexeme[256],ch;
int f,flag,line=1,i=1;
lex head=NULL,tail=NULL;
/****************************************************************
Array
*****************************************************************/
char words[maxwordcount][maxwordlength];
int wordcount = 0;
while(inputstream >> words[wordcount ++]);
**************
*MAIN PROGRAM*
**************
void main()
{
Open_File();
analyze();
fclose(fp);
Print_ST();
Print_TOKEN();
}
/****************************************************************
This function open input sourse file.
*****************************************************************/
void Open_File()
{
fp=fopen("source.txt","r"); //provide path for source.txt here
if(fp==NULL)
{
printf("!!!Can't open input file - source.txt!!!");
getch();
exit(0);
}
}
/****************************************************************
Function to add item to structure of array to store data and
information of lexical items.
*****************************************************************/
void Add_To_Lexical (char value[256],int line,char type[256])
{
lex new_lex;
if (!Search(value,line)) //When return 1 the token not found.
{
new_lex=malloc(sizeof(Lex));
if (new_lex!=NULL)
{
strcpy(new_lex->data,value);
new_lex->line[0]=line;
new_lex->times=1;
strcpy(new_lex->type,type);
new_lex->next=NULL;
if (head==NULL)
head=new_lex;
else
tail->next=new_lex;
tail=new_lex;
}
}
}
/****************************************************************
Function to print the ST.TXT .
*****************************************************************/
void Print_ST()
{
lex x=head;
int j;
if ((st=fopen("ST.TXT","w"))==NULL)
printf("The file ST.TXT cat not open.
");
else
{
fprintf(st," %s %s %s
","Line#","Lexeme","Type");
fprintf(st," ---- ------ ----
");
while (x!=NULL)
{
if ((strcmp(x->type,"num")==0) ||
(strcmp(x->type,"keyword")==0) ||
(strcmp(x->type,"identifier")==0))
{
fprintf(st," ");
for (j=0;jtimes;j++)
{
fprintf(st,"%d",x->line[j]);
if (j!=x->times-1) //This condition to prevent the comma
fprintf(st,",",x->line[j]); //"," to not print after last line #.
}
fprintf(st," %-6s %-6s
",x->data,x->type);
}
x=x->next;
}
fclose(st);
}
}
/****************************************************************
This function read all character of strings.
*****************************************************************/
void Read_String()
{
int j=0;
do
{
lexeme[j++]=ch;
ch=fgetc(fp);
} while(isalpha(ch));
fseek(fp,-1,1);
lexeme[j]='
Read more...
Open Question: Atheists: Can you believe it?
The way you look sometimes, like a trampled flag on a city street, oh yeah.
And I don't want it, the things you're offering me, symbolized bar code, quick ID, oh yeah.
See I'm a 21st century digital boy; I don't know how to read but I've got a lot of toys. My daddy's a lazy middle class intellectual, my mommy's on Valium, so ineffectual.
Ain't life a mystery?
http://www.youtube.com/watch?v=hrFIsM1cvLc
Read more...
Open Question: What is the smallest Six Flags park in the world?
Read more...
Open Question: What is the symbolism of the Mexican flag?
Read more...
Open Question: What is your current wallpaper?
Mine was the Puerto Rican flag, but now its a landscape of a wintry climate.
Read more...
Open Question: Hanging out with shy guys... :))))?
Ok so i'm gonna hang-out with this guy i like... :))))?
this weekend me and this guy are going to six flags (alone)
he's really shy and me and him talk on fb ALL THE TIME (he always smiles and makes me feel better) but he's shy when he see's me at school...
so idk...when i asked about going with a group he said "we don't have to if you don't want to, it's up to you"
and now he said "sweetness I CAN'T WAIT!! "
what does he mean? shy guys are hard to read...i
guess if he's excited to hang out with me that's a good sign, right?
he told me:"your super nice and sooo pretty and we have a bit in common" and when i told him about my first volleyball game, he asked where it was and said "i'll most likely come:)"
ok so i know that's pretty obivious....but how can i flirt with him in person this weekend? i'm shy too and don't know how to really
Read more...
Open Question: Bizzare first date.. what was she thinking?!?
First date this weekend- I approach her at the bar and introduce myself, she gives me a hug and says "oh by the way, these are my three friends I brought along". I'm like "uhh... ok, hi?" Us two grab seats at the bar and are hitting it off, when another guy walks up and starts rubbing her shoulders, and is just standing behind us with his hands on her. About to walk out, I inquire what's going on? She says oh by the way, this is my best friend from college. He continues standing behind us, making me nervous, and she acts surprised when I tell her he's bothering me. So she suggests we all go play pool, so here i'm the oddball in this large group of people. I ended up having a decent time, got a kiss, but can't help but wonder what she was thinking?! This a red flag?
Read more...
Open Question: Why is burning the Koran bad when the muslims are burning our flags and chanting, Death to America?
Nobody has burnt anything, yet the Muslims are burning Bibles and American Flags. Is it OK for them to do what they want, but we can't?
Get your Free Koran from here
http://www.freekoran.com/form.php
Read more...
|