Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged compiler-tokenization
3
votes
1
answer
1
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 26
A lexical analyzer uses the following patterns to recognize four tokens $\textsf{T1, T2, T3},$ and $\textsf{T4}$ over the alphabet $ \{a,b,c\}.$ Rule1: aa*b*c* { print ( T1 ); } Rule2: c { print ( T2 ); ... never be used? Note that the analyzer outputs the token that matches the longest possible prefix. Rule$1$ Rule$2$ Rule$3$ Rule$4$
A lexical analyzer uses the following patterns to recognize four tokens $\textsf{T1, T2, T3},$ and $\textsf{T4}$ over the alphabet $ \{a,b,c\}.$Rule1: aa*b*c* { print...
GO Classes
586
views
GO Classes
asked
Jan 13
Compiler Design
goclasses2024-mockgate-11
goclasses
compiler-design
lexical-analysis
compiler-tokenization
multiple-selects
1-mark
+
–
2
votes
2
answers
2
NIELIT Scientific Assistant A 2020 November: 100
The number of tokens in the following C/C++ statement is : printf("i=%d, &i=%xx", i&i); $9$ $6$ $10$ $12$
The number of tokens in the following C/C++ statement is :printf("i=%d, &i=%xx", i&i);$9$$6$$10$$12$
gatecse
574
views
gatecse
asked
Dec 9, 2020
Compiler Design
nielit-sta-2020
compiler-design
lexical-analysis
compiler-tokenization
+
–
3
votes
3
answers
3
ISRO2020-13
The number of tokens in the following C code segment is switch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; } $27$ $29$ $26$ $24$
The number of tokens in the following C code segment isswitch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; }$27$$29$$26$$24$
Satbir
5.0k
views
Satbir
asked
Jan 13, 2020
Compiler Design
isro-2020
compiler-design
compiler-tokenization
easy
+
–
1
votes
0
answers
4
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 4 (Page No. 125)
Most languages are case sensitive, so keywords can be written only one way, and the regular expressions describing their lexeme is very simple. However, some languages, like SQL, are case insensitive, so a keyword ... in a case-insensitive language. Illustrate the idea by writing the expression for "select" in SQL.
Most languages are case sensitive, so keywords can be written only one way, and the regular expressions describing their lexeme is very simple. However, some languages, l...
admin
1.1k
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
compiler-tokenization
descriptive
+
–
3
votes
0
answers
5
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 1 (Page No. 125)
Consult the language reference manuals to determine the sets of characters that form the input alphabet (excluding those that may only appear in character strings or comments), the lexical form of numerical constants, and the lexical form of identifiers, for each of the following languages: C C++ C# Fortran Java Lisp SQL
Consult the language reference manuals to determinethe sets of characters that form the input alphabet (excluding those that may only appear in character strings or comme...
admin
1.1k
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
lexical-analysis
compiler-tokenization
descriptive
+
–
0
votes
1
answer
6
Ullman (Compiler Design) Edition 2 Exercise 3.1 Question 2 (Page No. 114 - 115)
Tagged languages like HTML or XML are different from conventional programming languages in that the punctuation (tags) are either very numerous (as in HTML) or a user-definable set (as in XML). Further ... P> into appropriate lexemes. Which lexemes should get associated lexical values,and what should those values be?
Tagged languages like HTML or XML are different from conventional programming languages in that the punctuation (tags) are either very numerous (as in HTML) or a user-def...
admin
1.0k
views
admin
asked
Jul 27, 2019
Compiler Design
ullman
compiler-design
lexical-analysis
compiler-tokenization
+
–
0
votes
0
answers
7
Ullman (Compiler Design) Edition 2 Exercise 3.1 Question 1 (Page No. 114)
Divide the following C + + program: float limitedSquare(x) float x { /* returns x-squared, but never more than 100 */ return (x<=-10.0 || x>=10.0)?100:x*x; } into appropriate lexemes, using the discussion of Section $3.1.2$ as a guide. Which lexemes should get associated lexical values? What should those values be?
Divide the following C + + program:float limitedSquare(x) float x { /* returns x-squared, but never more than 100 */ return (x<=-10.0 || x>=10.0)?100:x*x; }into appropria...
admin
1.4k
views
admin
asked
Jul 27, 2019
Compiler Design
ullman
compiler-design
lexical-analysis
compiler-tokenization
+
–
3
votes
1
answer
8
Lexical Analysis: Self Doubt
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimiter, which includes blank symbol, arithmetic, logical operator, left parenthesis, right ... with a delimiter and + is a valid delimiter and the error in declaration will not be detected at this stage...
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimi...
Hirak
1.9k
views
Hirak
asked
Jun 9, 2019
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
2
votes
2
answers
9
token generation doubt
which one of the following string can definitely said to be a token without looking at the next input: +(++,+=) return(return a) *(*=) =(==) ++ , ( ) ‘ ; option e is: plusplus, comma, bracket open, bracket close, single quote ;
which one of the following string can definitely said to be a token without looking at the next input:+(++,+=)return(return a)*(*=)=(==)++ , ( ) ‘ ; option e is: plu...
Rhythm
4.0k
views
Rhythm
asked
Jun 5, 2019
Compiler Design
lexical-analysis
compiler-tokenization
+
–
1
votes
2
answers
10
Made easy question of compiler design
Find the number of tokens in the following C code$:$ main() { int x = 10 , *P ; int y = x ++ ; char * q ; P = & x ; q = 'A' ; if(*P>=10) { *P = x + 100; } else { printf("%d" , x); /*comment*/ } }
Find the number of tokens in the following C code$:$main() { int x = 10 , *P ; int y = x ++ ; char * q ; P = & x ; q = 'A' ; if(*P>=10) { *P = x + 100; ...
Shubham_Kr
3.1k
views
Shubham_Kr
asked
Apr 11, 2019
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
made-easy-booklet
numerical-answers
+
–
0
votes
1
answer
11
UPPCL AE 2018:24
The number of tokens in the following $\text{C}$ statement is printf(“i = %d, j = %f, &i = %x\n”, i, j, &i); $10$ $35$ $46$ $12$
The number of tokens in the following $\text{C}$ statement isprintf(“i = %d, j = %f, &i = %x\n”, i, j, &i);$10$$35$$46$$12$
admin
313
views
admin
asked
Jan 5, 2019
Compiler Design
uppcl2018
compiler-design
compiler-tokenization
+
–
0
votes
1
answer
12
Self doubt
int main() { int a,b; a = 10; b = 11; printf(“%d %d”, a++,b--); } The number of tokens is
int main(){ int a,b; a = 10; b = 11; printf(“%d %d”, a++,b );}The number of tokens is
Vipin Rai
568
views
Vipin Rai
asked
Dec 12, 2018
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
0
votes
4
answers
13
NIELIT 2018-56
Identify the total number of tokens in the given statement printf("A%B=",&i); $7$ $8$ $9$ $13$
Identify the total number of tokens in the given statementprintf("A%B=",&i);$7$$8$$9$$13$
Arjun
2.6k
views
Arjun
asked
Dec 7, 2018
Compiler Design
nielit-2018
compiler-design
compiler-tokenization
+
–
1
votes
0
answers
14
Self Doubt Token Count - Character Literal
How many tokens are there ? int main() { char name={'A','A','K','A','S','H'}; return 0; } Please give any reference if possible, my doubt is about the characters in the braces, do we count them individually or like a string.
How many tokens are there ? int main(){char name={'A','A','K','A','S','H'};return 0;}Please give any reference if possible, my doubt is about the characters in the braces...
Aakash_
928
views
Aakash_
asked
Nov 20, 2018
Compiler Design
compiler-tokenization
compiler-design
+
–
2
votes
5
answers
15
Lexical Analysis
What it the number of tokens in the following line? printf("%d numbers.", &x);
What it the number of tokens in the following line?printf("%d numbers.", &x);
Mizuki
1.8k
views
Mizuki
asked
Nov 11, 2018
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
0
votes
0
answers
16
Compiler design
Q1: Consider G :- $X \rightarrow X + Y | Y$ $Y \rightarrow Y*Z|Z$ $Z \rightarrow (X)$ $Z \rightarrow id$ if LR(1) parser is used to parse the above grammar, then total how many lookahead will be present in the dfa state I0 for the items $X \rightarrow .Y \text{ and } Z \rightarrow .id$ ... ------------------------------------------------------------ Someone verify all these answers.
Q1: Consider G :-$X \rightarrow X + Y | Y$$Y \rightarrow Y*Z|Z$$Z \rightarrow (X)$$Z \rightarrow id$if LR(1) parser is used to parse the above grammar, then total how man...
Shubhanshu
617
views
Shubhanshu
asked
Nov 8, 2018
Compiler Design
compiler-design
parsing
syntax-directed-translation
basic-block-construction
compiler-tokenization
+
–
2
votes
2
answers
17
Number of Tokens
Na462
3.6k
views
Na462
asked
Nov 7, 2018
Compiler Design
compiler-design
compiler-tokenization
test-series
+
–
1
votes
2
answers
18
Lexical Analysis
How will the compiler detect whether "if" is a keyword or an identifier? Please tell me the concept behind this.
How will the compiler detect whether "if" is a keyword or an identifier?Please tell me the concept behind this.
Lovejeet Singh
1.2k
views
Lovejeet Singh
asked
Nov 7, 2018
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
usergate2018
usermod
+
–
1
votes
3
answers
19
TANCET 2016 Lexical Analysis
Consider the following statements $S_{1}:$ The set of string described by a rule is called pattern associated with the token. $S_{2}:$ A lexeme is a sequence of character in the source program that is matched by Pattern for a token. Which of the following statement is/are true? ... $S_{2}$ is false $S_{2}$ is true $S_{1}$ is false Both $S_{1}$ and $S_{2}$ are false
Consider the following statements$S_{1}:$ The set of string described by a rule is called pattern associated with the token.$S_{2}:$ A lexeme is a sequence of character i...
Balaji Jegan
4.1k
views
Balaji Jegan
asked
Oct 23, 2018
Compiler Design
tancet
compiler-design
lexical-analysis
compiler-tokenization
+
–
0
votes
1
answer
20
Fortran statement
The number of tokens in the fortran statements DO 10 I = 1.3 is ?
The number of tokens in the fortran statements DO 10 I = 1.3 is ?
syncronizing
286
views
syncronizing
asked
Sep 22, 2018
Compiler Design
compiler-tokenization
+
–
0
votes
0
answers
21
tokens
Which of the following is not a token of c -program? A. 1.02e + 2 B. # define C. 123.33 D. MAX please explain why?
Which of the following is not a token of c -program?A. 1.02e + 2B. # defineC. 123.33D. MAXplease explain why?
syncronizing
398
views
syncronizing
asked
Sep 22, 2018
Compiler Design
compiler-design
compiler-tokenization
+
–
0
votes
1
answer
22
number of tokens
Question: Find the number of tokens in the following C code using lexical analyzer of the compiler.
Question:Find the number of tokens in the following C code using lexical analyzer of the compiler.
syncronizing
5.3k
views
syncronizing
asked
Sep 21, 2018
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
numerical-answers
+
–
1
votes
1
answer
23
Find the no. of tokens
Find no of tokens in below program. #include<stdio.h> main() { int I; int *pi = &I; //parent pointer scanf("%d",pi); printf("%d\n", I+5); }
Find no of tokens in below program.#include<stdio.h>main(){ int I; int *pi = &I; //parent pointer scanf("%d",pi); printf("%d\n", I+5);}
sagar27
5.2k
views
sagar27
asked
Sep 21, 2018
Compiler Design
compiler-tokenization
lexical-analysis
+
–
1
votes
0
answers
24
Doubt in compiler
Whether a given pattern constitutes a token or not (a) depends on the source language (b) depends on the target language (c) depends on the compiler (d) none of the above comment is true
Whether a given pattern constitutes a token or not(a) depends on the source language(b) depends on the target language(c) depends on the compiler(d) none of the above com...
goluabhinan
4.2k
views
goluabhinan
asked
Sep 16, 2018
Compiler Design
compiler-design
compiler-tokenization
+
–
0
votes
1
answer
25
Printf("j=%d,&,j=%x",j&j)
Nageswara Rao G
945
views
Nageswara Rao G
asked
Aug 22, 2018
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
1
votes
1
answer
26
Token
No of token? $a b c d + y{^3}+(2-5+x$ $6/2$--;$ Please suggest how to count token in this type of questions?
No of token?$a b c d + y{^3}+(2-5+x$ $6/2$$ ;$Please suggest how to count token in this type of questions?
Mayankprakash
499
views
Mayankprakash
asked
Aug 9, 2018
Compiler Design
compiler-design
compiler-tokenization
+
–
0
votes
2
answers
27
Number of tokens
In this question we will take n-=n1 as n=n-n1 as 5 tokens or n-=n1 as 4 tokens ????
In this question we will take n-=n1 as n=n-n1 as 5 tokens or n-=n1 as 4 tokens ????
saumya mishra
2.2k
views
saumya mishra
asked
Jun 12, 2018
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
numerical-answers
test-series
+
–
Page:
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register