473,698 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parse tree - What is it?

2 New Member
Hi. I've got a small problem with parse trees... first off, I don't exactly know what it is.

I'm a newbie, in a way, but I've been bravely trying to learn my way through all the confusion out in the web and in books when what I read seems oddly similar to Chinese.

Nevertheless, I think I've managed quite some knowledge and, having been reforming my website every year to try and show exactly that, I've finally come to the validating tools only to find out that, if IE shows it is fine, it does not mean it's alright.

I don't have my site on-line yet (not the reshaped one, that is), but I've already got the basic HTML (everything except the content text) succesfully validated. Unfortunately, when I tried to validate my external CSS stylesheet it gave me this message:

To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.

Now, I've glanced through the appointed wrong and right CSS, but I can't seem to understand what is wrong with it!

Some notes:
- I've based it off a book and then... carried on a bit.
- I know that the scrollbar code part isn't supposed to exist or something, but since it works with IE... who am I to complain about it?
- this is exactly what I have on the document (cenario.css).
- the notes are in Portuguese and relate to the 'body of the document', 'text and body', etc.

<!-- CORPO DO DOCUMENTO -->

<!-- TEXTO E CORPO -->
body {
background-color: #000000;
text-color: #ccccff;
margin-top: 0%;

margin-bottom: 2%;
margin-left: 2%;
margin-right: 2%;
font-family: "Times New Roman", sans-serif;
scrollbar-arrow-color: #ffffff;
scrollbar-base-color: #000000;

scrollbar-darkshadow-color: #ffffff;
scrollbar-track-color: #000000;
scrollbar-face-color:

#000000; scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #00000;

scrollbar-3d-light-color: #ffffff;
}

p {margin-left: 0%; color: #ccccff; font-size: 13pt;}
p.menu {margin-top: 0%; margin-bottom: 0%; margin-left: 0%;
margin-right: 0%; color: #ccccff; font-size: 11pt; font-weight: bold;}
p.submenu {margin-top: 0%; margin-bottom: 0%; margin-left: 0%;
margin-right: 0%; color: #ccccff; font-size: 10pt;}
p.arquivo {margin-top: 1em; margin-bottom: 0em; margin-left: 2em;
margin-right: 0em; color: #6666ff; font-size: 11pt; font-weight: bold;}
p.rodape {margin-top: 2%; color: #ccccff; font-size: 11pt;}


<!-- TÍTULOS E cABEÇALHOS -->

H1 {
color: #ffffff;
margin-top: 2em;
margin-bottom: 1em;
margin-left: 2em;
margin-right: 2em;
font-family: "Times New Roman", serif;
font-size: 15pt;
font-weight: bold;
}

H2, {
color: #ffffff;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 1em;
margin-right: 1em;
font-family: "Times New Roman", serif;
font-size: 14pt;
font-weight: bold;
}

H3 {
color: #ffffff;
margin-top: 2em;
margin-bottom: 1em;
margin-left: 1em;
margin-right: 1em;
font-family: "Times New Roman", serif;
font-size: 13pt;
font-weight: bold;
}

H4 {
color: #ccccff;
margin-top: 0em;
margin-bottom: 1em;
margin-left: 1em;
margin-right: 1em;
font-family: "Times New Roman", serif;
font-size: 12pt;
font-weight: bold;
}

H5 {
color: #ccccff;
margin-top: 0em;
margin-bottom: 0em;
margin-left: 1em;
margin-right: 1em;
font-family: "Times New Roman", serif;
font-size: 11pt;
}


<!-- CAIXA DE TEXTO BASE -->
div.base {
background-color: #000033;
padding: 2em;
margin-left: 0%;
margin-right: 0%;
border: solid;
border-width: thin;
border-color: #ff9900;
width: 100%;
height: 100%;
overflow-y: scroll;
scrollbar-arrow-color: #ff9900;
scrollbar-base-color: #000033;
scrollbar-darkshadow-color: #000033;
scrollbar-track-color: #000033;
scrollbar-face-color: #000033;
scrollbar-shadow-color: #ff9900;
scrollbar-highlight-color: #ff9900;
scrollbar-3d-light-color: #ff9900;
}

<!-- CAIXA DE MENUS -->
div.menu {
background-color: #000000;
padding: 1em;
margin-left: 0%;
margin-right: 0%;
margin-top: 2%;
margin-bottom: 2%;
border: solid;
border-width: thin;
border-color: #ff9900;
width: 100%;
height: 70%;
}

<!-- HIPERLIGAÇÕES -->
a:link { color: #cccccc; } /*FOR UNVISITED LINKS*/
a:visited { color: #cccccc; } /*FOR VISITED LINKS*/
a:active { color: #cccccc; } /*WHEN LINK IS CLICKED*/
a:hover { color: #ffccff; } /*WHEN MOUSE IS OVER LINK*/
a.plain { text-decoration: none; }
a.bold { text-decoration: none; font-weight: bold; }

<!-- IMAGENS -->
img.logotipo {
height: 15;
width: 15;
}



I'm sure I must be making some silly obvious basic mistake. Somehow, those always seem to be the hardest ones...

Thanks in advance for all the help you might be able to give me.
TwinT - Teresa
Jul 29 '06 #1
4 5030
comteck
179 New Member
Parse trees are the Graphical representation of the grammar which filters out
the choice for replacement order of the Production rules.
e.g
for a production P->ABC
the parse tree would be
P
/ \ \
/ \ \
A B C
comteck
Jul 30 '06 #2
Banfa
9,065 Recognized Expert Moderator Expert
Right I don't know who's validator you are using but may I suggest your try the one from the W3C at

http://jigsaw.w3.org/css-validator/

Also validate your HTML with their validtor at

http://validator.w3.org/

Some of the problems in your CSS

----------------------------------------------------------------------------------------------------------------------
<!-- CORPO DO DOCUMENTO -->

This is not a CSS commend this is an HTML comment and is wrong in a CSS file. In a CSS file it should be

/* CORPO DO DOCUMENTO */

----------------------------------------------------------------------------------------------------------------------
text-color: #ccccff;

text-color is not a style you mean

color: #ccccff;

----------------------------------------------------------------------------------------------------------------------
Defining your H2 style

H2, {

the comma is a mistake should be

H2 {

----------------------------------------------------------------------------------------------------------------------
overflow-y: scroll;

the is no style overflow-y, the style is overflow

overflow: scroll;

----------------------------------------------------------------------------------------------------------------------
Defining your image style

img.logotipo {
height: 15;
width: 15;
}

lengths must have units, this should be

img.logotipo {
height: 15px;
width: 15px;
}

----------------------------------------------------------------------------------------------------------------------


That covers most of your errors
Jul 30 '06 #3
TwinT
2 New Member
Thank you for all your help and for the clear explanations you've provided me.

I'm considering adding this site to my links section since, for what I've seen, is one of the more helpfull I've browsed through (simple enough for those who are just starting and want to do a good job nevertheless), even if there are others very good.

Thank you, again,
TwinT, Teresa
Jul 31 '06 #4
Banfa
9,065 Recognized Expert Moderator Expert
I'm considering adding this site to my links section since, for what I've seen, is one of the more helpfull I've browsed through (simple enough for those who are just starting and want to do a good job nevertheless)
Well thank you very much and glad to have been of assistance :-)
Jul 31 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1688
by: Chad Whitacre | last post by:
Hey all, I've been playing around with the parser module, and based on the documentation I would expect all symbols in a parse tree to be part of the grammar. For example, I find this line in the symbol module docs: Refer to the file Grammar/Grammar in the Python distribution for the definitions of the names in the context of the language grammar. However, the program below gives me a human-readable parse tree (also
1
4389
by: Neil Zanella | last post by:
Hello, When I save the following file with the .xhtml or .xml extension I get the XML parse tree and the following message instead of the actual document. This XML file does not appear to have any style information associated with it. The document tree is shown below. I wonder if anyone could explain the above message. Even when I place
10
25827
by: dreamcatcher | last post by:
I want my program to parse INI files, only have little clue of how to do that, though, hope you guys might shed some light on this, thanx. for example:
11
3606
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a million lines. b) I need to store the contents into a unique hash. c) I need to then sort the data on a specific field. d) I need to pull out certain fields and report them to the user.
0
1596
by: asahin | last post by:
hi all; i need ability to change a page's looking at run-time by changing aspx page or construct control tree via reading a previously defined template. is there any way to parse an aspx page at run-time and build control tree, or a way to construct control tree by reading a strictly defined
2
3023
by: marc.wyburn | last post by:
I'm playing with XML and elementtree and am missing something but I'm not sure what...? I've create an XML file with Elementtree with a root of backup.xml. Attached to the root is a dirob and the dirobj has a fileobj. fileobj has filename and filesize tags. I can open the file in excel and it sets out the columns as I would expect. The problem I'm having is parsing the file. Using.. Doesn't return anything, infact I can't seem to...
3
1707
by: Bint | last post by:
Hi, I'm trying to parse an xml file into an array tree. From the PHP site in the comments, I got this code. But it doesn't work for me. It's saying that the passed variable is not an array or object in the call end($stack), in the first function startElement(). Anyone know why that would be? $stack is an array, as far as I can tell. Thanks B
0
1001
by: snc85 | last post by:
Hi! can anyone help me to parse some string into tree... I have Q function, this is something like "if else" for example: Q<VSecCode=0?B0+B2:B1>
1
2667
by: uche | last post by:
Hi Guys, I am trying to build a Parse Tree with the following grammar. I have implemented my insertions using a standard binary tree inserting algorithm. With the psuedocode below, can you guys provide any helpful feedback to placing insert statements into building nodes of the tree. Any suggestions on how to build the tree will be appreciated. I hope to build the tree to look like that 5+4 Goal
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.