Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Lexer / Parser (my own little scripting language)

Lexer / Parser (my own little scripting language)

Scheduled Pinned Locked Moved C#
comdata-structurestutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Insolence
    wrote on last edited by
    #1

    I'm having a VERY hard time finding material I can read to understand this stuff. So far I got a program to evaluate mathematical equations and a basic Lexer that splits a string simply into a stack like so... Example string - FunctionName ( "Param1" ); Stack[5]SEMICOLON Stack[4]CLOSE_PAREN Stack[3]"Param1" Stack[2]OPEN_PAREN Stack[1]FunctionName Basically it tells me when it hits a special character, and after that it tells me what's inside it. I'm having a really hard time explaining this, a bunch of source is available here: www.insolence9.com/downloads/SBN.zip Thanks

    D 1 Reply Last reply
    0
    • I Insolence

      I'm having a VERY hard time finding material I can read to understand this stuff. So far I got a program to evaluate mathematical equations and a basic Lexer that splits a string simply into a stack like so... Example string - FunctionName ( "Param1" ); Stack[5]SEMICOLON Stack[4]CLOSE_PAREN Stack[3]"Param1" Stack[2]OPEN_PAREN Stack[1]FunctionName Basically it tells me when it hits a special character, and after that it tells me what's inside it. I'm having a really hard time explaining this, a bunch of source is available here: www.insolence9.com/downloads/SBN.zip Thanks

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      But what are you needs? Do you need to write a parser/lexer or is it a homework assignment where you need to understand how it's done? If all you need is to write a quick parser, try COCO/R or ANTLR. I see dead pixels Yes, even I am blogging now!

      A 1 Reply Last reply
      0
      • D Daniel Turini

        But what are you needs? Do you need to write a parser/lexer or is it a homework assignment where you need to understand how it's done? If all you need is to write a quick parser, try COCO/R or ANTLR. I see dead pixels Yes, even I am blogging now!

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        (I'm replying from school right now) I'm only 16, not in college quite yet, so it's not an assignment :) I've realized these easier solutions, but I want to hardcode it (for fun). The documentation on this is geared towards people already very well versed in computer science and such. This is a bit out of my league, so I'm going to ask that you link me to a bit of less-savvy-specific material :)

        I 1 Reply Last reply
        0
        • A Anonymous

          (I'm replying from school right now) I'm only 16, not in college quite yet, so it's not an assignment :) I've realized these easier solutions, but I want to hardcode it (for fun). The documentation on this is geared towards people already very well versed in computer science and such. This is a bit out of my league, so I'm going to ask that you link me to a bit of less-savvy-specific material :)

          I Offline
          I Offline
          Insolence
          wrote on last edited by
          #4

          Anyone?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups