Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7907011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:13:34+00:00 2026-06-03T11:13:34+00:00

So I have to make a flex program that matches numbers, floats, symbols, and

  • 0

So I have to make a flex program that matches numbers, floats, symbols, and comments.
The regular expressions are in the file.

The flex.l file http://pastebin.com/iuJ8WW6m

The weird part is the output.

Lets say I’m giving it:

0 0.0 323 323.4 1.3.4

variable another_variable

"string"

;comment

69

This is the output:

Number: -->0<--
Float: -->0.0<--
Number: -->323<--
Float: -->323.4<--
Float: -->1.3<--
Number: -->4<--
Symbol: -->variable<--
<--bol: -->another_variable
String: -->"string"<--
<--ment: -->;comment
Number: -->69<--

Why is the output at “another_variable” like this <–bol: –>another_variable ?
I know some c/c++ and for me this makes 0 sense.

Same goes for <–ment: –>;comment

Apparently it takes the 3 last character (<–) and places them on top of the first 3(Com), But why?

If i give it only

;comment

The output is “Comment: –>;comment<–“, As soon as I insert a new line after it, it messes up again. I also tried the same with printf and using ECHO, but the result is the same.

Help, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:13:37+00:00Added an answer on June 3, 2026 at 11:13 am

    I suspect that part of the the newline sequence that follows the recognized comment or symbol is being captured into yytext, and hence echoed back in your debug trace.

    Try adding \r to the character class, like so:

    SYMBOLS         [a-zA-Z][^\,\.\"\(\) \n\t\r]*
    COMMENTS        ";"[^\n\r]*
    

    In any event, you might want to pipe your debug output into a file so that you can examine it characterwise, with a tool like od.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windowed Flex application (AIR) that uses an HTML file for the
i have a simple chat application in flex 3 and i want to make
Using this sample : I have make my own Fragment that holds tabhost and
Say I have the following custom component: <s:Group xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx> <fx:Script> <![CDATA[ [Bindable]
I have a website which is built totally in flex. I want to make
I have a Flex 3.5 application that will serve multiple purposes, and as part
I have a Flex/Actionscript 3 application that displays RSS feeds in a Text element.
I have a Makefile so that when I type make the following commands run:
How can Nginx serve crossdomain.xml file to a flash/flex program. Basically I need to
I have a flex client connecting to a web service that needs an authentication

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.