Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
49 views

Why am i getting an error when reading ";" 'SEMI tokens

This is a homework assignment so I'm only looking to get unstuck. We are tasked with filling out a parser and lexical analyzer. This was going fine until I ran into an issue reading ";". As ...
Scott Lopinto's user avatar
0 votes
1 answer
43 views

How do I use the "built-in" yyerror() function from flex/bison?

I created my own. It works fine. However, I want to use the default yyerror() function provided by flex/bison. I am using GNU C on Windows 11.
Nitin Bhakta's user avatar
0 votes
0 answers
43 views

How to match keywords as standalone words in Flex without capturing substrings?

I'm writing a flex lexer to recognize specific keywords only when they appear as standalone words (not as part of larger words). For example, if I'm looking for the keyword "in", it should ...
Abdelrahman Adel's user avatar
1 vote
1 answer
67 views

How to pass a file pointer by reference for writing in a flex lexer?

I need help with a flex program. The program must analyze a string entered by the user and define if they are constants, identifiers, numerals or if there are no errors, these results need to be ...
Zix64's user avatar
  • 21
0 votes
0 answers
25 views

From here I was able to fetch only the text with face. The styles we have here are not coming

I am using it with Nextjs tsx.. Github Link { \_id: ObjectId('66d88efc48f48a786e4a683b'), title: 'Name of Organization: Dhaka Ice Cream Industries Limited. (Polar Ice Cream)', slug: 'Position: ...
ZobaidulKazi's user avatar
0 votes
0 answers
53 views

Azure AI Search - singular vs plural search terms

I have a search index in Azure AI Search using the newest version of the API (2024-07-01). I have added searchable text fields with analyzer and synonymMaps. I am using the "en.microsoft" ...
Vilhelm H.'s user avatar
  • 1,335
0 votes
0 answers
16 views

How to produce output in C4B in SableCC grammar file

I translated all the tokens in Russian. Before that, I have set the path in sablecc cmd to java path jdk-20. The program that I want to perform lexical analysis are also in Russian. But, when I want ...
Zattara's user avatar
0 votes
1 answer
88 views

identify a comment between /* and */ that may contain */ inside of it only if it's inside ""

I am working on a lexical analyser but i am struggling on how to identify the comments as below: A comment is a sequence of characters (even space) between /* and */; it may not contain the sub-...
Anastasia Frontend's user avatar
0 votes
1 answer
62 views

Error regarding my Python ANTLR parser code

I am trying to parse the contents of my test case files to output files to where the token type and the production rules are displayed. My test case is this: [* operator test *] = != > < <= =&...
user18464296's user avatar
0 votes
0 answers
75 views

Syntactic or Lexical Error in writing an interpret

For a school project I have to write an interpret in C for programming languge similar to Swift. I'm encountering an issue in my code, and I'm not sure if it's a syntactic or lexical error. In the ...
Marcinnn123's user avatar
0 votes
1 answer
73 views

Parse an expression with non whitespace seperated operators

I am currently working on a compiler. Recently, I stumbled upon an issue concerning the parsing of operators in an expression. Obviously I have not found this to be an issue in other languages, which ...
YayL's user avatar
  • 11
0 votes
0 answers
25 views

C Lexical Analyzer Bug: Pointer Value Reset [duplicate]

Description of the Problem I am working on implementing a lexical analyzer in C, and I have encountered an issue with a pointer variable (pos) that seems to be behaving unexpectedly. The problem ...
Matheus Farias's user avatar
1 vote
1 answer
368 views

Creating a static unordered_set from keys of a static unordered_map

I'm writing a front-end for a compiler and currently working on implementing punctuator scanning functionality. I've got a Punctuator class that I'd like to use to represent punctuators from the input ...
vmishel's user avatar
  • 145
0 votes
1 answer
50 views

ANTLR 4 lexer rule to skip combination of backslash and newline?

WS : [ \t]+ -> skip ; // skip spaces, tabs Works well to ignore white space by preventing those characters from reaching the parser. I want to do the same thing with character pair of '/' and ...
David Maffitt's user avatar
0 votes
2 answers
219 views

Regex to remove Key/Value in a JSON Object

I have a JSON like below: {"queueNumber": "123","field":"name",UserId":[12,12,34],"cur":[{"objectName":"test","...
daringfireball's user avatar

15 30 50 per page
1
2 3 4 5
57