PHP "Formal"

  • Kurthead+1
  • Graduate
  • Graduate
  • Kurthead+1
  • Posts: 131

Post 3+ Months Ago

Sometimes while going through the php manual, an introduction to a new subject will start with something like-

(This one is on the floating point numbers page)

Formally:

PHP Code: [ Select ]
LNUM          [0-9]+
DNUM          ([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*)
EXPONENT_DNUM [+-]?(({LNUM} | {DNUM}) [eE][+-]? {LNUM})
 
  1. LNUM          [0-9]+
  2. DNUM          ([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*)
  3. EXPONENT_DNUM [+-]?(({LNUM} | {DNUM}) [eE][+-]? {LNUM})
  4.  


What does that mean? I'm not sure what it means by "formally" or what it is trying to explain exactly, and if the terms "LNUM" "DNUM" "EXPONENT_DNUM" are actual syntax or not.
Somebody please break this down, thoroughly if possible.

Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6247
  • Loc: Seattle, WA

Post 3+ Months Ago

http://en.wikipedia.org/wiki/Formal_grammar

Specifically, it's describing the context-sensitive grammar for that particular construct in PHP.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 76 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.