[Equest-users] Parsing Error: Expression too long to be parsed.

Bishop, Bill bbishop at pathfinder-ea.com
Tue Nov 14 11:22:22 PST 2017


Hi Nick,
>From the DOE-2 help file for Keyword Expressions, "The length of an expression cannot exceed 4096 characters (new line counts as two characters.)".
It is not too hard to exceed this limit for long expressions. I'm wondering if your original expression exceeded it and your revised did not, so that it has nothing to do with the #L vs. #LR issue you mention.
Regards,
~Bill

William Bishop, PE, BEMP, BEAP, CEM, LEED AP | Pathfinder Engineers & Architects LLP
Senior Energy Engineer

[cid:image005.jpg at 01D35D54.1AD50340]  [cid:image007.jpg at 01D35D54.1AD50340]



134 South Fitzhugh Street                 Rochester, NY 14608

T: (585) 698-1956                        F: (585) 325-6005

bbishop at pathfinder-ea.com<mailto:wbishop at pathfinder-ea.com>             www.pathfinder-ea.com<http://www.pathfinder-ea.com/>

[http://png-5.findicons.com/files/icons/977/rrze/720/globe.png]Carbon Fee and Dividend - simple, effective, and market-based.


From: Equest-users [mailto:equest-users-bounces at lists.onebuilding.org] On Behalf Of Nicholas Caton via Equest-users
Sent: Tuesday, November 14, 2017 1:00 PM
To: equest-users at onebuilding.org
Subject: [Equest-users] Parsing Error: Expression too long to be parsed.

Hi Friends,

I have encountered an expression evaluation error that would seem pretty self-explanatory on the surface:
[cid:image010.png at 01D35D53.272B8A70]

After a couple passes to do the logical thing and reduce the line count and character count in the expression (trimming whitespace, removing annotations), I realized a mistake where I used #L instead of #LR for a reference to C-ACTIVITY-DESC.

Trimmed Example - the highlighted characters should read #LR:
  switch(#SV(#PS()))
      case 1 :  38800.32*#L("SPACE","AREA")/10260.77 $Exh*Area/Total Unit Area
      case 2 :  27584.18*#L("SPACE","AREA")/7294.65  $Exh*Area/Total Unit Area
      case 3 :  33622.74*#L("SPACE","AREA")/8891.55  $Exh*Area/Total Unit Area
      case 4 :  12621.09*#L("SPACE","AREA")/3337.66  $Exh*Area/Total Unit Area
      case 5 :  8551.12*#L("SPACE","AREA")/2901.15   $Exh*Area/Total Unit Area
      case 7 :  18717.66*#L("SPACE","AREA")/6350.37  $Exh*Area/Total Unit Area
      case 8 :  8066.63*#L("SPACE","AREA")/2899.83   $Exh*Area/Total Unit Area
      case 10 : 24826.83*#L("SPACE","AREA")/8924.85  $Exh*Area/Total Unit Area
default : no_def
  endswitch

Fixing that function, unintuitively, caused the above "expression too long" error to go away!

This however raises a couple questions - I'd be sincerely interested to see any replies or thoughts around either prompt:

  1.  I didn't think there was a limit for expression length (or at least a practical limit).  The existence of this error suggests otherwise.   To avoid crossing that line and to better interpret these errors in the future:  Does anyone know what the actual character/line/other limits are for expression length?
     *   For reference, after trimming this was a relatively hefty expression clocking in at 2737 characters and 73 lines, according to my text editor... so if there is a limit it would be above those figures since it's now working again.
  2.  To further help interpret/troubleshoot similar situations in the future... Why would using #L (which I would think should resolve in an error along the lines "you're using the wrong function here, dummy") trigger an expression length error?  Is there a hierarchy of error messages that maps out "throw error X before checking for root cause Y," that we could construct and keep as a reference for interpreting what different expression evaluation errors could mean when they come up?

Thanks everyone!

~Nick

[cid:image011.png at 01D35D53.272B8A70]
Nick Caton, P.E., BEMP
  Senior Energy Engineer
  Regional Energy Engineering Manager
  Energy and Sustainability Services
  Schneider Electric

D  913.564.6361
M  785.410.3317
F  913.564.6380
E  nicholas.caton at schneider-electric.com<mailto:nicholas.caton at schneider-electric.com>

15200 Santa Fe Trail Drive
Suite 204
Lenexa, KS 66219
United States

[cid:image012.png at 01D35D53.272B8A70]



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.png
Type: image/png
Size: 47586 bytes
Desc: image010.png
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image011.png
Type: image/png
Size: 255 bytes
Desc: image011.png
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image012.png
Type: image/png
Size: 8477 bytes
Desc: image012.png
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 1517 bytes
Desc: image005.jpg
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 1647 bytes
Desc: image007.jpg
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 3859 bytes
Desc: image009.png
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20171114/93411393/attachment-0003.png>


More information about the Equest-users mailing list