Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged lexical-analysis
1
vote
2
answers
61
compiler
consider this c code: wheil(1){ printf("hi"); } will this code fragment gives lexical error or not. If not then who is responsible for this error.
The Technical Guy
asked
in
Compiler Design
Mar 16, 2018
by
The Technical Guy
745
views
compiler-design
lexical-analysis
3
votes
1
answer
62
In which phase of the compiler below errors are detected ?
1. Declaring an array with a floating point subscript : e.g int a[2.8] ; In my opinion ,it should be a syntax error : How will the parse tree be generated for this ,because in between the square brackets we can have an identifier ... the identifier is too long , then is this any type of error ?If Yes , then in which phase is this detected ?
radha gogia
asked
in
Compiler Design
Mar 11, 2018
by
radha gogia
4.3k
views
compiler-design
lexical-analysis
descriptive
51
votes
7
answers
63
GATE CSE 2018 | Question: 37
A lexical analyzer uses the following patterns to recognize three tokens $T_1, T_2$, and $T_3$ over the alphabet $\{a, b, c\}$. $T_1: a?(b \mid c)^\ast a$ $T_2: b?(a \mid c)^\ast b$ ... the string $bbaacabc$ is processed by the analyzer, which one of the following is the sequence of tokens it outputs? $T_1T_2T_3$ $T_1T_1T_3$ $T_2T_1T_3$ $T_3T_3$
gatecse
asked
in
Compiler Design
Feb 14, 2018
by
gatecse
21.2k
views
gatecse-2018
compiler-design
lexical-analysis
normal
2-marks
1
vote
1
answer
64
cd lexical analysis token
1. macros are not considered as tokens in tokenizing. 2.#include considered as single token 2.stdio.h considered as single token. Are the above statements true?
ankit_thawal
asked
in
Compiler Design
Feb 1, 2018
by
ankit_thawal
727
views
compiler-design
lexical-analysis
compiler-tokenization
true-false
12
votes
5
answers
65
Lexical, Syntax and Semantic error
int main() { int 1a, b; Printf("\nGate 2018"); Printf("%d",x); } How many types of error are there in this code?
Shubhanshu
asked
in
Compiler Design
Jan 31, 2018
by
Shubhanshu
7.3k
views
compiler-design
lexical-analysis
3
votes
0
answers
66
Compiler Doubt
what type of error is caused if function name is same as a keyword name?
Kiran Karwa
asked
in
Compiler Design
Jan 20, 2018
by
Kiran Karwa
378
views
compiler-design
lexical-analysis
descriptive
6
votes
1
answer
67
Lexical error or No of tokens
Is this line a/*b successfully generating the token's or it give lexical error ? if it is given the lexical error then why so ? I think it will give lexical error because we don't find */ here
junaid ahmad
asked
in
Compiler Design
Jan 12, 2018
by
junaid ahmad
1.3k
views
compiler-tokenization
lexical-analysis
1
vote
2
answers
68
number of tokens
1) 8 2) 9 3) 12 4) 10
set2018
asked
in
Compiler Design
Jan 7, 2018
by
set2018
711
views
compiler-design
lexical-analysis
compiler-tokenization
2
votes
1
answer
69
me test number of tokens
here i got 44(i count &x and *x as one one) tokens but nas is 53 doubt ----> in general we count 1. *x is one token or two? 2. &x is one token? please tell me i m right or wrong . for this q i think & x are two tokens bcs there is space?
mohitbawankar
asked
in
Compiler Design
Jan 6, 2018
by
mohitbawankar
385
views
compiler-design
lexical-analysis
compiler-tokenization
numerical-answers
made-easy-test-series
2
votes
2
answers
70
Lexical Analysis
What are different set of characters which are taken as single token in lexical analysis in compiler design? For eg. Charaters under double quotes are taken as single token, post-increment and pre-increment is taken as single token etc.
Shubham Kumar Gupta
asked
in
Compiler Design
Dec 27, 2017
by
Shubham Kumar Gupta
835
views
compiler-design
lexical-analysis
compiler-tokenization
1
vote
1
answer
71
#CD Doubt
What is the diffrence between Lexical error , Syntax error and semantic error..? Please explain with this example void main() { int total-value, Num=2,sum=5,var1; 5=Num; var1=2; sum=num*1; if(sum=var1) { sum=sum+1 } }
Sahil1994
asked
in
Compiler Design
Dec 12, 2017
by
Sahil1994
623
views
compiler-design
lexical-analysis
descriptive
1
vote
1
answer
72
MadeEasy Subject Test: Compiler Design - Lexical Analysis
in c programming which of the following is not used as a token seprator during lexical analysis? a)white space b)comment c)semicolon d)none of these token seprator means??
aaru14
asked
in
Compiler Design
Nov 21, 2017
by
aaru14
1.4k
views
made-easy-test-series
compiler-design
lexical-analysis
7
votes
4
answers
73
lexical error
if there is miss spelling in some keyword in a program then this misspelled keyword will be treated as lexical errors or it will be treated as a new identifier and accepted as a token ?? ex - whiel (1) ; here while is misspelled as whiel
itsvkp1
asked
in
Compiler Design
Nov 1, 2017
by
itsvkp1
3.2k
views
lexical-analysis
compiler-design
compiler-tokenization
4
votes
2
answers
74
no of tokens
Imarati Gupta
asked
in
Compiler Design
Oct 21, 2017
by
Imarati Gupta
2.6k
views
compiler-design
lexical-analysis
compiler-tokenization
numerical-answers
test-series
9
votes
2
answers
75
# Error
Q) For each of the following C statements state whether they contain lexical error, syntax error, semantic error or no error(along with reason) - i) inta radius =5; ii) x=127b + z; iii) printf("%d=%d\n", x); iv) int p[10]; x=25 + p;
Kaifi7
asked
in
Compiler Design
Oct 12, 2017
by
Kaifi7
788
views
compiler-design
lexical-analysis
4
votes
1
answer
76
Compiler Lexical analyzer
int main() { print("%d",a); return 0; } If i execute,i will get error as:- prog.c:112:17: error: 'a' undeclared (first use in this function) printf("%d",a); Now as this is the semantic error,so how ... analyzer can give the row number and column number of error as it tokenize the entire program but is this also possible in sematic analyzer?
rahul sharma 5
asked
in
Compiler Design
Oct 9, 2017
by
rahul sharma 5
727
views
lexical-analysis
compiler-design
compiler-tokenization
5
votes
1
answer
77
#Lexical_Analysis
Marcos & prepocessor directive (#define, #include) are handle by which phase of compiler ?? Or it is not input to compiler,it is alredy handled in preprocessor??? Please explain in detail..
Harsh Mehta
asked
in
Compiler Design
Oct 7, 2017
by
Harsh Mehta
728
views
compiler-design
lexical-analysis
2
votes
1
answer
78
compiler-design -tokens
rajoramanoj
asked
in
Compiler Design
Oct 6, 2017
by
rajoramanoj
1.3k
views
compiler-design
lexical-analysis
compiler-tokenization
numerical-answers
made-easy-test-series
1
vote
0
answers
79
self doubt can anyone explain me this meaning !!!!
Once the parser makes the list of legitimate tokens available to the error recovery routine then this routine can decide whether a remaining input’s prefix matches one of these tokens closely enough to be treated as that token. This helps the lexical analyzer.
Venkat Sai
asked
in
Compiler Design
Oct 6, 2017
by
Venkat Sai
376
views
lexical-analysis
3
votes
1
answer
80
self doubt
How are constants recogonized by the lexical analyser like interger 1234 floating point 1234.56789 and what happens when we have -1234 and -1234.56789 how many tokens are generated in this case(each of this case) ? is "-" considered seperately ?
Venkat Sai
asked
in
Compiler Design
Oct 6, 2017
by
Venkat Sai
680
views
lexical-analysis
10
votes
3
answers
81
Lexical analyser, Tokens
When do we count ++(post increment or pre increment) as 1 or 2 token ?
junaid ahmad
asked
in
Compiler Design
Sep 28, 2017
by
junaid ahmad
3.8k
views
compiler-tokenization
lexical-analysis
2
votes
1
answer
82
Compilers: Lexical Error
This screenshot is token from the book Ullman, How can following be a lexical error? because "elipseSize" should have a token recorded as an identifier.
Manu Thakur
asked
in
Compiler Design
Sep 26, 2017
by
Manu Thakur
1.6k
views
compiler-design
lexical-analysis
compiler-tokenization
3
votes
1
answer
83
Compiler Design
The action of parsing the source program into the proper syntactic classes is known as 1. Lexical Analysis 2. Syntax Analysis 3. Interpretation Analysis 4. Parsing
nishant279
asked
in
Compiler Design
Aug 31, 2017
by
nishant279
2.6k
views
compiler-design
lexical-analysis
9
votes
2
answers
84
general doubt
MISSPELLING OF KEYWORDS CAUSE WHICH TYPE OF ERROR- SYNTAX ERROR OR LEXICAL ERROR?? printf("%d") without any integer argument will cause which type of error??
sushmita
asked
in
Compiler Design
Aug 27, 2017
by
sushmita
3.8k
views
compiler-design
lexical-analysis
9
votes
2
answers
85
classification of lexical and syntactic errors in complier phases
I am writing down some errors and its type with a reason.If there something wrong please correct it with a valid reason. 1.fi(a==10) this is not a lexical error, because lexical analyzer cannot tell whether fi is a misspelling ... token. but this says it is streams of valid tokens 6.int d=10.10.10 lexical error as invalid num token.
reena_kandari
asked
in
Compiler Design
Aug 14, 2017
by
reena_kandari
2.3k
views
lexical-analysis
compiler-tokenization
1
vote
1
answer
86
Compiler Design
Which language is used to describe the semantics and syntax of c? 1. attribute grammar. 2 syntax tree 3. none
Vasu_gate2017
asked
in
Compiler Design
May 14, 2017
by
Vasu_gate2017
291
views
compiler-design
lexical-analysis
5
votes
1
answer
87
Test by Bikram | Mock GATE | Test 4 | Question: 43
Consider the $C$ program given below: #include <stdio.h> main () { printf("This is GO mock exam\n" ); } The total number of tokens generated when this program is passed to lexical analyzer is :______.
Bikram
asked
in
Compiler Design
May 14, 2017
by
Bikram
583
views
tbb-mockgate-4
numerical-answers
lexical-analysis
compiler-design
14
votes
4
answers
88
ISRO 2017-79
The output of a lexical analyzer is A parse tree Intermediate code Machine code A stream of tokens
sh!va
asked
in
Compiler Design
May 7, 2017
by
sh!va
6.1k
views
isro2017
compiler-design
lexical-analysis
2
votes
4
answers
89
Compilers Principles Techniques and Tool Ch-3 Lexical Analysis
What will be the tokens formed for ',' and '{' ?
tanyagt99
asked
in
Compiler Design
Mar 26, 2017
by
tanyagt99
930
views
compiler-design
lexical-analysis
compiler-tokenization
2
votes
2
answers
90
Lexical Analysis
printf("Hello); In the statement given above,is there any lexical error or not ?
Purvi Agrawal
asked
in
Compiler Design
Mar 10, 2017
by
Purvi Agrawal
1.2k
views
compiler-design
lexical-analysis
descriptive
Page:
« prev
1
2
3
4
5
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged lexical-analysis
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...