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

  • SEARCH
  • Home
  • 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 4242350
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:25:48+00:00 2026-05-21T03:25:48+00:00

On the side since last year i’ve been writing an interpreter for HTML. I

  • 0

On the side since last year i’ve been writing an interpreter for HTML. I don’t think HTML is a very nice language, and thought I might create an interpreter that translates my nice looking code into HTML for use on the web.

It works really well, and am using it on a little web app, but I’m having a problem parsing a particular line, and would appreciate any advice on how I could go about parsing it.

My code:

HmtlDocument {
    Page.Title: "Test webpage using JTHtml";
    Using[] {
        "../Assets/Stylesheets/default.css",
        "../Assets/Scripts/slidercordian",
        "../Assets/Scripts/jquery.1.4.1.js"
    };
HtmlBody {
    HtmlElement Divider(container) {
        HtmlElement Divider(Header) {
            HtmlElement Image(Logo, "../Assets/Images/logo.png");
            HtmlElement Menu(MainMenu, Horizontal, Ul, li) {
                li.Text: "Home", "index.html";
                li.Text: "About Us", "about.html";
                li.Text: "Services", "services.html";
                li.Text: "Contact Us", "contact.html";
                li.Text: "My Account", "../myaccount/default.html";
            }
        }
        HtmlElement Divider(MainContent) {
            HtmlElement Heading(Heading, 1) {
                Heading.Text: "Welcome!";
            }
            HtmlElement Text(Text) {
                Text.Text: "Welcome to my new website written purely in jthtml";
            }
        }
    }
}

See, the problem I am having is with the following line:

li.Text: "[value]", [resource]";

The old way I had it was to write it like this:

li.Text("[value]", "[resource]");

However, that doesn’t quite stay true to the rest of the syntax, which is why I would like to keep it like this:

li.Text: "[value]", "[resource]";

But I’m just not sure how I would parse that line. I’m getting stuck because of the first closing quote and the following comma, space and second opening quote. I can’t seem to figure out the right logic for it.

Any help at all is appreciated.

Thank you!

  • 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-05-21T03:25:49+00:00Added an answer on May 21, 2026 at 3:25 am

    The line: li.Text: “[value]”, [resource]”; is missing an opening quote.

    Are you missing an opening quote or is the parser suppose to understand it without the opening quote?

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

Sidebar

Related Questions

I'm writing server-side programs in PHP for an iPhone app. And I have no
I have been trying there last days to extend the default editor (java, xml,
Its been a while since i am working with the AJAX and getting templates
ASP.NET server-side controls postback to their own page. This makes cases where you want
On my side job as programmer, I am to write a program in C++
Is there a down side? I feel almost dependent on it now. Whenever a
Anyone who writes client-side JavaScript is familiar with the DOM - the tree structure
For RMI on server-side, do we need to start rmiregistry program, or just call
Silverlight works on client side so putting any sensitive data like connection strings, passwords
Is there a side effect in doing this: C code: struct foo { int

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.